473,749 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

py2app, pythoncard build problems

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
2 1515

lo*********@gma il.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
lo*********@gma il.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={'py2ap p' : {'strip': True,
'packages': ['helptext',
'tkHyperlinkMan ager',
'rst2tkinter',
'Crypto',
'SecureRandom',
'ResettableTime r'],
'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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1997
by: Austin | last post by:
""" Minimal setup.py example, run with: % python setup.py py2app """ from distutils.core import setup import py2app setup( app = , )
0
1454
by: Bob Swerdlow | last post by:
I'm trying to move my application from bundlebuilder to py2app. I upgraded to PyObjC 1.2, which include py2app 1.7, but I got the following error. I saw a note on the py2app site that earlier versions need to be removed before the upgrade, so I deleted the py2app directory and downloaded and installed it separately, but got the same result. How do I get it to find this boot_app.py file? Thanks, Bob
1
2534
by: bex | last post by:
Im baffled about this one... Im running OS 10.3, and Python 2.3. I installed py2app 0.17 and never used it, then installed py2app 0.2. It refuses to work. None of the samples will build. Observe: $ pwd /Developer/Python/py2app/Examples/pygame $ python setup.py py2app Traceback (most recent call last):
3
2174
by: bsharitt | last post by:
I'm trying to get Bittornado to run on Mac OS X (10.4 with Python 2.3.5) but I've only ever dealt with Python at lower lever scripting stuff, never wxPython or another GUI stuff. py2app is supposed to be the tool to create Mac friendly Python applications(like py2exe on Windows), but the documentation for py2app doesn't seem to be much help. The setup.py script that comes with BitTornado doesn't run when I type python setup.py py2app and...
0
2021
by: Richard Taylor | last post by:
User-Agent: OSXnews 2.07 Xref: number1.nntp.dca.giganews.com comp.lang.python:437315 Hi I am trying to use py2app (http://undefined.org/python/) to package a gnome-python application called gramps (http://www.gramps-project.org) for MAC OS X.
2
2318
by: James Stroud | last post by:
Hello All, I am trying to create a semi-standalone with the vendor python on OS X 10.4 (python 2.3.5). I tried to include some packages with both --packages from the command and the 'packages' option in setup.py. While the packages were nicely included in the application bundle in both cases (at Contents/Resources/lib/python2.3/), they were not found by python when the program was launched, giving the error: "ImportError: No module...
8
5989
by: Kevin Walzer | last post by:
I'm curious to know what others think of these two frameworks for building wxPython apps. PythonCard has been around longer, but its development seems to have slowed. The last release, 0.8.2, has been out for quite awhile now. Dabo is newer and seems to have gathered a lot of buzz. Anyone try both? What's your preference and why? Is one more robust than the other?
3
3449
by: AdamGr | last post by:
I am currently trying to convert a program I just wrote to application form, on the Mac. I'm using py2app to accomplish this, and everything works fine up until the last stage; when I try to complete the conversion with: python setup.py py2app and then run the resulting executable, I get the error: ImportError: No module named MySQLdb The really strange thing is that when I was testing the application creation by making an app bundle,...
1
1901
by: Joe Strout | last post by:
I'm trying to use py2app to convert the pySketch wxPython example into a stand-alone OS X app. I've found the documentation at <http://undefined.org/python/py2app.html like this: #!/usr/bin/env python """ setup.py - script for building a bundled OS X application Usage: % python setup.py py2app
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.