[Pythonmac-SIG] py2app with wxpython

Brendan Simon (eTRIX) brendan.simon at etrix.com.au
Mon Feb 21 12:33:38 CET 2011

On 21/02/11 10:00 PM, pythonmac-sig-request at python.org wrote:
> Subject:
> Re: [Pythonmac-SIG] py2app with wxpython
> From:
> Ned Deily <nad at acm.org>
> Date:
> Sun, 20 Feb 2011 15:46:05 -0800
> To:
> pythonmac-sig at python.org
> In article <4D61918E.1010308 at etrix.com.au>,
>  "Brendan Simon (eTRIX)" <brendan.simon at etrix.com.au> wrote:
>> > Do you need to specify 'pythonw' as the interpreter ??
>> > It may depend on python version.  I found (on OS X) that Python 2.7 
>> > requires pythonw rather than python to run my wxPython apps.
> That sounds very suspicious.  On OS X installs, bin/python and 
> bin/pythonw are supposed to be identical.
Indeed you are right.  The python and pythonw varieties are identical
for Python 2.7 and my wxPython application works fine with either.

I tried again with my Python 2.5.4 install and that does have the problem.

"pythonw myapp.py" works fine.

"python myapp.py" fails with the following error.

Traceback (most recent call last):
  File "myapp.py", line 18, in <module>
    import main as myMain
  File "/Users/brendan/src/main.py", line 19, in <module>
    from theapp import MyApp
  File "/Users/brendan/src/theapp.py", line 20, in <module>
    import wxAnyThread
ImportError: No module named wxAnyThread

It looks like it is just a path issue.  So it should be easy to solve,
but there is a difference in behaviour between python and pythonw with
Python 2.5.4, even though the binaries are identical.  I presume that
the the interpreter looks at the command that it is invoked with and
does something different with sys.path ??

Cheers, Brendan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20110221/e20ae727/attachment.html>

More information about the Pythonmac-SIG mailing list