473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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(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 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.command.py2app')

When I drag the script to PackageInstaller, 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.py all I get is:

Traceback (most recent call last):
File "btdownloadgui.py", line 29, in ?
from BitTornado.ConfigReader import configReader
File "/Library/Python/2.3/site-packages/BitTornado/ConfigReader.py",
line 40, in ?
_CHECKINGCOLOR =
ColorToHex(wxSystemSettings_GetColour(wxSYS_COLOUR _3DSHADOW))
File
"/BinaryCache/wxWidgets/wxWidgets-2.root~174/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/lib/python/wx-2.5.3-mac-unicode/wx/_misc.py",
line 145, in SystemSettings_GetColour
wx._core.PyNoAppError: 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 2153
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(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 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.command.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(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 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.command.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
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...
1
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....
0
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...
3
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...
2
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...
2
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'...
3
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...
0
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 ...
1
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.