From poalman at gmail.com Wed Nov 19 18:41:31 2014 From: poalman at gmail.com (Paul Wiseman) Date: Wed, 19 Nov 2014 17:41:31 +0000 Subject: [Pythonmac-SIG] Displaying messages through notification centre Message-ID: I've got an app which at the moment displays custom drawn tray style notifications. The app targets OSX 10.5+. I want to start looking at showing these messages/notifications through the native notification centre for users on systems that support it (10.8+). I have a few questions on how to do this. It looks like this should be possible by creating the correct object through pyobjc. Will it be possible to just include the bits of pyobjc in my final app that I need to create the notifications? I'd rather not include the whole of pyobjc just for this one bit of functionality if I can avoid it. If so how might I got about separating the unused parts of the library out (I'm using py2app) Also are there many differences since 10.8 that I should be aware of when implementing this? Thanks! Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Wed Nov 19 22:28:44 2014 From: nad at acm.org (Ned Deily) Date: Wed, 19 Nov 2014 13:28:44 -0800 Subject: [Pythonmac-SIG] Displaying messages through notification centre References: Message-ID: In article , Paul Wiseman wrote: > I've got an app which at the moment displays custom drawn tray style > notifications. > > The app targets OSX 10.5+. I want to start looking at showing these > messages/notifications through the native notification centre for users on > systems that support it (10.8+). > > I have a few questions on how to do this. It looks like this should be > possible by creating the correct object > UserNotification_Class/>through > pyobjc. Will it be possible to just include the bits of pyobjc in my final > app that I need to create the notifications? I'd rather not include the > whole of pyobjc just for this one bit of functionality if I can avoid it. > If so how might I got about separating the unused parts of the library out > (I'm using py2app) If you don't get an answer here, you should try the pyobjc list: https://lists.sourceforge.net/lists/listinfo/pyobjc-dev Another simple-minded possibility: use the AppleScript "display notification" command by "shelling out" from your app to osascript: http://apple.stackexchange.com/questions/57412/how-can-i-trigger-a-notifi cation-center-notification-from-an-applescript-or-shel -- Ned Deily, nad at acm.org From scottclausen at mac.com Wed Nov 26 21:13:11 2014 From: scottclausen at mac.com (Scott Clausen) Date: Wed, 26 Nov 2014 12:13:11 -0800 Subject: [Pythonmac-SIG] Python 3.4.2 as default version Message-ID: I?ve been searching the sites to find out how to set the latest version of Python, 3.4.2, as the default version. So far I?ve not been able to do so. I know I can use Idle to utilize the 3.4.2 version but I prefer to use a different editor. I?m not sure if I can do this with a script or plist so any thoughts would be greatly appreciated. Thanks, Scott You can have your own opinions but you can?t have your own facts. Truth is not a democracy. It doesn?t give a shit what you believe. ? Ricky Gervais -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.barker at noaa.gov Wed Nov 26 23:00:00 2014 From: chris.barker at noaa.gov (Chris Barker) Date: Wed, 26 Nov 2014 14:00:00 -0800 Subject: [Pythonmac-SIG] Python 3.4.2 as default version In-Reply-To: References: Message-ID: On Wed, Nov 26, 2014 at 12:13 PM, Scott Clausen wrote: > I?ve been searching the sites to find out how to set the latest version of > Python, 3.4.2, as the default version. So far I?ve not been able to do so. > you put it first on your PATH in .bash_profile If you installed from the dmg on python.org, it should have done that for you. -Chris > I know I can use Idle to utilize the 3.4.2 version but I prefer to use a > different editor. I?m not sure if I can do this with a script or plist so > any thoughts would be greatly appreciated. > > Thanks, > > Scott > > You can have your own opinions but you can?t have your own facts. Truth is > not a democracy. It doesn?t give a shit what you believe. > > ? Ricky Gervais > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG > > -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlundell at pobox.com Wed Nov 26 23:09:08 2014 From: jlundell at pobox.com (Jonathan Lundell) Date: Wed, 26 Nov 2014 14:09:08 -0800 Subject: [Pythonmac-SIG] Python 3.4.2 as default version In-Reply-To: References: Message-ID: > On 26 Nov 2014, at 2:00 PM, Chris Barker wrote: > > On Wed, Nov 26, 2014 at 12:13 PM, Scott Clausen > wrote: > I?ve been searching the sites to find out how to set the latest version of Python, 3.4.2, as the default version. So far I?ve not been able to do so. > > you put it first on your PATH in .bash_profile > > If you installed from the dmg on python.org , it should have done that for you. > Though you might want to consider that there are other Python clients around that might not like Python 3 all that well. I?ve seen a suggestion floating around (Stack Overflow IIRC) that one might create a ?python3? alias, and hash-bang to that where needed. Or whatever. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scottclausen at mac.com Wed Nov 26 23:02:27 2014 From: scottclausen at mac.com (Scott Clausen) Date: Wed, 26 Nov 2014 14:02:27 -0800 Subject: [Pythonmac-SIG] Python 3.4.2 as default version In-Reply-To: References: Message-ID: <3E7C097C-4818-4919-8FB9-C912D253A414@mac.com> John, Sorry for that omission. I'm on Yosemite on a 2009 iMac. Scott Sent from my iPhone > On Nov 26, 2014, at 13:29, John Lewis wrote: > > What OS are you using? > >> On Wed, 26 Nov 2014, Scott Clausen wrote: >> >> I?ve been searching the sites to find out how to set the latest version >> of Python, 3.4.2, as the default version. So far I?ve not been able to >> do so. >> I know I can use Idle to utilize the 3.4.2 version but I prefer to use >> a different editor. I?m not sure if I can do this with a script or >> plist so any thoughts would be greatly appreciated. >> Thanks, >> Scott >> You can have your own opinions but you can?t have your own facts. Truth >> is not a democracy. It doesn?t give a shit what you believe. >> ? Ricky Gervais From nad at acm.org Wed Nov 26 23:37:52 2014 From: nad at acm.org (Ned Deily) Date: Wed, 26 Nov 2014 14:37:52 -0800 Subject: [Pythonmac-SIG] Python 3.4.2 as default version References: Message-ID: In article , Jonathan Lundell wrote: > > On 26 Nov 2014, at 2:00 PM, Chris Barker wrote: > > > > On Wed, Nov 26, 2014 at 12:13 PM, Scott Clausen > > wrote: > > I've been searching the sites to find out how to set the latest version of > > Python, 3.4.2, as the default version. So far I've not been able to do so. > > > > you put it first on your PATH in .bash_profile > > > > If you installed from the dmg on python.org , it should > > have done that for you. > > > > Though you might want to consider that there are other Python clients around > that might not like Python 3 all that well. I've seen a suggestion floating > around (Stack Overflow IIRC) that one might create a 'python3' alias, and > hash-bang to that where needed. Or whatever. Python 3.4 normally comes with a python3 alias. If you use the python.org Python 3.4 installers, the default names installed for invoking it are: "python3" and "python3.4" and possible others, like "python3-32". It does not include "python" which is, by default, reserved for Python 2.x installations. One exception is within active virtual environments such as provided by virtualenv or Python 3's native pyvenv. If you install a Python 2.7 from python.org, it will be accessible by "python2.7", "python2", and "python". That allows both Python 3 and 2 to co-exist. If you want to override that, you can create or modify symlinks in the framework bin directories (in /Library/Frameworks) and/or in /usr/local/bin. Whatever you do, don't try to modify or uninstall the Apple supplied system Pythons in /usr/bin and /System/Library/Frameworks.. -- Ned Deily, nad at acm.org