[wxPython-mac] Problems with wx.Process & wx.Execute

Robin Dunn robin at alldunn.com
Wed Mar 12 14:46:52 PDT 2008


John Jackson wrote:
> I've been trying to use wx.Process to launch a Django from a wxPython 
> application with no luck.
> 
> What I see in my log are messages such as
> 
> 11:36:46: Starting server with command:
> /Library/Frameworks/Python.framework/Versions/Current/bin/python 
> ~/Source/Mine/DjangoTest/mysite/manage.py runserver
> 11:36:46: Debug: wxMacExecute Bad bundle: 
> /Library/Frameworks/Python.framework/Versions/Current/bin/python
> 11:36:46: Debug: pid=22933
> 11:36:46: Debug: Successfully added notification to the runloop
> 11:36:46: DjangoStarter: serverPID "22933" started.
> 11:36:46: Debug: Process ended
> 
> I'm also sometimes seeing GetOutputStream() returning a stream, and 
> sometimes not, even when Exists() is False.
> 
> Googling "wxMacExecute Bad bundle" returns some hits, but nothing that 
> helped. There was a request by Robin for a sample, application, but none 
> seemed to be offered.

You can ignore the bad bundle message.  It just means that wxMac 
discovered that the command you passed is not an application bundle so 
it will try to run it the old fashioned way.

The real problem seems to be that your Django app is exiting right away 
instead of sticking around to handle requests.  What happens if you run 
the same command from a Terminal window?  If it works then do you have 
any PYTHONPATH set in the environment that is allowing it to work there 
that would cause it to fail if that is not set in the environment Python 
gets when run from the wx app?

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





More information about the wxpython-mac mailing list