On 21 Feb, 2011, at 12:33, Brendan Simon (eTRIX) wrote: > On 21/02/11 10:00 PM, pythonmac-sig-requ...@python.org wrote: >> >> Subject: Re: [Pythonmac-SIG] py2app with wxpython >> From: Ned Deily <n...@acm.org> >> Date: Sun, 20 Feb 2011 15:46:05 -0800 >> To: pythonmac-sig@python.org >> In article <4d61918e.1010...@etrix.com.au>, >> "Brendan Simon (eTRIX)" <brendan.si...@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.
Which python 2.5.4 is that (that is, how did you install it)? Are you sure that 'python' and 'pythonw' refer to the same python installation (what is sys.prefix for these two commands)? Ronald > > "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. > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG