py2app and Bittornado

Discussion in 'Python' started by bsharitt@gmail.com, Aug 31, 2005.

  1. Guest

    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 31, 2005
    #1
    1. Advertising

  2. Robert Kern Guest

    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


    "In the fields of hell where the grass grows high
    Are the graves of dreams allowed to die."
    -- Richard Harter
     
    Robert Kern, Aug 31, 2005
    #2
    1. Advertising

  3. Guest

    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:
    > 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
    >
    >
    > "In the fields of hell where the grass grows high
    > Are the graves of dreams allowed to die."
    > -- Richard Harter
     
    , Aug 31, 2005
    #3
  4. Robert Kern Guest

    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


    "In the fields of hell where the grass grows high
    Are the graves of dreams allowed to die."
    -- Richard Harter
     
    Robert Kern, Aug 31, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian A. York

    mxtextools, py2app, and intel vs. PPC

    Ian A. York, Jun 5, 2007, in forum: Python
    Replies:
    0
    Views:
    246
    Ian A. York
    Jun 5, 2007
  2. franko353

    py2app and eggs

    franko353, Aug 21, 2007, in forum: Python
    Replies:
    0
    Views:
    276
    franko353
    Aug 21, 2007
  3. Avi Kak
    Replies:
    0
    Views:
    291
    Avi Kak
    Jul 12, 2008
  4. trhaynes
    Replies:
    4
    Views:
    1,757
    trhaynes
    Jun 2, 2009
  5. Pierre-Alain Dorange

    pygame and py2app : big package

    Pierre-Alain Dorange, Sep 18, 2009, in forum: Python
    Replies:
    3
    Views:
    555
    TerryP
    Sep 20, 2009
Loading...

Share This Page