Hi - currently learning Python and have run into a problem with wxPython (I
think).
System:
Fedora Core 5 x86_64
wxPython-2.6.3.2-1.fc5
wxGTK-2.6.3-2.6.3.2.2.fc5
wxGTK-devel-2.6.3-2.6.3.2.2.fc5
wxGTK-gl-2.6.3-2.6.3.2.2.fc5
I'm using IDLE and if I cut/paste the above code in the IDLE editor and
save/F5 the main app window appears and the About and Exit menu functions work
as expected. The Open menu option does not. For some reason anything I try
that involves wx.FileDialog does not work. No messages, etc.
If I run the same python script from the command line and choose "Open" thers
a very short pause and then the standard File dialog appears.
My question is, I suppose, are there certain actions/operations that dont work
"interactively" under IDLE?
I tried stepping thru under the debug window and it seems (i may be totally
wrong) to have the problem in utf_8.py at method decode - but again I'm not
really sure.
Basically you can forget IDLE for wxPython since they both run their own main loops and that doesn't work out sometimes. There are other IDEs out there which have no problem with that though.
···
Am 12.07.2006, 02:14 Uhr, schrieb huwdixon <huwdixon@netrox.net>:
Hi - currently learning Python and have run into a problem with wxPython (I
think).
System:
Fedora Core 5 x86_64
wxPython-2.6.3.2-1.fc5
wxGTK-2.6.3-2.6.3.2.2.fc5
wxGTK-devel-2.6.3-2.6.3.2.2.fc5
wxGTK-gl-2.6.3-2.6.3.2.2.fc5
I'm using IDLE and if I cut/paste the above code in the IDLE editor and
save/F5 the main app window appears and the About and Exit menu functions work
as expected. The Open menu option does not. For some reason anything I try
that involves wx.FileDialog does not work. No messages, etc.
If I run the same python script from the command line and choose "Open" thers
a very short pause and then the standard File dialog appears.
My question is, I suppose, are there certain actions/operations that dont work
"interactively" under IDLE?
I tried stepping thru under the debug window and it seems (i may be totally
wrong) to have the problem in utf_8.py at method decode - but again I'm not
really sure.
I'm using IDLE and if I cut/paste the above code in the IDLE editor and
save/F5 the main app window appears and the About and Exit menu functions work
as expected. The Open menu option does not. For some reason anything I try
that involves wx.FileDialog does not work. No messages, etc.
IDLE is built using Tkinter and generally different GUI frameworks do
not play nice with each other.
pyCrust / pyShell work well with wx (as you'd expect, considering they
come with wxPython ). Since they're wxPython apps themselves, you
don't even need to create a wxApp to start doing anything.
eg, this should work in pyShell:
···
On 12/07/06, huwdixon <huwdixon@netrox.net> wrote: