PyNoAppError: The wx.App object must be created first!

Raffaello Barella wrote:

When I try to start an application from IDLE(Python GUI), or even from PythonWin, after having modified it, I often get the error message "PyNoAppError: The wx.App object must be created first!". But the same application runs smoothly if I start it from another IDLE window, because my code already invoked wx.App().MainLoop().
I realize this is just a menial nuisance, and there are worse troubles in life, but does anybody knows a way to avoid it?

The key is to use an editor/IDE that runs the Python code you are editing in an external process, rather than running it in the same process as the editor itself.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Raffaello Barella wrote:

When I try to start an application from IDLE(Python GUI), or even from

The key is to use an editor/IDE that runs the Python code you are

editing in an external process, rather than running it in the same

process as the editor itself.

I run into trouble using PythonWin for testing wx-apps too, so although I use PythonWin a lot, for a lot of things, including development and interactive testing of snippets of wx-applications, for actually running full-blown applications and testing & debugging them, I use the PyDEV plugin for Eclipse which runs the app in a seperate process.

Cheers,

–Tim

···

On Tue, Mar 18, 2008 at 8:07 PM, Robin Dunn robin@alldunn.com wrote:

Robin Dunn

Software Craftsman

http://wxPython.org Java give you jitters? Relax with wxPython!


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

From the argument as it developed so far, I infer that this is a problem common to IDLE and PythonWin without a coded solution. My bypass consists in putting on the desktop an icon for a connection to the .py file of the app I’m working on. Rude and fast.

Raffaello Barella wrote:

When I try to start an application from IDLE(Python GUI), or even from

The key is to use an editor/IDE that runs the Python code you are

editing in an external process, rather than running it in the same

process as the editor itself.

I run into trouble using PythonWin for testing wx-apps too, so although I use PythonWin a lot, for a lot of things, including development and interactive testing of snippets of wx-applications, for actually running full-blown applications and testing & debugging them, I use the PyDEV plugin for Eclipse which runs the app in a seperate process.

Cheers,

–Tim

Robin Dunn

Software Craftsman

http://wxPython.org Java give you jitters? Relax with wxPython!


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

···

2008/3/18, Tim van der Leeuw tnleeuw@gmail.com:

On Tue, Mar 18, 2008 at 8:07 PM, Robin Dunn robin@alldunn.com wrote: