By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,784 Members | 3,536 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,784 IT Pros & Developers. It's quick & easy.

py2app, pythoncard build problems

P: n/a
Hi,

I'm attempting to build a small app that uses pythoncard for a gui
layer. The intention is to use py2app to construct an .app bundle for
the Mac. I'm running OS 10.4 on an Intel MacBook Pro. I'm using the
default installed Python 2.3

The .app bundle appears to build, but when I start up it fails -
checking the console reveals that it can't find the "wx" package, as
its called from some pythoncard code. (The app launches just fine in
non-bundled form when I run it from the command line using pythonw).

Not sure where to go with this. Any help would be greatly appreciated
- thanks.

May 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

lo*********@gmail.com wrote:
Hi,

I'm attempting to build a small app that uses pythoncard for a gui
layer. The intention is to use py2app to construct an .app bundle for
the Mac. I'm running OS 10.4 on an Intel MacBook Pro. I'm using the
default installed Python 2.3

The .app bundle appears to build, but when I start up it fails -
checking the console reveals that it can't find the "wx" package, as
its called from some pythoncard code. (The app launches just fine in
non-bundled form when I run it from the command line using pythonw).

Not sure where to go with this. Any help would be greatly appreciated


Most likely py2app analyzes code of pythoncard and cannot find
dependance on wx. As a quick workaround you can just insert "import wx"
in the beginning of your program where you import pythoncard. For a
more flexible solution you will need to read py2app docs how to force
bunding of a package from setup.py

May 2 '06 #2

P: n/a
lo*********@gmail.com wrote:
Hi,

I'm attempting to build a small app that uses pythoncard for a gui
layer. The intention is to use py2app to construct an .app bundle for
the Mac. I'm running OS 10.4 on an Intel MacBook Pro. I'm using the
default installed Python 2.3

The .app bundle appears to build, but when I start up it fails -
checking the console reveals that it can't find the "wx" package, as
its called from some pythoncard code. (The app launches just fine in
non-bundled form when I run it from the command line using pythonw).

Not sure where to go with this. Any help would be greatly appreciated
- thanks.


Did you explicitly specify packages to bundle via the packages keyword?
E.g.:

setup(
app=['%s.py' % appname],
name=appname,
options={'py2app' : {'strip': True,
'packages': ['helptext',
'tkHyperlinkManager',
'rst2tkinter',
'Crypto',
'SecureRandom',
'ResettableTimer'],
'iconfile': '%s.icns' % appname,
'argv_emulation' : True}}

Jaems

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
May 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.