Pythonw.exe not responding

I learned a little Python2.7. I am using Windows 7 64 bit BTW. I started learning the GUI and tried to use wxpython and IDLE for this. So I print the code:

import wx app = wx.App() win = wx.Frame(None) win.Show() app.MainLoop() 

I run the program and a window pops up, but there is a blue donut. I am trying to close the window and it says pythonw.exe is not responding. Another window about wxpython will appear. It says:

 wxPython stdout/stderr(Not Responding) Traceback (most recent call last): **IDLE Internal Exception: File "C:\Python27\lib\idlelib\run.py", line 93, in main seq, request = rpc.request_queue.get(block=True, timeout=0.05) File "C:\Python27\lib\Queue.py", line 177, in get self.not_empty.wait(remaining) File "C:\Python27\lib\threading.py", line 263, in wait _sleep(delay) typeError: 'int' object is not callable 

What is wrong and how to fix it?

Thank.

+1
python wxpython
Apr 03 2018-12-12T00:
source share
2 answers

The failure most likely occurs when you try to start the event loop. See Error Report: http://bugs.python.org/issue989712

It seems someone else has gone so far as to try to create an extension to handle this ability: http://idlex.sourceforge.net/extensions.html

Basically, do not do this from IDLE. Write a script and run it from a shell or script directly, if in windows, calling it a .pyw extension and double-clicking on it. There seems to be a conflict between the native IDLE event loop and the GUI tools.

+2
Apr 03 2018-12-12T00:
source share

It seems like something could be a polluting variable in the threading library, it looks like the _sleep variable is _sleep overwritten with an int value; in this case, _sleep(x) will not work, since _sleep is int and int cannot be called.

It could be in your client code or in some code or library code that you are import . Is this all the code?

Try running this code from a simple python terminal, and not from an IDE such as IDLE.

0
Apr 03 2018-12-12T00:
source share



All Articles