<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 21/02/11 10:00 PM, <a class="moz-txt-link-abbreviated" href="mailto:pythonmac-sig-request@python.org">pythonmac-sig-request@python.org</a> wrote:
<blockquote
cite="mid:mailman.40.1298286003.8191.pythonmac-sig@python.org"
type="cite">
<table class="header-part1" border="0" cellpadding="0"
cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">Subject:
</div>
Re: [Pythonmac-SIG] py2app with wxpython</td>
</tr>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">From:
</div>
Ned Deily <a class="moz-txt-link-rfc2396E" href="mailto:nad@acm.org"><nad@acm.org></a></td>
</tr>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">Date:
</div>
Sun, 20 Feb 2011 15:46:05 -0800</td>
</tr>
</tbody>
</table>
<table class="header-part2" border="0" cellpadding="0"
cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<div class="headerdisplayname" style="display: inline;">To:
</div>
<a class="moz-txt-link-abbreviated" href="mailto:pythonmac-sig@python.org">pythonmac-sig@python.org</a></td>
</tr>
</tbody>
</table>
<br>
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-western">
<pre wrap="">In article <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:4D61918E.1010308@etrix.com.au"><4D61918E.1010308@etrix.com.au></a>,
"Brendan Simon (eTRIX)" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:brendan.simon@etrix.com.au"><brendan.simon@etrix.com.au></a> wrote:
</pre>
<blockquote type="cite" style="color: rgb(0, 0, 0);">
<pre wrap=""><span class="moz-txt-citetags">> </span>Do you need to specify 'pythonw' as the interpreter ??
<span class="moz-txt-citetags">> </span>It may depend on python version. I found (on OS X) that Python 2.7
<span class="moz-txt-citetags">> </span>requires pythonw rather than python to run my wxPython apps.
</pre>
</blockquote>
<pre wrap="">That sounds very suspicious. On OS X installs, bin/python and
bin/pythonw are supposed to be identical.
</pre>
</div>
</blockquote>
Indeed you are right. The python and pythonw varieties are
identical for Python 2.7 and my wxPython application works fine with
either.<br>
<br>
I tried again with my Python 2.5.4 install and that does have the
problem.<br>
<br>
"pythonw myapp.py" works fine.<br>
<br>
"python myapp.py" fails with the following error.<br>
<br>
Traceback (most recent call last):<br>
File "myapp.py", line 18, in <module><br>
import main as myMain<br>
File "/Users/brendan/src/main.py", line 19, in <module><br>
from theapp import MyApp<br>
File "/Users/brendan/src/theapp.py", line 20, in <module><br>
import wxAnyThread<br>
ImportError: No module named wxAnyThread<br>
<br>
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 ??<br>
<br>
Cheers, Brendan.<br>
<br>
</body>
</html>