473,566 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

py2app and Bittornado

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(li ke 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 produces the following error:

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'py2app' (no module named
'distutils.comm and.py2app')

When I drag the script to PackageInstalle r, it creates a Mac installer
package, but all that does is mostly copy the the sane stuff stuff to
/usr/local/bin and when I try to run btdownloadgui.p y all I get is:

Traceback (most recent call last):
File "btdownloadgui. py", line 29, in ?
from BitTornado.Conf igReader import configReader
File "/Library/Python/2.3/site-packages/BitTornado/ConfigReader.py ",
line 40, in ?
_CHECKINGCOLOR =
ColorToHex(wxSy stemSettings_Ge tColour(wxSYS_C OLOUR_3DSHADOW) )
File
"/BinaryCache/wxWidgets/wxWidgets-2.root~174/System/Library/Frameworks/Python.framewor k/Versions/2.3/Extras/lib/python/wx-2.5.3-mac-unicode/wx/_misc.py",
line 145, in SystemSettings_ GetColour
wx._core.PyNoAp pError: The wx.App object must be created first!

Any help would be appreciated. Either reply to this or email me.

Aug 30 '05 #1
3 2166
bs******@gmail. com wrote:
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(li ke 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 produces the following error:

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'py2app' (no module named
'distutils.comm and.py2app')


You need to write a setup.py (actually, probably you should name it
something else like "setup-app.py") that specifies the appropriate
information. From the py2app documentation, the simplest example would be

from distutils.core import setup
import py2app

setup(
app=['MyApplication. py'],
)

Then you can do

python setup-app.py py2app

If you need more help, I suggest asking on the PythonMac-SIG mailing list.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Aug 30 '05 #2
Yeah, already saw that, which is why I said the py2app wasn't thar much
help. That just seems to create a broken .app file.

You wouldn't happen to know a nice way to interact with the
PythonMac-SIG group without subscribing and subjecting my inbox to rape
by a bunch of useless messages would you?

Robert Kern wrote:
bs******@gmail. com wrote:
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(li ke 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 produces the following error:

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'py2app' (no module named
'distutils.comm and.py2app')


You need to write a setup.py (actually, probably you should name it
something else like "setup-app.py") that specifies the appropriate
information. From the py2app documentation, the simplest example would be

from distutils.core import setup
import py2app

setup(
app=['MyApplication. py'],
)

Then you can do

python setup-app.py py2app

If you need more help, I suggest asking on the PythonMac-SIG mailing list.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter


Aug 30 '05 #3
bs******@gmail. com wrote:
Yeah, already saw that, which is why I said the py2app wasn't thar much
help. That just seems to create a broken .app file.

You wouldn't happen to know a nice way to interact with the
PythonMac-SIG group without subscribing and subjecting my inbox to rape
by a bunch of useless messages would you?


Use GMane.

http://dir.gmane.org/gmane.comp.python.apple

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Aug 31 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1447
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. ...
1
2523
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):
0
2011
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.
3
2571
by: SPE - Stani's Python Editor | last post by:
Hi, I'm creating a GUI program with wxPython which will be distributed for Mac and Windows. The audience of the program is not technical at all (eg they've never heard about Python yet ;-), so everything should go automatically. The program should be able to update itself and to update its database (collection of .txt files). These are...
2
1506
by: loren.davie | last post by:
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...
2
2309
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...
3
3429
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...
0
790
by: Avi Kak | last post by:
If you are unable to use the wxPython-based GUI interfaces in the BitTornado 0.3.18 library on your Ubuntu 8.04 machine, you may wish to download a directory of the library available through http://cobweb.ecn.purdue.edu/~kak/distbt/ If any problems, send me email at kak@purdue.edu with "BitTornado" in the subject line to get past my...
1
1893
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
7673
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...
0
7584
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...
0
7893
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. ...
0
8109
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...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
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...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
926
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...

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.