Not working?
darkzeroman opened this issue · 6 comments
I might be missing something but I just tried to download the files and run the test file and did not see any notifications, but I see no errors.
Running on Mountain Lion (obviously) and Python 2.7.2.
Any tips?
Hi darkzeroman,
Are you trying to call it via a thread? If so, you will have to create an autorelease pool for that thread.
I also can't get this to work. I'm on ML 10.8.2. Just upgraded from SL last night and wanted to try out interfacing with notification center via Python. The script runs, prints out my test message at the end, but gives no errors and no notifications.
Hello,
Make sure you run it with the built-in python, as when you try it with the non-Apple supplied version of python, notifications won't work - this is by design, as Apple only allows signed applications to access the notification center.
Exactly got the same problem! Not in virtualenv, running it with /usr/bin/python (apple's default).
uname -a
Darwin 192.168.2.3 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 16:32:48 PDT 2012; root:xnu-2050.20.9~2/RELEASE_X86_64 x86_64
+1. Not working:
> uname -a
Darwin t-racoon.local 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 16:32:48 PDT 2012; root:xnu-2050.20.9~2/RELEASE_X86_64 x86_64
Hello,
Notifications require a default notification center; if the app runs on a console script you probably won't see the notification generated. The module is designed to be py2app'ed into your bundle. Also, if you install the latest release for OSX, that should include IDLE, and running the script from that will generate the notifications. Be careful not to touch the built in python though.