PyGUI 1.6: A Note for MacOSX Users

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • greg

    #1

    PyGUI 1.6: A Note for MacOSX Users

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

    If you get the following exception:

    File "GUI/Generic/BaseAlertFuncti ons.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:



    --
    Greg
  • Alex Martelli

    #2
    Re: PyGUI 1.6: A Note for MacOSX Users

    greg <greg@cosc.cant erbury.ac.nz> wrote:
    [color=blue]
    > A small problem has come to light with PyGUI 1.6
    > on MacOSX systems.
    >
    > If you get the following exception:
    >
    > File "GUI/Generic/BaseAlertFuncti ons.py", line 5, in ?
    > ImportError: No module named Alerts
    >
    > it's probably because you don't have PyObjC installed.[/color]

    I'm getting quite a different error:

    [[snipped earlier parts of traceback]]
    File
    "/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-pa
    ckages/GUI/Cocoa/Applications.py ", line 184, in init_applicatio n_name
    ns_info['CFBundleName'] = GApplications.a pplication_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

    Comment

    • Greg Ewing

      #3
      Re: PyGUI 1.6: A Note for MacOSX Users

      Alex Martelli wrote:
      [color=blue]
      > "/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-pa
      > ckages/GUI/Cocoa/Applications.py ", line 184, in init_applicatio n_name
      > ns_info['CFBundleName'] = GApplications.a pplication_name
      > TypeError: object does not support item assignment[/color]

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

      --
      Greg Ewing, Computer Science Dept,
      University of Canterbury,
      Christchurch, New Zealand

      Comment

      • Alex Martelli

        #4
        Re: PyGUI 1.6: A Note for MacOSX Users

        Greg Ewing <greg@cosc.cant erbury.ac.nz> wrote:
        [color=blue]
        > Alex Martelli wrote:
        >[color=green]
        > > "/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-pa
        > > ckages/GUI/Cocoa/Applications.py ", line 184, in init_applicatio n_name
        > > ns_info['CFBundleName'] = GApplications.a pplication_name
        > > TypeError: object does not support item assignment[/color]
        >
        > You need to run your program with pythonw, not python.[/color]

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


        Alex

        Comment

        Working...