PyGUI 1.6: A Note for MacOSX Users

Discussion in 'Python' started by greg, Mar 1, 2006.

  1. greg

    greg Guest

    A small problem has come to light with PyGUI 1.6
    on MacOSX systems.

    If you get the following exception:

    File "GUI/Generic/BaseAlertFunctions.py", line 5, in ?
    ImportError: No module named Alerts

    it's probably because you don't have PyObjC installed.

    I will fix this to produce a more informative error
    message in the next release.

    ======================================================

    What is PyGUI?
    --------------

    PyGUI is an experimental highly-Pythonic cross-platform
    GUI API. Implementations are currently available for
    MacOSX and Gtk. For a full description of the project
    goals, see the PyGUI web page at the above address.

    The current version is available from:

    http://www.cosc.canterbury.ac.nz/~greg/python_gui/

    --
    Greg
    greg, Mar 1, 2006
    #1
    1. Advertising

  2. greg <> wrote:

    > A small problem has come to light with PyGUI 1.6
    > on MacOSX systems.
    >
    > If you get the following exception:
    >
    > File "GUI/Generic/BaseAlertFunctions.py", line 5, in ?
    > ImportError: No module named Alerts
    >
    > it's probably because you don't have PyObjC installed.


    I'm getting quite a different error:

    [[snipped earlier parts of traceback]]
    File
    "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pa
    ckages/GUI/Cocoa/Applications.py", line 184, in init_application_name
    ns_info['CFBundleName'] = GApplications.application_name
    TypeError: object does not support item assignment

    That's when I try (after installing PyGUI):

    helen:~/Desktop/PyGUI-1.6/Demos alex$ python blobedit.py

    MacOSX, XCode, Python and PyObjC all at the latest binary-released
    levels, I believe (10.4.5, 2.2, 2.4.1, 1.3.6 respectively).


    Alex
    Alex Martelli, Mar 1, 2006
    #2
    1. Advertising

  3. greg

    Greg Ewing Guest

    Alex Martelli wrote:

    > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pa
    > ckages/GUI/Cocoa/Applications.py", line 184, in init_application_name
    > ns_info['CFBundleName'] = GApplications.application_name
    > TypeError: object does not support item assignment


    You need to run your program with pythonw, not python.

    --
    Greg Ewing, Computer Science Dept,
    University of Canterbury,
    Christchurch, New Zealand
    http://www.cosc.canterbury.ac.nz/~greg
    Greg Ewing, Mar 9, 2006
    #3
  4. Greg Ewing <> wrote:

    > Alex Martelli wrote:
    >
    > > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pa
    > > ckages/GUI/Cocoa/Applications.py", line 184, in init_application_name
    > > ns_info['CFBundleName'] = GApplications.application_name
    > > TypeError: object does not support item assignment

    >
    > You need to run your program with pythonw, not python.


    Thanks -- that was indeed my mistake. Dunno why I keep tripping over
    that problem on the Mac;-).


    Alex
    Alex Martelli, Mar 9, 2006
    #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. greg
    Replies:
    1
    Views:
    296
    Greg Ewing
    Jun 15, 2004
  2. Greg Ewing

    ANN: PyGUI 1.4

    Greg Ewing, Jun 21, 2004, in forum: Python
    Replies:
    0
    Views:
    327
    Greg Ewing
    Jun 21, 2004
  3. greg

    ANN: PyGUI 1.5

    greg, Jun 27, 2004, in forum: Python
    Replies:
    0
    Views:
    342
  4. greg

    ANN: PyGUI 1.5.1

    greg, Jul 4, 2004, in forum: Python
    Replies:
    0
    Views:
    329
  5. Zooko O'Whielacronx

    up with PyGUI!

    Zooko O'Whielacronx, Sep 14, 2004, in forum: Python
    Replies:
    119
    Views:
    2,309
    Carlos Ribeiro
    Sep 29, 2004
Loading...

Share This Page