anonymous user wrote:

> Using:
> OS X 10.4.11
> py2app 0.3.6 and also tried the latest from svn

I've got the same setup working well.

>     from wx import *

A note here -- you really don't want to do "import *", but I doubt 
that's your issue.

>   File 
> "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/py/__init__.py",
>  

Here's a slight difference -- I use the unicode build, but again, 
probably not the issue.

> "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/py/interpreter.py",
>  
> line 9, in <module>
>     from code import InteractiveInterpreter
> ImportError: No module named code
> 2008-04-01 11:30:14.958 driver[1109] driver Error
> 2008-04-01 11:30:14.959 driver[1109] driver Error

code is part of the standard library. I suspect that it isn't picked up 
by py2app, because you haven't imported it in any of your code, or in 
code that you import. Try:

adding an explicit import in one of your files:

import code

or:
if False:
     import code

That will keep it from getting imported, but will "fool" py2app into 
including it.

You can also add it to the list of extra modules you want py2app to include:

OPTIONS = {'argv_emulation': True, 'modules' : ['code']}

(not tested)

> Why it seems to be grabbing wx libraries from the system 
> folder, rather than from dist.

actually, it should be running the wx package from the app bundle, but 
it could keep the old path around, I'm not sure about that.

> which I modified to include "wx" as a package. 

That shouldn't be required. if you've imported wx, py2app should pick 
that up, and the wx recipe should "do the right thing" -- it's always 
worked for me. Try it without specifying that package.

Let us know how it works out...

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to