I was trying to run the sample PyObjc HotKey example app downloaded from this link: http://pythonhosted.org/pyobjc/_downloads/PyObjCExample-HotKeyPython.zip

(My environment: Mac OS X 10.8.5, Python 2.7.5)

After I unpacked the file, I tried to:

1) run it via:

python HotKey.py

and got the following error:

Traceback (most recent call last):
  File "HotKey.py", line 18, in <module>
    from Carbon.CarbonEvt import RegisterEventHotKey, GetApplicationEventTarget
ImportError: cannot import name RegisterEventHotKey

2) run it in 32bit mode, as I thought this might only be supported in 32bit.

arch -i386 python HotKey.py

and got another error:

2014-01-03 21:57:41.083 Python[2047:f0b] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

3) Then I thought I might have to package it as an xx.app to run, then I executed the following command to package it:

python setup.py py2app -A

(also tried 'arch -i386 python setup.py py2app -A')

The app couldn't be run, and then ran it from console, I got the following errors:

Traceback (most recent call last):
  File "/Users/jiakuanwang/opensource/PyObjCExample-HotKeyPython/dist/HotKey.app/Contents/Resources/__boot__.py", line 69, in <module>
  File "/Users/jiakuanwang/opensource/PyObjCExample-HotKeyPython/dist/HotKey.app/Contents/Resources/__boot__.py", line 62, in _run
    exec(compile(source, script, 'exec'), globals(), globals())
  File "/Users/jiakuanwang/opensource/PyObjCExample-HotKeyPython/HotKey.py", line 16, in <module>
    from AppKit import *
ImportError: No module named AppKit
2014-01-03 22:00:41.775 HotKey[2126:707] HotKey Error

Is it possible to run it in some way? Thanks in advance!