From skip at pobox.com Mon Dec 1 03:08:48 2008 From: skip at pobox.com (skip at pobox.com) Date: Sun, 30 Nov 2008 20:08:48 -0600 Subject: [Pythonmac-SIG] Building Python 2.3 on Mac OS X 10.5.5 Message-ID: <18739.18224.452430.466414@montanaro-dyndns-org.local> I'm trying to build Python 2.3 on my Mac (OS X 10.5.5) so I can use it simply to test my lockfile package. It configures fine and the basic make step works, but the executable has some sort of problem with semaphore operations: % ./python.exe sem_init: Function not implemented sem_wait: Bad file descriptor sem_post: Bad file descriptor sem_wait: Bad file descriptor sem_post: Bad file descriptor sem_init: Function not implemented sem_trywait: Bad file descriptor sem_wait: Bad file descriptor sem_post: Bad file descriptor sem_init: Function not implemented ... lots of similar messages ad nauseum ... sem_post: Bad file descriptor sem_init: Function not implemented sem_trywait: Bad file descriptor sem_wait: Bad file descriptor sem_init: Function not implemented sem_post: Bad file descriptor Traceback (most recent call last): File "/Users/skip/.python.py", line 21, in ? from save_session import mark, save, load File "/Users/skip/misc/python/save_session.py", line 21, in ? raise ImportError("session save/restore requires readline module") ImportError: session save/restore requires readline module >>> I compared the code related to sem_init between 2.3 and trunk but didn't see anything which looked promising. Any thoughts? Thx, -- Skip Montanaro - skip at pobox.com - http://smontanaro.dyndns.org/ From janssen at parc.com Mon Dec 1 08:19:44 2008 From: janssen at parc.com (Bill Janssen) Date: Sun, 30 Nov 2008 23:19:44 PST Subject: [Pythonmac-SIG] Building Python 2.3 on Mac OS X 10.5.5 In-Reply-To: <18739.18224.452430.466414@montanaro-dyndns-org.local> References: <18739.18224.452430.466414@montanaro-dyndns-org.local> Message-ID: <93869.1228115984@parc.com> See http://mail.python.org/pipermail/python-dev/2008-March/077380.html. Bill skip at pobox.com wrote: > I'm trying to build Python 2.3 on my Mac (OS X 10.5.5) so I can use it > simply to test my lockfile package. It configures fine and the basic make > step works, but the executable has some sort of problem with semaphore > operations: > > % ./python.exe > sem_init: Function not implemented > sem_wait: Bad file descriptor > sem_post: Bad file descriptor > sem_wait: Bad file descriptor > sem_post: Bad file descriptor > sem_init: Function not implemented > sem_trywait: Bad file descriptor > sem_wait: Bad file descriptor > sem_post: Bad file descriptor > sem_init: Function not implemented > ... lots of similar messages ad nauseum ... > sem_post: Bad file descriptor > sem_init: Function not implemented > sem_trywait: Bad file descriptor > sem_wait: Bad file descriptor > sem_init: Function not implemented > sem_post: Bad file descriptor > Traceback (most recent call last): > File "/Users/skip/.python.py", line 21, in ? > from save_session import mark, save, load > File "/Users/skip/misc/python/save_session.py", line 21, in ? > raise ImportError("session save/restore requires readline module") > ImportError: session save/restore requires readline module > >>> > > I compared the code related to sem_init between 2.3 and trunk but didn't see > anything which looked promising. Any thoughts? > > Thx, > > -- > Skip Montanaro - skip at pobox.com - http://smontanaro.dyndns.org/ > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From hraban at fiee.net Mon Dec 1 19:34:37 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Mon, 1 Dec 2008 19:34:37 +0100 Subject: [Pythonmac-SIG] Creator, type and other means of file detection In-Reply-To: References: <6985726B-C53E-4B8F-950B-12B8486F0A77@fiee.net> Message-ID: <910E9FC2-54F3-43D8-BFC2-6AC01424FDC1@fiee.net> Am 2008-11-30 um 14:29 schrieb Karsten Wolf: >> If I use MacOS.GetCreatorAndType(filename) on my Intel machine, I >> get for an EPS: >> ('09HF', 'FSPE') > > Have you checked that with the tool GetFileInfo? I get those > reversed types/creators for some files on my PPC machine. I get the reversed types/creators for *all* files (if they got them at all) with MacOS.GetCreatorAndType. Thanks for the GFI hint - that tool gets it right: hraban$ GetFileInfo MontageA3.pdf file: "MontageA3.pdf" type: "PDF " creator: "CARO" attributes: avbstclinmedz created: 10/25/2006 15:07:28 modified: 10/25/2006 15:07:28 > Seems like some Apps write bogus type/creator fields. Don't know. Most modern apps don't use type/creator any more at all. >> That should read ('FH09', 'EPSF'). >> I didn't knew endian-ness affects the order of strings. >> Very funny! ;-) > > It isn't technically a string. More like UInt32. IIRC type/creator > are stored in big-endian order. Ok, but how can I convert those Ints to string? I get them as Ints also from UTGetOSTypeFromString: >>> from LaunchServices import UTGetOSTypeFromString >>> UTGetOSTypeFromString('public.jpeg') 1886741100 >> Anyway, the traditional MacOS type and creator would be a nice >> addition. The MacOS module is deprecated. I could ask the Finder >> via appscript, but I wonder if there's a more direct way - I'm >> surprised the mactypes module's Alias and File classes don't know >> type and creator. > > There are 2 ways I currently know of: > > - via LaunchServices > def get_mac_fileinfo(POSIXPathToFile): > import LaunchServices as LS > return LS.GetInfoForPath( POSIXPathToFile, LS.kLSRequestAllInfo) AttributeError: 'module' object has no attribute 'GetInfoForPath' Where did you find that function? I didn't find it in Apple's whole library. > - via a FSSpec which is deprecated since OS 10.4: > > def get_mac_fileinfo(POSIXPathToFile): > import Carbon.File as CF > finfo = CF.FSSpec( POSIXPathToFile ).FSpGetFInfo() > return finfo.Creator, finfo.Type, finfo.Flags, finfo.Fldr, > finfo.Location > > The FSRef of doing things would be via FSGetCatalogInfo. > Unfortunately the FSGetCatalogInfo structure omits the finderInfo > field. That works, but I'd prefer a "future proof" method. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From Chris.Barker at noaa.gov Mon Dec 1 19:41:06 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 01 Dec 2008 10:41:06 -0800 Subject: [Pythonmac-SIG] Can't convert simple Python script to bundle with py2app In-Reply-To: <18738.49542.390296.253608@montanaro-dyndns-org.local> References: <18736.516.677002.936180@montanaro-dyndns-org.local> <4932435D.8030007@noaa.gov> <18738.49542.390296.253608@montanaro-dyndns-org.local> Message-ID: <49342FC2.2020802@noaa.gov> skip at pobox.com wrote: > Hmmm... I just built a framework version. I configured like so: > > ../configure --enable-framework='/Users/skip/Applications' \ > --enable-shared --prefix='/Users/skip/local' \ > CPPFLAGS='-I/Users/skip/local/include -I/opt/local/include' \ > LDFLAGS='-L/Users/skip/local/lib -L/opt/local/lib' > > No .dylib file was created. maybe that was a red hearing. I just did a quick look on my system: $ locate libpython /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libpython.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libpython2.3.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libpython2.dylib /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/libpython2.5.a /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config/libpython2.6.a /usr/lib/libpython.dylib /usr/lib/libpython2.3.dylib /usr/lib/libpython2.dylib so it looks like things have changed some between 2.3 and 2.5. This is an OS-X 10.4 system, so 2.3 is apple's build. 2.5 and 2.6 are the python.org Framework builds. Is there a chance that your py2ap is getting confused about what python it is running in? > raise ValueError('%r does not exist' % (pathname,)) > ValueError: '/Users/skip/local/lib/libpython2.7.dylib' does not > exist You're building a 2.7? what is that? I thought Python was going from 2.6 to 3.0. -Chris -- 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 From skip.montanaro at gmail.com Mon Dec 1 19:49:56 2008 From: skip.montanaro at gmail.com (Skip Montanaro) Date: Mon, 1 Dec 2008 12:49:56 -0600 Subject: [Pythonmac-SIG] Can't convert simple Python script to bundle with py2app In-Reply-To: <49342FC2.2020802@noaa.gov> References: <18736.516.677002.936180@montanaro-dyndns-org.local> <4932435D.8030007@noaa.gov> <18738.49542.390296.253608@montanaro-dyndns-org.local> <49342FC2.2020802@noaa.gov> Message-ID: <60bb7ceb0812011049q635f63avd6836b29cba9f305@mail.gmail.com> > You're building a 2.7? what is that? I thought Python was going from 2.6 to > 3.0. Building from Subversion trunk identifies itself as 2.7a0. There will be a number of other 2.x versions released more-or-less in parallel with 3.y versions. Skip From janssen at parc.com Mon Dec 1 19:53:22 2008 From: janssen at parc.com (Bill Janssen) Date: Mon, 1 Dec 2008 10:53:22 PST Subject: [Pythonmac-SIG] Creator, type and other means of file detection In-Reply-To: <910E9FC2-54F3-43D8-BFC2-6AC01424FDC1@fiee.net> References: <6985726B-C53E-4B8F-950B-12B8486F0A77@fiee.net> <910E9FC2-54F3-43D8-BFC2-6AC01424FDC1@fiee.net> Message-ID: <897.1228157602@parc.com> Henning Hraban Ramm wrote: > >>> from LaunchServices import UTGetOSTypeFromString > >>> UTGetOSTypeFromString('public.jpeg') > 1886741100 >>> hex(1886741100) '0x7075626c' >>> chr(0x70), chr(0x75), chr(0x62), chr(0x6c) ('p', 'u', 'b', 'l') >>> Doesn't seem all that useful. Bill From hraban at fiee.net Mon Dec 1 20:26:24 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Mon, 1 Dec 2008 20:26:24 +0100 Subject: [Pythonmac-SIG] Creator, type and other means of file detection In-Reply-To: <20081201190228.GA5052@uiuc.edu> References: <6985726B-C53E-4B8F-950B-12B8486F0A77@fiee.net> <910E9FC2-54F3-43D8-BFC2-6AC01424FDC1@fiee.net> <20081201190228.GA5052@uiuc.edu> Message-ID: <5A2760C5-13BC-4991-B144-88AB15632401@fiee.net> Am 2008-12-01 um 20:02 schrieb Nicholas Riley: >>>> import LaunchServices >>>> LaunchServices.UTTypeCopyPreferredTagWithClass('public.jpeg', >>>> LaunchServices.kUTTagClassOSType) > u'JPEG' Thank you, that's something I might use. And probably LSFindApplicationForInfo, LSGetApplicationForItem and LSCopyApplicationForMIMEType, also from LaunchServices. (Might these method names perhaps be a little bit inconsistent?) Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From njriley at uiuc.edu Mon Dec 1 20:02:28 2008 From: njriley at uiuc.edu (Nicholas Riley) Date: Mon, 1 Dec 2008 13:02:28 -0600 Subject: [Pythonmac-SIG] Creator, type and other means of file detection In-Reply-To: <910E9FC2-54F3-43D8-BFC2-6AC01424FDC1@fiee.net> References: <6985726B-C53E-4B8F-950B-12B8486F0A77@fiee.net> <910E9FC2-54F3-43D8-BFC2-6AC01424FDC1@fiee.net> Message-ID: <20081201190228.GA5052@uiuc.edu> On Mon, Dec 01, 2008 at 07:34:37PM +0100, Henning Hraban Ramm wrote: > Ok, but how can I convert those Ints to string? > I get them as Ints also from UTGetOSTypeFromString: > > >>> from LaunchServices import UTGetOSTypeFromString > >>> UTGetOSTypeFromString('public.jpeg') > 1886741100 >>> from LaunchServices import UTGetOSTypeFromString >>> ostype = UTGetOSTypeFromString('public.jpeg') >>> ('%x' % ostype).decode('hex') 'publ' I don't think that is what you want though. Instead, use: >>> import LaunchServices >>> LaunchServices.UTTypeCopyPreferredTagWithClass('public.jpeg', LaunchServices.kUTTagClassOSType) u'JPEG' -- Nicholas Riley | From sbrew at yahoo.com Tue Dec 2 01:16:12 2008 From: sbrew at yahoo.com (Scot Brew) Date: Mon, 1 Dec 2008 16:16:12 -0800 (PST) Subject: [Pythonmac-SIG] App distribution with eggs In-Reply-To: <49246AB8.2040305@noaa.gov> References: <49246AB8.2040305@noaa.gov> Message-ID: <20783552.post@talk.nabble.com> Christopher Barker wrote: > > 2) py2app works OK with eggs, as longs as the eggs are not zipped. You > need to install them with: > Uncompressing the .egg works with py2app and MySQLdb. I had the same issue and was able to get py2app to correctly build the .app with MySQLdb after manually unzipping the MySQLdb .egg under site-packages. Instead of * MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg (as a binary .zip file) make a MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg directory and uncompress it 1) mv MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg MySQL_python-1.2.2-py2.5-macosx-10.3-fat.zip 2) mkdir MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg 3) mv MySQL_python-1.2.2-py2.5-macosx-10.3-fat.zip MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg 4) cd MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg 5) unzip MySQL_python-1.2.2-py2.5-macosx-10.3-fat.zip Re-run the py2app and it should pick up the MySQLdb module now as expected. Scot -- View this message in context: http://www.nabble.com/App-distribution-with-eggs-tp20569084p20783552.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From robin at alldunn.com Tue Dec 2 08:11:52 2008 From: robin at alldunn.com (Robin Dunn) Date: Mon, 01 Dec 2008 23:11:52 -0800 Subject: [Pythonmac-SIG] PyColourChooser don't works In-Reply-To: References: <492D6590.6070903@gmail.com> <0D913E0E-5A1A-4CF6-8D19-B53EEC35D526@strout.net> Message-ID: <4934DFB8.2040803@alldunn.com> Mariano Di Felice wrote: > Ok, but .... I cannot upgrade my wxpython version, and my object must > works... Any idea? Can I download only pycolourchooser module (from > where?) and replace my source? > http://svn.wxwidgets.org/viewvc/wx/wxPython/branches/WX_2_8_BRANCH/wx/lib/colourchooser/ -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From jeremy at jeremysanders.net Tue Dec 2 21:04:50 2008 From: jeremy at jeremysanders.net (Jeremy Sanders) Date: Tue, 2 Dec 2008 20:04:50 +0000 (GMT) Subject: [Pythonmac-SIG] py2app and PyQt4 In-Reply-To: <4926F294.5020802@noaa.gov> References: <4926EE02.3050409@noaa.gov> <4926F294.5020802@noaa.gov> Message-ID: On Fri, 21 Nov 2008, Christopher Barker wrote: > Jeremy Sanders wrote: >> Thanks for the reminder. Using the latest development version fixes the >> nasty uic issue - I only had to manually include the sip package. > > good to hear -- I wonder why the sip recipe didn't work? Any chance you > can figure it out and provide a patch? Sorry for the delay - it's because the sip recipe isn't being run because it's not included in the recipes __init__.py file. The recipe wasn't being run at all. However, just adding sip to the package list seemed to be enough to get my application working. I'm having an additional problem. One of my users is reporting that his Qt is being loaded at the same time as the packaged one. The error messages are: QObject::moveToThread: Current thread (0x269d8c0) is not the object's thread (0x1e45b0). Cannot move to target thread (0x1e45b0) On Mac OS X, you might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded. QObject::moveToThread: Current thread (0x269d8c0) is not the object's thread (0x1e45b0). Cannot move to target thread (0x1e45b0) Any idea what was causing this? The supplied app didn't have the proper sip recipe applied to it. Would this have stopped this problem? Thanks Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ Cambridge, UK Public Key Server PGP Key ID: E1AAE053 From janssen at parc.com Thu Dec 4 01:53:40 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 3 Dec 2008 16:53:40 PST Subject: [Pythonmac-SIG] using appscript to add a login item? Message-ID: <39627.1228352020@parc.com> I'm trying to add a login item in an installer, and I thought using appscript would be the simplest way. >>> from appscript import * >>> a = app("System Events") >>> a.login_items() Sure enough, a display of items. But how do I create a new one and add it? Bill From janssen at parc.com Thu Dec 4 02:03:39 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 3 Dec 2008 17:03:39 PST Subject: [Pythonmac-SIG] using appscript to add a login item? In-Reply-To: <39627.1228352020@parc.com> References: <39627.1228352020@parc.com> Message-ID: <39702.1228352619@parc.com> Bill Janssen wrote: > I'm trying to add a login item in an installer, and I thought using > appscript would be the simplest way. > > >>> from appscript import * > >>> a = app("System Events") > >>> a.login_items() > > Sure enough, a display of items. But how do I create a new one and add > it? > > Bill app("System Events").login_items.end.make( new=k.login_item, with_properties={ k.hidden: False, k.name: "UpLibJanitor", k.path: "/Applications/Utilities/UpLibJanitor.app" } ) From nad at acm.org Thu Dec 4 02:26:06 2008 From: nad at acm.org (Ned Deily) Date: Wed, 03 Dec 2008 17:26:06 -0800 Subject: [Pythonmac-SIG] using appscript to add a login item? References: <39627.1228352020@parc.com> Message-ID: In article <39627.1228352020 at parc.com>, Bill Janssen wrote: > I'm trying to add a login item in an installer, and I thought using > appscript would be the simplest way. > > >>> from appscript import * > >>> a = app("System Events") > >>> a.login_items() > > Sure enough, a display of items. But how do I create a new one and add > it? a.login_items.end.make(new=k.login_item, with_properties={k.path:"/Applications/TextEdit.app", k.hidden:True}) (Adapted and translated from the AppleScript here: ) -- Ned Deily, nad at acm.org From drew at getdropbox.com Thu Dec 4 02:04:29 2008 From: drew at getdropbox.com (Drew Houston) Date: Wed, 03 Dec 2008 17:04:29 -0800 Subject: [Pythonmac-SIG] using appscript to add a login item? In-Reply-To: <39627.1228352020@parc.com> References: <39627.1228352020@parc.com> Message-ID: <49372C9D.3000507@getdropbox.com> This bit of Applescript does it: tell application "System Events" to make new login item with properties { path: "/path/to/YourApp.app", hidden:false } at end Not 100% sure how that translates to appscript though. Drew Bill Janssen wrote: > I'm trying to add a login item in an installer, and I thought using > appscript would be the simplest way. > > >>>> from appscript import * >>>> a = app("System Events") >>>> a.login_items() >>>> > > Sure enough, a display of items. But how do I create a new one and add > it? > > Bill > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- Drew Houston CEO, Dropbox 617.697.6795 (m) From marcin at jewelmirror.com Wed Dec 10 23:19:05 2008 From: marcin at jewelmirror.com (Marcin Matuszkiewicz) Date: Wed, 10 Dec 2008 17:19:05 -0500 Subject: [Pythonmac-SIG] py2app wxpython different behavior Message-ID: <5c0e597a0812101419j406a038cu7779e9de2791095@mail.gmail.com> Windows get rendered differently if run the application using python or the Mac OS X app generated using py2app. Here are versions of tools I am using. python: 2.5.1 wxpython: 2.8.0 py2app: 0.3.6 I run py2applet AutoCorrDlg.py to generate the app. Any ideas when this is happening? Thanks. Here is the AutoCorrDlg.py code import wx ID_AUTOCORRDLG_ON_NEW_REPLACE = wx.NewId() ID_AUTOCORRDLG_ON_DELETE = wx.NewId() class AutoCorrDlg(wx.Dialog): def __init__( self, parent, ID, title='AutoCorr', size=(500, 500), pos=wx.DefaultPosition, style=wx.DEFAULT_DIALOG_STYLE): # Instead of calling wx.Dialog.__init__ we precreate the dialog # so we can set an extra style that must be set before # creation, and then we create the GUI dialog using the Create # method. #pre = wx.PreDialog() #pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP) #pre.Create(parent, ID, title, pos, size, style) # This next step is the most important, it turns this Python # object into the real wrapper of the dialog (instead of pre) # as far as the wxPython extension is concerned. #self.PostCreate(pre) wx.Dialog.__init__(self, id=ID, name=u'AutoCorrDlg', parent=parent, size=size, style=style, title=title) # Now continue with the normal construction of the dialog # contents self.init_ctrls(parent) self.InitFindReplaceUI() def init_ctrls(self, parent): self.ReplaceLabel = wx.StaticText(self, -1, 'Replace') self.WithLabel = wx.StaticText(self, -1, 'With') self.ReplaceTextCtrl = wx.TextCtrl(self, -1) self.WithTextCtrl = wx.TextCtrl(self, -1) self.NewReplaceButton = wx.Button(self, ID_AUTOCORRDLG_ON_NEW_REPLACE, 'New') self.ReplaceWithListCtrl = wx.ListCtrl(self, -1, size=(100, 350), style= wx.LC_REPORT | wx.LC_NO_HEADER | wx.LC_SINGLE_SEL | wx.BORDER_SUNKEN) self.DeleteButton = wx.Button(self, ID_AUTOCORRDLG_ON_DELETE, 'Delete') self.EnableCheckBox = wx.CheckBox(self, -1, 'Enable Autocorrect') # Disable buttons self.NewReplaceButton.Disable() self.DeleteButton.Disable() # resize of the windows if wx.Platform == '__WXGTK__': # Initiize size of TextCtrl under gtk is not very nice so resize lets resize them size = self.WithTextCtrl.GetSize() size[0] = 120 self.ReplaceTextCtrl.SetInitialSize(size) size[0] = 250 self.WithTextCtrl.SetInitialSize(size) else: size = self.WithTextCtrl.GetSize() size[0] *= 2.5 self.WithTextCtrl.SetInitialSize(size) gbs = wx.GridBagSizer(5,3) row = 0 gbs.Add(self.ReplaceLabel, (row,0), wx.DefaultSpan, wx.TOP | wx.LEFT, 10) gbs.Add(self.WithLabel, (row,1), wx.DefaultSpan, wx.TOP | wx.LEFT, 10) row += 1 gbs.Add(self.ReplaceTextCtrl, (row, 0), wx.DefaultSpan, wx.TOP | wx.LEFT, 10) gbs.Add(self.WithTextCtrl, (row, 1), wx.DefaultSpan, wx.TOP | wx.LEFT, 10) gbs.Add(self.NewReplaceButton, (row, 2), wx.DefaultSpan, wx.TOP | wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER, 10) row += 1 gbs.Add(self.ReplaceWithListCtrl, (row,0), (1,2), wx.TOP | wx.LEFT | wx.EXPAND, 10) gbs.Add(self.DeleteButton, (row, 2), wx.DefaultSpan, wx.TOP | wx.LEFT | wx. RIGHT | wx.ALIGN_CENTER, 10) row += 1 gbs.Add(self.EnableCheckBox, (row, 0), (1,2), wx.TOP | wx.LEFT, 10) row += 1 self.OkButton = wx.Button(self, wx.ID_OK) self.OkButton.SetDefault() btnsizer = wx.StdDialogButtonSizer() btnsizer.Add(self.OkButton) btnsizer.Realize() gbs.Add(btnsizer, (row, 0), (1, 3), wx.ALIGN_RIGHT | wx.ALL, 10) self.SetSizer(gbs) self.Fit() def InitFindReplaceUI(self): findWidth = self.ReplaceTextCtrl.GetSize()[0]+10 self.ReplaceWithListCtrl.InsertColumn(0, "Replace", width = findWidth) self.ReplaceWithListCtrl.InsertColumn(1, "With") app = wx.PySimpleApp() dlg = AutoCorrDlg(None, -1) dlg.ShowModal() dlg.Destroy() app.MainLoop() -------------- next part -------------- An HTML attachment was scrubbed... URL: From conan at warp.byu.edu Fri Dec 12 08:30:35 2008 From: conan at warp.byu.edu (Conan C. Albrecht) Date: Fri, 12 Dec 2008 00:30:35 -0700 Subject: [Pythonmac-SIG] Appscript Message-ID: <07EEE89A-AD88-4B95-B818-D879D834E916@warp.byu.edu> I'm using appscript to script Word and BibDesk. I need to run the script from the "Scripts" menu in one of these programs. However, my .py script won't show up on their menus, even if the script is in the right directory. The python script will show up on the system- wide scripts menu, but not on an application's menu. I changed the file extension to .scpt, and it still won't show up. To fix this, I added a simple AppleScript to the same (scripts) directory. I've included this at the bottom, if it helps. So the AppleScript runs first, then it calls "do shell script" to run the Python program. My problem is that the script can't call any GUI functions, such as the following: import osax sa = osax.OSAX() # allows use of standard additions (like display dialog) sa.display_dialog("Hi world") If I run from the command line, the dialog shows up fine. If I run from within Word or BibDesk, the dialog doesn't show up at all. I think it is because "do shell script" runs it in an invisible shell that can't access the main GUI. So the dialog comes up, but is not visible to the user. The calling application (Word or BibDesk) freezes since the dialog is "up" but can't be responded to by the user. Is there a better way to do this? How can I run Python scripts from the Scripts menu in a program? Thanks in advance. ================================= -- Get this script's directory and name tell application "Finder" to (path to me) as Unicode text set scriptname to POSIX path of result -- Remove the .scpt extension, and append .py instead set AppleScript's text item delimiters to {".scpt"} set textItems to text items of scriptname set AppleScript's text item delimiters to {""} set scriptname to textItems as string set scriptname to scriptname & ".py" -- Run the script do shell script "python '" & scriptname & "'" =================================== ____________________________________ Conan C. Albrecht, Ph.D. Information Systems Department Brigham Young University Email: conan at warp.byu.edu Phone: +1-801-805-1615 Web/Blog: http://warp.byu.edu/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2727 bytes Desc: not available URL: From robin at alldunn.com Fri Dec 12 19:48:08 2008 From: robin at alldunn.com (Robin Dunn) Date: Fri, 12 Dec 2008 10:48:08 -0800 Subject: [Pythonmac-SIG] py2app wxpython different behavior In-Reply-To: <5c0e597a0812101419j406a038cu7779e9de2791095@mail.gmail.com> References: <5c0e597a0812101419j406a038cu7779e9de2791095@mail.gmail.com> Message-ID: <4942B1E8.4070405@alldunn.com> Marcin Matuszkiewicz wrote: > Windows get rendered differently if run the application using python or > the Mac OS X app generated using py2app. Here are versions of tools I > am using. > python: 2.5.1 > wxpython: 2.8.0 > py2app: 0.3.6 > > I run py2applet AutoCorrDlg.py to generate the app. > > Any ideas when this is happening? Thanks. Please give us more details about what is rendered differently, what it looks like in each case, etc. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From hengist.podd at virgin.net Fri Dec 12 22:58:29 2008 From: hengist.podd at virgin.net (has) Date: Fri, 12 Dec 2008 21:58:29 +0000 Subject: [Pythonmac-SIG] Appscript In-Reply-To: References: Message-ID: <438AD3AC-BB8F-4EA7-8C45-26B7F3141021@virgin.net> Conan C. Albrecht wrote: > I'm using appscript to script Word and BibDesk. I need to run the > script from the "Scripts" menu in one of these programs. However, > my .py script won't show up on their menus, even if the script is in > the right directory. I assume you're referring to BibDesk. I'm not familiar with it, but as far as I can tell it uses the OSA API to run scripts from its script menu. This means that it can only run scripts written in OSA languages. In theory, you can turn any scripting language into an OSA component; in practice, packaging most popular interpreters as OSA components is a complete PITA due to design shortcomings in both. With Python, you have two very limited options: - Philip Aker's PythonOSA component, which provides basic OSA support only (load/compile/run/store). It has no Apple event integration, so while PythonOSA scripts can use appscript to control other applications, it can't send or receive events to/from the process running the script, greatly limiting its usefulness. - My PyOSA component, which supports the majority of the OSA API, including sending and receiving events. It is developer-release- quality only and no longer under development (I've stopped working on it due to the limitations of the CPython interpreter that make it less than ideal for in-process use). Unsupported; use entirely at own risk, etc. > The python script will show up on the system-wide scripts menu, but > not on an application's menu. The system-wide scripts menu supports both OSA and shell scripts. > To fix this, I added a simple AppleScript to the same (scripts) > directory. I've included this at the bottom, if it helps. So the > AppleScript runs first, then it calls "do shell script" to run the > Python program. My problem is that the script can't call any GUI > functions, such as the following: > > import osax > sa = osax.OSAX() # allows use of standard additions (like display > dialog) > sa.display_dialog("Hi world") > > If I run from the command line, the dialog shows up fine. If I run > from within Word or BibDesk, the dialog doesn't show up at all. - Try calling sa.activate() to bring the Python process frontmost before telling it to display the dialog. - If you are using Python 2.3, make sure you run the script with pythonw, not python (which can only perform GUI operations on Python 2.4 and later). - If your Python script is sending commands back to the application that's running the AppleScript, you will need to detach the Python process so that the AppleScript can immediately return control to the host application without waiting for the Python script to complete. Otherwise the AppleScript will block the application's main event loop, preventing the application handling events from the Python process and deadlocking everything until the event times out. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From hengist.podd at virgin.net Sat Dec 13 00:27:55 2008 From: hengist.podd at virgin.net (has) Date: Fri, 12 Dec 2008 23:27:55 +0000 Subject: [Pythonmac-SIG] LOLpatents Message-ID: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> Hey folks, Look what I ran across today: http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.html&r=1&p=1&f=G&l=50&d=PG01&S1=%28scripting+AND+bridge%29.TTL.&OS=ttl/(scripting+and+bridge)&RS=TTL/(scripting+AND+bridge) Still making my own mind up if I should be worried or amused by it. Not being familiar with the US patent system though, I'm curious if anyone else has any thoughts. Do companies like Apple automatically file patents on everything they write, regardless of whether or not it's actually novel [1] or even correct [2]? How concerned should third-party developers of very similar products (e.g. me) be? Does the US patent office check for prior art themselves before deciding if an application is patent-worthy, or is it contingent on the patent submitter and/or general public to provide examples or prior art? (And if the latter, how is it done?) Cheers, has [1] e.g. The number of original concepts in Scripting Bridge - or appscript, for that matter - wouldn't fill the back of a postage stamp. Between Frontier, Mac::Glue, gensuitemodule, JavaScriptOSA, aeve, appscript and any other AE bridges I've forgotten, not to mention the myriad ORM bridges out there that do similar things, I think the territory is pretty well covered. The only noticeably new wrinkle that I can think of in SB is its selective automatic dispatching of 'get' events as determined by what the reference is pointing at (an object attribute vs. a one-to-one/one-to-many relationship), although that might've appeared first in RubyOSA. [2] The bit about SB performing significantly better than prior art is BS. ObjC appscript has pretty much the same performance characteristics when building and sending events and unpacking replies. And all appscript implementations are faster at creating application objects - significantly so in the case of large, complex applications such as InDesign (15 sec for SB [3] vs 0.2 sec for py- appscript the last time I checked). [3] Via Python+PyObjC as sdp just puked when I tried to create an InDesign.h header so I could try it in ObjC. -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From conan at warp.byu.edu Sat Dec 13 00:41:12 2008 From: conan at warp.byu.edu (Conan C. Albrecht) Date: Fri, 12 Dec 2008 16:41:12 -0700 Subject: [Pythonmac-SIG] LOLpatents In-Reply-To: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> References: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> Message-ID: <20C3E40B-F0C5-46F7-92B6-404FA1403595@warp.byu.edu> IANAL, but in my watching of open source projects for many years, if you have prior work to the patent, you're fine. If they decide to sue you, you can just show that your project predates the patent. This one was filed in 2007, so I think things like appscript are fine. (does appscript predate June 8, 2007?) Again, I'm not a lawyer. When it comes to software patents, 99 percent of them are bunk. I agree that patents are necessary to let new ideas flourish, but the concept has gone way too far. And especially so in computers. People should get 2-3 years on any patent to give them time to move ahead of the competition. After that, it should be fair game. Check out this web site on the topic: http://www.linuxfoundation.org/en/Osapa ____________________________________ Conan C. Albrecht, Ph.D. Information Systems Department Brigham Young University Email: conan at warp.byu.edu Phone: +1-801-805-1615 Web/Blog: http://warp.byu.edu/ On Dec 12, 2008, at 16:27, has wrote: > Hey folks, > > Look what I ran across today: > > http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.html&r=1&p=1&f=G&l=50&d=PG01&S1=%28scripting+AND+bridge%29.TTL.&OS=ttl/(scripting+and+bridge)&RS=TTL/(scripting+AND+bridge) > > Still making my own mind up if I should be worried or amused by it. > Not being familiar with the US patent system though, I'm curious if > anyone else has any thoughts. > > Do companies like Apple automatically file patents on everything > they write, regardless of whether or not it's actually novel [1] or > even correct [2]? > > How concerned should third-party developers of very similar products > (e.g. me) be? > > Does the US patent office check for prior art themselves before > deciding if an application is patent-worthy, or is it contingent on > the patent submitter and/or general public to provide examples or > prior art? (And if the latter, how is it done?) > > > Cheers, > > has > > > [1] e.g. The number of original concepts in Scripting Bridge - or > appscript, for that matter - wouldn't fill the back of a postage > stamp. Between Frontier, Mac::Glue, gensuitemodule, JavaScriptOSA, > aeve, appscript and any other AE bridges I've forgotten, not to > mention the myriad ORM bridges out there that do similar things, I > think the territory is pretty well covered. The only noticeably new > wrinkle that I can think of in SB is its selective automatic > dispatching of 'get' events as determined by what the reference is > pointing at (an object attribute vs. a one-to-one/one-to-many > relationship), although that might've appeared first in RubyOSA. > > [2] The bit about SB performing significantly better than prior art > is BS. ObjC appscript has pretty much the same performance > characteristics when building and sending events and unpacking > replies. And all appscript implementations are faster at creating > application objects - significantly so in the case of large, complex > applications such as InDesign (15 sec for SB [3] vs 0.2 sec for py- > appscript the last time I checked). > > [3] Via Python+PyObjC as sdp just puked when I tried to create an > InDesign.h header so I could try it in ObjC. > > -- > Control AppleScriptable applications from Python, Ruby and ObjC: > http://appscript.sourceforge.net > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2727 bytes Desc: not available URL: From hraban at fiee.net Sat Dec 13 13:00:55 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sat, 13 Dec 2008 13:00:55 +0100 Subject: [Pythonmac-SIG] LOLpatents In-Reply-To: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> References: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> Message-ID: <20C2137B-6346-4CB4-8DF8-CCF90C17322F@fiee.net> Am 2008-12-13 um 00:27 schrieb has: > Look what I ran across today: > > http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.html&r=1&p=1&f=G&l=50&d=PG01&S1=%28scripting+AND+bridge%29.TTL.&OS=ttl/(scripting+and+bridge)&RS=TTL/(scripting+AND+bridge) I find especially appropriate that Apple's patent lawyers go by the name of "RAUBVOGEL LAW OFFICE" - "Raubvogel" is German and means "bird of prey". "Aasgeier" (vulture) would be even more appropriate for any patent lawyers... Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From hengist.podd at virgin.net Sat Dec 13 19:32:50 2008 From: hengist.podd at virgin.net (has) Date: Sat, 13 Dec 2008 18:32:50 +0000 Subject: [Pythonmac-SIG] LOLpatents In-Reply-To: <20C3E40B-F0C5-46F7-92B6-404FA1403595@warp.byu.edu> References: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> <20C3E40B-F0C5-46F7-92B6-404FA1403595@warp.byu.edu> Message-ID: <31FBEE5B-7453-46F1-8AC2-5A9B0EF17DC8@virgin.net> On 12 Dec 2008, at 23:41, Conan C. Albrecht wrote: > IANAL, but in my watching of open source projects for many years, if > you have prior work to the patent, you're fine. If they decide to > sue you, you can just show that your project predates the patent. > This one was filed in 2007, so I think things like appscript are > fine. (does appscript predate June 8, 2007?) Again, I'm not a > lawyer. Don't worry, IANAL either.:) Anyway, appscript first appeared in 2003. Ditto aeve, which also used SB-style dynamic class creation to build its API. Come to think of it, Apple's open-source RubyOSA project pretty much copies SB's approach throughout, even down to its semi- automatic 'implicit get' mechanism. Given that RubyOSA was originally released in summer 2006 I wonder if it also counts as invalidating prior art? I guess the next questions are: - The link I found appears to be for a patent application rather than an awarded patent. (I found the direct link first, but subsequently went to the site's search page and searched for it under both applications and awards, and found it again under the former.) Have I understood the uspto.gov website correctly? (It is not the easiest thing to follow.) - If it is only an application, and not yet awarded, does its appearance on the site mean its currently up for consideration, and if it is how long does that take? - Should I pt together a bunch of prior art and send it off to the USPTO before it stops being a application and starts being awarded? > When it comes to software patents, 99 percent of them are bunk. I > agree that patents are necessary to let new ideas flourish, but the > concept has gone way too far. And especially so in computers. > People should get 2-3 years on any patent to give them time to move > ahead of the competition. After that, it should be fair game. Totally agree. FWIW, I don't for a moment suspect malicious intent in Apple's filing of this application; may be habitual (everyone does it), may be opportunism (holding lots of patents looks good to investors), may be to prevent patent trolls filing a similar claim and suing them first; may be any number of reasons. All the same, it's the first time I've found myself and m work in such a position and it makes me distinctly uncomfortable. I also have appscript's users - including my own employer - to consider. Patents don't need to be enforced to have a chilling effect (e.g. watch Microsoft claiming that Linux infringes its patents while refusing to specify which ones). OTOH, it may just be that my neuroses are kicking in, and I just need to relax and not worry so much. > Check out this web site on the topic: http://www.linuxfoundation.org/en/Osapa That looks useful - will do. Many thanks, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From Jack.Jansen at cwi.nl Sun Dec 14 00:15:37 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sun, 14 Dec 2008 00:15:37 +0100 Subject: [Pythonmac-SIG] LOLpatents In-Reply-To: <31FBEE5B-7453-46F1-8AC2-5A9B0EF17DC8@virgin.net> References: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> <20C3E40B-F0C5-46F7-92B6-404FA1403595@warp.byu.edu> <31FBEE5B-7453-46F1-8AC2-5A9B0EF17DC8@virgin.net> Message-ID: <929D581B-B3C7-4E47-85B2-39821B8F1E67@cwi.nl> On 13-Dec-2008, at 19:32 , has wrote: > > On 12 Dec 2008, at 23:41, Conan C. Albrecht wrote: > >> IANAL, but in my watching of open source projects for many years, >> if you have prior work to the patent, you're fine. If they decide >> to sue you, you can just show that your project predates the >> patent. This one was filed in 2007, so I think things like >> appscript are fine. (does appscript predate June 8, 2007?) Again, >> I'm not a lawyer. > > Don't worry, IANAL either.:) Anyway, appscript first appeared in > 2003. Ditto aeve, which also used SB-style dynamic class creation to > build its API. Come to think of it, Apple's open-source RubyOSA > project pretty much copies SB's approach throughout, even down to > its semi-automatic 'implicit get' mechanism. Given that RubyOSA was > originally released in summer 2006 I wonder if it also counts as > invalidating prior art? Don't forget the original MacPython applescript interfaces. Created by Guido and me between 1996 and 2000, if I remember correctly. I think the various other non-Applescript OSA implementations (what was the name of that database-like package again?) don't count as prior art for this patent because of the "automatically build glue classes" clause, but the original MacPython OSA interfaces definitely did that. So, we have lots of validating prior art available. Question is: (a) is it worth the time/effort to fight this patent, and (b) if it is, when is the best time to do so. I know some people who have been involved in patent fights, I will ask around. Could other people share their insights too, and/or ask around? Hmm, one of the inventors is our old friend Bill Bumgarner. Bill, are you still on the list? Can you say anything about this patent? -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamish at gmail.com Sun Dec 14 00:28:00 2008 From: hamish at gmail.com (Hamish Allan) Date: Sat, 13 Dec 2008 23:28:00 +0000 Subject: [Pythonmac-SIG] LOLpatents In-Reply-To: <929D581B-B3C7-4E47-85B2-39821B8F1E67@cwi.nl> References: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> <20C3E40B-F0C5-46F7-92B6-404FA1403595@warp.byu.edu> <31FBEE5B-7453-46F1-8AC2-5A9B0EF17DC8@virgin.net> <929D581B-B3C7-4E47-85B2-39821B8F1E67@cwi.nl> Message-ID: <597e7edb0812131528r5476181eqf6a0b74cdb05b98f@mail.gmail.com> On Sat, Dec 13, 2008 at 11:15 PM, Jack Jansen wrote: > Could other people share their insights too, and/or ask around? Intuitively (to me) the best time to fight would be the least expensive, which is before the fight gets into the domain of lawyers, which means before the patent is granted, which suggests that sending the prior art to the patent office now would be a good course of action. IANAL, Hamish From njriley at uiuc.edu Sun Dec 14 00:39:57 2008 From: njriley at uiuc.edu (Nicholas Riley) Date: Sat, 13 Dec 2008 17:39:57 -0600 Subject: [Pythonmac-SIG] LOLpatents In-Reply-To: <929D581B-B3C7-4E47-85B2-39821B8F1E67@cwi.nl> References: <59F80776-CDCF-4B5E-87C7-56286FCA7B1E@virgin.net> <20C3E40B-F0C5-46F7-92B6-404FA1403595@warp.byu.edu> <31FBEE5B-7453-46F1-8AC2-5A9B0EF17DC8@virgin.net> <929D581B-B3C7-4E47-85B2-39821B8F1E67@cwi.nl> Message-ID: <20081213233957.GA4463@uiuc.edu> On Sun, Dec 14, 2008 at 12:15:37AM +0100, Jack Jansen wrote: > I think the various other non-Applescript OSA implementations (what > was the name of that database-like package again?) don't count as > prior art for this patent because of the "automatically build glue > classes" clause, but the original MacPython OSA interfaces definitely > did that. Frontier and its derivatives semi-automatically built glue scripts (and mappings from names to constants, etc.), which it stored statically in the object database. Sometimes the glue scripts didn't work properly out of the box and you had to edit them manually. There's some discussion of the process here: All that code is open-source now, for example the 'aete' parser is here: Code from an earlier time. How I miss Frontier... -- Nicholas Riley | From rodneys at io.com Sun Dec 14 16:16:00 2008 From: rodneys at io.com (Rodney Somerstein) Date: Sun, 14 Dec 2008 10:16:00 -0500 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? Message-ID: Given the recent release of Python 3.0, I've been surprised to see no mention of a Mac release of this. Is anyone working on an official release? If so, is there an expected release date? Thanks, -Rodney From conan at warp.byu.edu Sun Dec 14 16:36:23 2008 From: conan at warp.byu.edu (Conan C. Albrecht) Date: Sun, 14 Dec 2008 08:36:23 -0700 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: References: Message-ID: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> I was surprised at the lack of a Mac build as well. I think the reason is that there are few libraries available for 3.0 right now. For example, it will be some time before wxPython, the various database drivers, and other popular add-ons will be updated to the 3.0 syntax. I installed Py3 for Mac, but there isn't a lot I can do with it yet. I think many are in this camp. If you want to install it now (like many of us have), here's a good page about how to compile it. It's pretty easy. http://farmdev.com/thoughts/66/python-3-0-on-mac-os-x-alongside-2-6-2-5-etc-/ I have no idea when the .dmg download will be available. ____________________________________ Conan C. Albrecht, Ph.D. Information Systems Department Brigham Young University Email: conan at warp.byu.edu Phone: +1-801-805-1615 Web/Blog: http://warp.byu.edu/ On Dec 14, 2008, at 08:16, Rodney Somerstein wrote: > Given the recent release of Python 3.0, I've been surprised to see > no mention of a Mac release of this. Is anyone working on an > official release? If so, is there an expected release date? > > Thanks, > > -Rodney > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2727 bytes Desc: not available URL: From kw at codebykevin.com Sun Dec 14 17:36:19 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Sun, 14 Dec 2008 11:36:19 -0500 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> Message-ID: <49453603.1010901@codebykevin.com> Conan C. Albrecht wrote: > I was surprised at the lack of a Mac build as well. I think the reason > is that there are few libraries available for 3.0 right now. For > example, it will be some time before wxPython, the various database > drivers, and other popular add-ons will be updated to the 3.0 syntax. I > installed Py3 for Mac, but there isn't a lot I can do with it yet. I > think many are in this camp. > > If you want to install it now (like many of us have), here's a good page > about how to compile it. It's pretty easy. > > http://farmdev.com/thoughts/66/python-3-0-on-mac-os-x-alongside-2-6-2-5-etc-/ > > > I have no idea when the .dmg download will be available. Not only is there no binary installer for 3.0, there is no binary installer for 2.6.1. And the previous installer for 2.6.0 had a serious bug in it: http://bugs.python.org/issue4017 I'm curious who maintains the Mac builds of Python these days. It's not hard to build from source, of course, and that's what I do...but the binary installer is convenient for many people. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From nicholas.cole at gmail.com Mon Dec 15 14:57:20 2008 From: nicholas.cole at gmail.com (Nicholas Cole) Date: Mon, 15 Dec 2008 13:57:20 +0000 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: <49453603.1010901@codebykevin.com> References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> Message-ID: On Sun, Dec 14, 2008 at 4:36 PM, Kevin Walzer wrote: > I'm curious who maintains the Mac builds of Python these days. It's not hard > to build from source, of course, and that's what I do...but the binary > installer is convenient for many people. I want to install 3.0 to experiment with all the new features, but I don't want to do anything horrible to my default Leopard install, and I'd like to be able to remove 3.0 easily. What's the most sensible way of doing this? Setting a --prefix of /opt/python3.0 , for example, or just using the default prefix and using make altinstall? What are others doing? N From kw at codebykevin.com Mon Dec 15 15:44:14 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 15 Dec 2008 09:44:14 -0500 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> Message-ID: <49466D3E.7000003@codebykevin.com> Nicholas Cole wrote: > On Sun, Dec 14, 2008 at 4:36 PM, Kevin Walzer wrote: > >> I'm curious who maintains the Mac builds of Python these days. It's not hard >> to build from source, of course, and that's what I do...but the binary >> installer is convenient for many people. > > I want to install 3.0 to experiment with all the new features, but I > don't want to do anything horrible to my default Leopard install, and > I'd like to be able to remove 3.0 easily. What's the most sensible > way of doing this? Setting a --prefix of /opt/python3.0 , for > example, or just using the default prefix and using make altinstall? > > What are others doing? > > N > > I tend to use one Python at at time so I don't mess up my installation, so I can't offer much advice. You might want to try installing Python 3.0 from MacPorts--that would be completely sandboxed away from your main installation. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From mankoff at gmail.com Mon Dec 15 15:53:08 2008 From: mankoff at gmail.com (Ken Mankoff) Date: Mon, 15 Dec 2008 09:53:08 -0500 (EST) Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> Message-ID: On Mon, 15 Dec 2008, Nicholas Cole wrote: > On Sun, Dec 14, 2008 at 4:36 PM, Kevin Walzer > wrote: > >> I'm curious who maintains the Mac builds of Python these days. >> It's not hard to build from source, of course, and that's what I >> do...but the binary installer is convenient for many people. > > I want to install 3.0 to experiment with all the new features, but > I don't want to do anything horrible to my default Leopard > install, and I'd like to be able to remove 3.0 easily. What's the > most sensible way of doing this? Setting a --prefix of > /opt/python3.0 , for example, or just using the default prefix and > using make altinstall? > > What are others doing? I've had success with multiple python installs setting a custom --prefix. I wrote what I did here: http://spacebit.org/2008/10/26/python-and-wxpython -k. From ponton.leo at gmail.com Mon Dec 15 16:38:03 2008 From: ponton.leo at gmail.com (Leo) Date: Mon, 15 Dec 2008 16:38:03 +0100 Subject: [Pythonmac-SIG] mysql for leopard Message-ID: Is there an easy solution to installing the mysql driver on Leopard? I'm new to Python and I'm trying to setup Django. I have MAMP installed - I'm a PHP/CakePHP user. I'm also relatively new to Macs. I'm trying to avoid downloading the Xcode package from Apple as my connection is volume limited. Nor do I particularly want to start making / building with gcc as I have found it to be a frustrating business that usually leaves me looking for a compiled alternative (I have a lot of experience with unix and Linux). Surely someone must have built a ppc module and made it available? From conan at warp.byu.edu Mon Dec 15 16:50:59 2008 From: conan at warp.byu.edu (Conan C. Albrecht) Date: Mon, 15 Dec 2008 08:50:59 -0700 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> Message-ID: <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> It's easy to have two or three Python installations. They all sit in different directories and don't mess with each other. The trick is to symlink the one you want to use in /usr/local/bin. You can actually look at where they are linked by typing "ls -l /usr/ local/bin/python*" at the terminal. To change the link, type: sudo ln -sf /Library/Frameworks/Python.framework/Versions/3.0/bin/ python3.0 /usr/local/bin/python The above line will make 3.0 your standard python installation. It's just a link, so you can do this as many times as you want to change to a different version. ____________________________________ Conan C. Albrecht, Ph.D. Information Systems Department Brigham Young University Email: conan at warp.byu.edu Phone: +1-801-805-1615 Web/Blog: http://warp.byu.edu/ On Dec 15, 2008, at 07:53, Ken Mankoff wrote: > On Mon, 15 Dec 2008, Nicholas Cole wrote: > >> On Sun, Dec 14, 2008 at 4:36 PM, Kevin Walzer >> wrote: >> >>> I'm curious who maintains the Mac builds of Python these days. >>> It's not hard to build from source, of course, and that's what I >>> do...but the binary installer is convenient for many people. >> >> I want to install 3.0 to experiment with all the new features, but >> I don't want to do anything horrible to my default Leopard install, >> and I'd like to be able to remove 3.0 easily. What's the most >> sensible way of doing this? Setting a --prefix of /opt/python3.0 , >> for example, or just using the default prefix and using make >> altinstall? >> >> What are others doing? > > I've had success with multiple python installs setting a custom -- > prefix. I wrote what I did here: > http://spacebit.org/2008/10/26/python-and-wxpython > > -k. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2727 bytes Desc: not available URL: From mankoff at gmail.com Mon Dec 15 16:54:59 2008 From: mankoff at gmail.com (Ken Mankoff) Date: Mon, 15 Dec 2008 10:54:59 -0500 (EST) Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> Message-ID: My technique is to not change the file system at all. I use PATH: export PATH=/opt/python/2.5.2/Framework/Python.framework/Versions/2.5/bin/python:$PATH And then invoke with #!/usr/bin/env python And now multiple people on the same system can use multiple versions, or I can have one Terminal.app window using one version and another using another version for testing. -k. On Mon, 15 Dec 2008, Conan C. Albrecht wrote: > It's easy to have two or three Python installations. They all sit in > different directories and don't mess with each other. > > The trick is to symlink the one you want to use in /usr/local/bin. You can > actually look at where they are linked by typing "ls -l > /usr/local/bin/python*" at the terminal. > > To change the link, type: > > sudo ln -sf /Library/Frameworks/Python.framework/Versions/3.0/bin/python3.0 > /usr/local/bin/python > > The above line will make 3.0 your standard python installation. It's just a > link, so you can do this as many times as you want to change to a different > version. > > ____________________________________ > Conan C. Albrecht, Ph.D. > Information Systems Department > Brigham Young University > Email: conan at warp.byu.edu > Phone: +1-801-805-1615 > Web/Blog: http://warp.byu.edu/ > > On Dec 15, 2008, at 07:53, Ken Mankoff wrote: > >> On Mon, 15 Dec 2008, Nicholas Cole wrote: >> >>> On Sun, Dec 14, 2008 at 4:36 PM, Kevin Walzer wrote: >>> >>>> I'm curious who maintains the Mac builds of Python these days. It's not >>>> hard to build from source, of course, and that's what I do...but the >>>> binary installer is convenient for many people. >>> >>> I want to install 3.0 to experiment with all the new features, but I don't >>> want to do anything horrible to my default Leopard install, and I'd like >>> to be able to remove 3.0 easily. What's the most sensible way of doing >>> this? Setting a --prefix of /opt/python3.0 , for example, or just using >>> the default prefix and using make altinstall? >>> >>> What are others doing? >> >> I've had success with multiple python installs setting a custom --prefix. I >> wrote what I did here: >> http://spacebit.org/2008/10/26/python-and-wxpython >> >> -k. >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > From JKelly at vectorworks.net Mon Dec 15 17:25:09 2008 From: JKelly at vectorworks.net (James Kelly) Date: Mon, 15 Dec 2008 11:25:09 -0500 Subject: [Pythonmac-SIG] py2app on UDF DVD Message-ID: Hello All, We usually place our py2app created app bundles on DVD using toast's hybrid Mac and PC file-system setting. This works pretty well for us. Unfortunately we have a need to place the same app bundle on a UDF DVD. While this works great in testing, it seems the Bundle.app/Contents/Resources/lib/site.py sym-link that points to Bundle.app/Contents/Resources/site.py is broken when burning with toast. I haven't verified this myself, but I'm told when using an unspecified Windows burning tool that the symlink is replaced with the actual file (so there is an actual physical site.py in both of those directories. As I said, this seems to work anyway in testing (in both cases, the case where the sym-link is broken and where the file is replicated), but I'd like to be a little more informed about what's going on here and how important this sym-link is before I allow it to be distributed around. So my questions are: (1) Is this something I should be worried about? (2) Under what circumstances is the site.py in lib executed? Thanks! Jim P.S. - Some stats that may or may not be relevant to answering the question: Python 2.5 py2app 0.4.2 Toast 7.1 We always build on 10.4, target 10.4, 10.5, and are testing on 10.6 as well. From dav at alum.mit.edu Mon Dec 15 18:15:12 2008 From: dav at alum.mit.edu (Dav Clark) Date: Mon, 15 Dec 2008 09:15:12 -0800 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> Message-ID: On Dec 15, 2008, at 7:50 AM, Conan C. Albrecht wrote: > It's easy to have two or three Python installations. They all sit > in different directories and don't mess with each other. Not entirely true. For example, anything that compiles against python with a bare "-framework Python" flag will grab the (I think) Current dir from /Library/Frameworks/Python.framework/Versions This is fine if you are just playing with user-installed builds, but will mask your system python and prevent you from installing such libs to it. One such example is VTK, which has a horrendously complicated build system. You can specify your system python in three separate places, and still it will link against the user-installed one! But, if you're not doing anything "crazy," you're probably fine. The only example I've found so far is the VTK bindings. I've tried filing that as a bug with VTK twice now and failed, BTW. Cheers, Dav From nad at acm.org Mon Dec 15 22:09:35 2008 From: nad at acm.org (Ned Deily) Date: Mon, 15 Dec 2008 13:09:35 -0800 Subject: [Pythonmac-SIG] py2app on UDF DVD References: Message-ID: In article , James Kelly wrote: > We usually place our py2app created app bundles on DVD using toast's hybrid > Mac and PC file-system setting. This works pretty well for us. > Unfortunately we have a need to place the same app bundle on a UDF DVD. > While this works great in testing, it seems the > Bundle.app/Contents/Resources/lib/site.py sym-link that points to > Bundle.app/Contents/Resources/site.py is broken when burning with toast. > > I haven't verified this myself, but I'm told when using an unspecified > Windows burning tool that the symlink is replaced with the actual file (so > there is an actual physical site.py in both of those directories. > > As I said, this seems to work anyway in testing (in both cases, the case > where the sym-link is broken and where the file is replicated), but I'd like > to be a little more informed about what's going on here and how important > this sym-link is before I allow it to be distributed around. > > So my questions are: This doesn't directly answer your questions but perhaps a way to avoid any of these issues would be to encapsulate your app bundle in a disk image and place the disk image file on the DVD instead. That's a fairly common way to distribute an OS X application in a filesystem-agnostic manner. The disk image file may even be smaller than the app bundle. hdiutil create -srcfolder /path/to/your_app.app your_app-.dmg -- Ned Deily, nad at acm.org From JKelly at vectorworks.net Mon Dec 15 22:49:33 2008 From: JKelly at vectorworks.net (James Kelly) Date: Mon, 15 Dec 2008 16:49:33 -0500 Subject: [Pythonmac-SIG] py2app on UDF DVD In-Reply-To: Message-ID: Hey Ned, The app bundle in question is actually an installer for a much larger, more complicated piece of software. :) Thanks for the suggestion though. Jim On 12/15/08 4:09 PM, "Ned Deily" wrote: > In article , > James Kelly wrote: >> We usually place our py2app created app bundles on DVD using toast's hybrid >> Mac and PC file-system setting. This works pretty well for us. >> Unfortunately we have a need to place the same app bundle on a UDF DVD. >> While this works great in testing, it seems the >> Bundle.app/Contents/Resources/lib/site.py sym-link that points to >> Bundle.app/Contents/Resources/site.py is broken when burning with toast. >> >> I haven't verified this myself, but I'm told when using an unspecified >> Windows burning tool that the symlink is replaced with the actual file (so >> there is an actual physical site.py in both of those directories. >> >> As I said, this seems to work anyway in testing (in both cases, the case >> where the sym-link is broken and where the file is replicated), but I'd like >> to be a little more informed about what's going on here and how important >> this sym-link is before I allow it to be distributed around. >> >> So my questions are: > > This doesn't directly answer your questions but perhaps a way to avoid > any of these issues would be to encapsulate your app bundle in a disk > image and place the disk image file on the DVD instead. That's a > fairly common way to distribute an OS X application in a > filesystem-agnostic manner. The disk image file may even be smaller > than the app bundle. > > hdiutil create -srcfolder /path/to/your_app.app your_app-.dmg From sring at nd.edu Mon Dec 15 23:01:59 2008 From: sring at nd.edu (Sarah Ring) Date: Mon, 15 Dec 2008 17:01:59 -0500 Subject: [Pythonmac-SIG] py2app with pyqt Message-ID: <70a08d3b0812151401h48438182lc44955c6ca6ae792@mail.gmail.com> Hello, I'm a student and I'm trying to get py2app to work with pyqt. I've fixed some errors it had locating files, but it says "ImportError: no module named sip". I do have sip installed though, because pyqt wouldn't work without it. For other errors I just copied the files it wanted and moved them where it was looking, for this one though i can't tell where it thinks sip should be or specifically what sip files it needs. I think it says it's looking in QtCore.pyc, but I don't know where to find that.... I have Python version 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) and Py2appversion 0.3 and am using pyqt4. I can run: py2applet --make-setup myfile.py py2applet myfile.py ...and get no error messages, but when I try to open myfile.app it says: Error An unexpected error has occured during execution of the main script Import Error: No module named sip Can anyone give me some guidance on this? Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Tue Dec 16 01:33:28 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 15 Dec 2008 16:33:28 -0800 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> Message-ID: <4946F758.5070108@noaa.gov> Dav Clark wrote: >> It's easy to have two or three Python installations. They all sit in >> different directories and don't mess with each other. > > Not entirely true. For example, anything that compiles against python > with a bare "-framework Python" flag will grab the (I think) Current dir > from /Library/Frameworks/Python.framework/Versions True, but "Current" is just a symlink to a particular version - it's easy to put it back -- that's what I've done with 2.6 -- it's installed, but not set as current. -Chris -- 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 From conan at warp.byu.edu Tue Dec 16 18:10:23 2008 From: conan at warp.byu.edu (Conan C. Albrecht) Date: Tue, 16 Dec 2008 10:10:23 -0700 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: <4946F758.5070108@noaa.gov> References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> <4946F758.5070108@noaa.gov> Message-ID: <5E388DBE-3430-4F40-92BA-DD3D0CB3A2D0@warp.byu.edu> You are all right in correcting me. Here's a revised version of what to have to make multiple versions work: If I type ls -l /usr/local/bin, I get the following in the list: lrwxr-xr-x 1 root wheel 72 Dec 16 10:05 python -> ../../../ Library/Frameworks/Python.framework/Versions/Current/bin/python lrwxr-xr-x 1 root wheel 71 Dec 16 10:05 pydoc -> ../../../ Library/Frameworks/Python.framework/Versions/Current/bin/pydoc lrwxr-xr-x 1 root wheel 79 Dec 16 10:05 python-config - > ../../../Library/Frameworks/Python.framework/Versions/Current/bin/ python-config lrwxr-xr-x 1 root wheel 73 Dec 16 10:05 pythonw -> ../../../ Library/Frameworks/Python.framework/Versions/Current/bin/pythonw Note that they all go to the "Current" version. Then, in the /Library/ Frameworks/Python.framework/Versions directory, I have: drwxrwxr-x 10 root admin 340 Oct 1 17:52 2.6 drwxr-xr-x 9 root admin 306 Dec 9 14:01 3.0 lrwxr-xr-x 1 root admin 3 Dec 16 10:06 Current -> 2.6 Note that Current goes to 2.6. To switch the "active" version of Python, just switch the symlink from 2.6 to 3.0. That should switch the system. ____________________________________ Conan C. Albrecht, Ph.D. Information Systems Department Brigham Young University Email: conan at warp.byu.edu Phone: +1-801-805-1615 Web/Blog: http://warp.byu.edu/ On Dec 15, 2008, at 17:33, Christopher Barker wrote: > Dav Clark wrote: >>> It's easy to have two or three Python installations. They all sit >>> in different directories and don't mess with each other. >> Not entirely true. For example, anything that compiles against >> python with a bare "-framework Python" flag will grab the (I think) >> Current dir from /Library/Frameworks/Python.framework/Versions > > True, but "Current" is just a symlink to a particular version - it's > easy to put it back -- that's what I've done with 2.6 -- it's > installed, but not set as current. > > -Chris > > > > -- > 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 > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2727 bytes Desc: not available URL: From dav at alum.mit.edu Tue Dec 16 21:13:49 2008 From: dav at alum.mit.edu (Dav Clark) Date: Tue, 16 Dec 2008 12:13:49 -0800 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: <5E388DBE-3430-4F40-92BA-DD3D0CB3A2D0@warp.byu.edu> References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> <4946F758.5070108@noaa.gov> <5E388DBE-3430-4F40-92BA-DD3D0CB3A2D0@warp.byu.edu> Message-ID: For completeness / clarity, you simply CAN'T build VTK bindings from the stock sources targeting the system python if you have ANY Frameworks installed. You can modify some of the build scripts and get a successful install, however. I would not be surprised if this happened in other complex libs. Cheers, Dav On Dec 16, 2008, at 9:10 AM, Conan C. Albrecht wrote: > You are all right in correcting me. Here's a revised version of > what to have to make multiple versions work: > > If I type ls -l /usr/local/bin, I get the following in the list: > > lrwxr-xr-x 1 root wheel 72 Dec 16 10:05 python -> ../../../ > Library/Frameworks/Python.framework/Versions/Current/bin/python > lrwxr-xr-x 1 root wheel 71 Dec 16 10:05 pydoc -> ../../../ > Library/Frameworks/Python.framework/Versions/Current/bin/pydoc > lrwxr-xr-x 1 root wheel 79 Dec 16 10:05 python-config - > > ../../../Library/Frameworks/Python.framework/Versions/Current/bin/ > python-config > lrwxr-xr-x 1 root wheel 73 Dec 16 10:05 pythonw -> ../../../ > Library/Frameworks/Python.framework/Versions/Current/bin/pythonw > > Note that they all go to the "Current" version. Then, in the / > Library/Frameworks/Python.framework/Versions directory, I have: > > drwxrwxr-x 10 root admin 340 Oct 1 17:52 2.6 > drwxr-xr-x 9 root admin 306 Dec 9 14:01 3.0 > lrwxr-xr-x 1 root admin 3 Dec 16 10:06 Current -> 2.6 > > Note that Current goes to 2.6. To switch the "active" version of > Python, just switch the symlink from 2.6 to 3.0. That should switch > the system. > > ____________________________________ > Conan C. Albrecht, Ph.D. > Information Systems Department > Brigham Young University > Email: conan at warp.byu.edu > Phone: +1-801-805-1615 > Web/Blog: http://warp.byu.edu/ > > On Dec 15, 2008, at 17:33, Christopher Barker wrote: > >> Dav Clark wrote: >>>> It's easy to have two or three Python installations. They all >>>> sit in different directories and don't mess with each other. >>> Not entirely true. For example, anything that compiles against >>> python with a bare "-framework Python" flag will grab the (I >>> think) Current dir from /Library/Frameworks/Python.framework/ >>> Versions >> >> True, but "Current" is just a symlink to a particular version - >> it's easy to put it back -- that's what I've done with 2.6 -- it's >> installed, but not set as current. >> >> -Chris >> >> >> >> -- >> 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 >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From janssen at parc.com Wed Dec 17 04:36:58 2008 From: janssen at parc.com (Bill Janssen) Date: Tue, 16 Dec 2008 19:36:58 PST Subject: [Pythonmac-SIG] appscript Python script preventing logout Message-ID: <24490.1229485018@parc.com> I'm having a bit of a problem with a Python script I'm running. It sits in a loop and periodically asks "System Events" what's going on, via appscript. The use of appscript turns it into a "foreground process", in the terminology used in http://developer.apple.com/DOCUMENTATION/MacOSX/Conceptual/BPSystemStartup/Articles/BootProcess.html. This means that when I try to logout, or reboot, the loginwindow sends it a kAEQuitApplication event, but it never replies, which means that after 45 seconds loginwindow automatically aborts the logout or shutdown. So, I either need to take that darn rocket out of the Dock (which I'd like to be able to do), or somehow catch and handle kAEQuitApplication events. Any advice? Bill From dwf at cs.toronto.edu Wed Dec 17 06:44:21 2008 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Wed, 17 Dec 2008 00:44:21 -0500 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: References: <69733D5F-9FCD-42E8-8FFC-32E03033F698@warp.byu.edu> <49453603.1010901@codebykevin.com> <6941DD7A-F72E-4876-BB77-F00B6D72630C@warp.byu.edu> Message-ID: <3D772AE2-4CEF-4380-91D1-1FDE02655CC8@cs.toronto.edu> On 16-Dec-08, at 3:13 PM, Dav Clark wrote: > For completeness / clarity, you simply CAN'T build VTK bindings from > the stock sources targeting the system python if you have ANY > Frameworks installed. You can modify some of the build scripts and > get a successful install, however. I would not be surprised if this > happened in other complex libs. Even worse, once it's built against one or the other python build (at least when I built it) it dumps it's python modules in /usr/local/lib/ python2.5/site-packages instead of the proper location of site- packages. It basically makes the false assumption that python and vtk are installed under the same prefix, even though it's using a python that's not even *symlinked* from /usr/local to actually get headers/do the build. There's a (universal) binary I built against VTK 5.0.4 and Python.org Python 2.5.2, if anyone's interested (mainly for the purposes of Googlers who might find this thread). It goes to the trouble of putting the python wrappers in the right place (under /Library/ Frameworks/Python.framework/Versions/2.5): https://svn.enthought.com/enthought/attachment/wiki/MayaVi/VTK504UB.dmg - DWF From dwf at cs.toronto.edu Wed Dec 17 10:52:58 2008 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Wed, 17 Dec 2008 04:52:58 -0500 Subject: [Pythonmac-SIG] pyobjc 2.0 with the python.org distribution? Message-ID: <4FDA9BA6-A77C-41FB-9FEE-FA7E4A719282@cs.toronto.edu> Hi folks, I noticed today that while PyObjC, etc. is included in the system Python in 10.5, the py2.5-fat binaries on undefined.org are 1.4.x series. As I understood it, the python.org UB is the only solution if you want to build redistributable applications. I also have been using it as a jumping off point so that I have a completely common dev environment on 10.5 and 10.4 for other stuff I do. Well, I'm trying to build PyObjC 2.0 from trunk with the python.org package and running into all sorts of errors. For example, pyobjc-core fails to build with this: Modules/objc/bundle-variables.m: In function ?PyObjC_loadBundleFunctions?: Modules/objc/bundle-variables.m:221: error: ?_localHandler? undeclared (first use in this function) Modules/objc/bundle-variables.m:221: error: (Each undeclared identifier is reported only once Modules/objc/bundle-variables.m:221: error: for each function it appears in.) Modules/objc/bundle-variables.m: In function ?PyObjC_loadBundleFunctions?: Modules/objc/bundle-variables.m:221: error: ?_localHandler? undeclared (first use in this function) Modules/objc/bundle-variables.m:221: error: (Each undeclared identifier is reported only once Modules/objc/bundle-variables.m:221: error: for each function it appears in.) lipo: can't figure out the architecture type of: /var/folders/Hv/ HvVKXkVwF3Kt9ULgIvCLP++++TI/-Tmp-//ccrLeLvv.out error: command 'gcc' failed with exit status 1 I found one post on the mailing list from July that went unanswered detailing pretty much the same situation. Any hints? Thanks, David From reza at getpeer.com Wed Dec 17 12:03:57 2008 From: reza at getpeer.com (Reza Lotun) Date: Wed, 17 Dec 2008 11:03:57 +0000 Subject: [Pythonmac-SIG] pyobjc 2.0 with the python.org distribution? In-Reply-To: <4FDA9BA6-A77C-41FB-9FEE-FA7E4A719282@cs.toronto.edu> References: <4FDA9BA6-A77C-41FB-9FEE-FA7E4A719282@cs.toronto.edu> Message-ID: <356e30830812170303hfc2acdeh1b11f3a070e653cc@mail.gmail.com> Hi, As an addendum to that, what is the current status of trying to build Pyobjc 2.0 for Python 2.6? I tried a few weeks ago but it didn't seem to work - is it at all possible? Thanks, Reza On Wed, Dec 17, 2008 at 9:52 AM, David Warde-Farley wrote: > Hi folks, > > I noticed today that while PyObjC, etc. is included in the system Python in > 10.5, the py2.5-fat binaries on undefined.org are 1.4.x series. As I > understood it, the python.org UB is the only solution if you want to build > redistributable applications. I also have been using it as a jumping off > point so that I have a completely common dev environment on 10.5 and 10.4 > for other stuff I do. > > Well, I'm trying to build PyObjC 2.0 from trunk with the python.orgpackage and running into all sorts of errors. > > For example, pyobjc-core fails to build with this: > > Modules/objc/bundle-variables.m: In function 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' undeclared > (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared identifier is > reported only once > Modules/objc/bundle-variables.m:221: error: for each function it appears > in.) > Modules/objc/bundle-variables.m: In function 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' undeclared > (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared identifier is > reported only once > Modules/objc/bundle-variables.m:221: error: for each function it appears > in.) > lipo: can't figure out the architecture type of: > /var/folders/Hv/HvVKXkVwF3Kt9ULgIvCLP++++TI/-Tmp-//ccrLeLvv.out > error: command 'gcc' failed with exit status 1 > > I found one post on the mailing list from July that went unanswered > detailing pretty much the same situation. Any hints? > > Thanks, > > David > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- Reza Lotun Senior Software Engineer Peer Technologies Limited reza at getpeer.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dav at alum.mit.edu Wed Dec 17 19:25:04 2008 From: dav at alum.mit.edu (Dav Clark) Date: Wed, 17 Dec 2008 10:25:04 -0800 Subject: [Pythonmac-SIG] pyobjc 2.0 with the python.org distribution? In-Reply-To: <356e30830812170303hfc2acdeh1b11f3a070e653cc@mail.gmail.com> References: <4FDA9BA6-A77C-41FB-9FEE-FA7E4A719282@cs.toronto.edu> <356e30830812170303hfc2acdeh1b11f3a070e653cc@mail.gmail.com> Message-ID: <51C8EF6A-E940-4F6F-B779-353E09E060E8@alum.mit.edu> Reza, Are you implying that you are able to build pyobjc 2.0 on python 2.5? No one I know is able to do this... it would be exceedingly useful to have instructions on how to do this. Even vague and cryptic hints would be appreciated! I posted a good while ago about this, and occasionally take a crack at it to see if I've learned enough... but it always fails to build. Add to this the fact that no one answered my question about potential problems of using PyObjC 1.4 on leopard. So, my current strategy is to avoid any code that uses PyObjC (for example, this motivated my shift towards pyglet instead of pygame). Cheers, Dav On Dec 17, 2008, at 3:03 AM, Reza Lotun wrote: > Hi, > > As an addendum to that, what is the current status of trying to > build Pyobjc 2.0 for Python 2.6? I tried a few weeks ago but it > didn't seem to work - is it at all possible? > > Thanks, > Reza > > On Wed, Dec 17, 2008 at 9:52 AM, David Warde-Farley > wrote: > Hi folks, > > I noticed today that while PyObjC, etc. is included in the system > Python in 10.5, the py2.5-fat binaries on undefined.org are 1.4.x > series. As I understood it, the python.org UB is the only solution > if you want to build redistributable applications. I also have been > using it as a jumping off point so that I have a completely common > dev environment on 10.5 and 10.4 for other stuff I do. > > Well, I'm trying to build PyObjC 2.0 from trunk with the python.org > package and running into all sorts of errors. > > For example, pyobjc-core fails to build with this: > > Modules/objc/bundle-variables.m: In function > 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > Modules/objc/bundle-variables.m: In function > 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > lipo: can't figure out the architecture type of: /var/folders/Hv/ > HvVKXkVwF3Kt9ULgIvCLP++++TI/-Tmp-//ccrLeLvv.out > error: command 'gcc' failed with exit status 1 > > I found one post on the mailing list from July that went unanswered > detailing pretty much the same situation. Any hints? > > Thanks, > > David > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > > > -- > Reza Lotun > Senior Software Engineer > Peer Technologies Limited > reza at getpeer.com > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwf at cs.toronto.edu Wed Dec 17 23:12:55 2008 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Wed, 17 Dec 2008 17:12:55 -0500 Subject: [Pythonmac-SIG] pyobjc 2.0 with the python.org distribution? In-Reply-To: <51C8EF6A-E940-4F6F-B779-353E09E060E8@alum.mit.edu> References: <4FDA9BA6-A77C-41FB-9FEE-FA7E4A719282@cs.toronto.edu> <356e30830812170303hfc2acdeh1b11f3a070e653cc@mail.gmail.com> <51C8EF6A-E940-4F6F-B779-353E09E060E8@alum.mit.edu> Message-ID: <5337B635-A30C-441C-90A2-72F77A096844@cs.toronto.edu> On 17-Dec-08, at 1:25 PM, Dav Clark wrote: > Reza, > > Are you implying that you are able to build pyobjc 2.0 on python > 2.5? No one I know is able to do this... it would be exceedingly > useful to have instructions on how to do this. Even vague and > cryptic hints would be appreciated! > > I posted a good while ago about this, and occasionally take a crack > at it to see if I've learned enough... but it always fails to build. > > Add to this the fact that no one answered my question about > potential problems of using PyObjC 1.4 on leopard. So, my current > strategy is to avoid any code that uses PyObjC (for example, this > motivated my shift towards pyglet instead of pygame). > > Cheers, > Dav Seems it's possible with something of a hack, namely edit the Makefile in the python.org framework build. See this post: http://jessenoller.com/2007/12/14/pyobjc-2-leopard-python-251-and-you/ and the linked mailing list post by Barry Wark. The long answer is that you really should build a framework build against the 10.5u SDK. That's the real problem: 2.0 contains all sorts of wrappings for Leopard-only stuff (as I understand it), the Python.org build is built with 10.4 compatibility in mind. That said, I was able to build it using the shell script included after making that Makefile modification, and Xcode seems to work fine with the framework in /Library replacing that in /System/Library in a basic PyObjC project. Barry says in the comments that he built one, provides a now-dead link to a package on his site, but I imagine building your own framework build with the 10.5u SDK isn't too hard. David From dhain+pythonmac at zognot.org Thu Dec 18 01:17:04 2008 From: dhain+pythonmac at zognot.org (David Hain) Date: Wed, 17 Dec 2008 16:17:04 -0800 Subject: [Pythonmac-SIG] pyobjc 2.0 with the python.org distribution? References: Message-ID: <6EA9D8B0-7D34-4D16-9D10-4E63415335CE@zognot.org> Sorry if this gets double-posted. I sent from the wrong address initially and now it seems it will never return from moderator-limbo. On Dec 17, 2008, at 3:03 AM, Reza Lotun wrote: > Hi, > > As an addendum to that, what is the current status of trying to > build Pyobjc 2.0 for Python 2.6? I tried a few weeks ago but it > didn't seem to work - is it at all possible? Yes, it is possible. I haven't tried building it against the python.org binary dist of 2.6, but I have a script that will build 2.6 from source and then build pyobjc from trunk. See below for the important bits. > > > Thanks, > Reza > > On Wed, Dec 17, 2008 at 9:52 AM, David Warde-Farley > wrote: > Hi folks, > > I noticed today that while PyObjC, etc. is included in the system > Python in 10.5, the py2.5-fat binaries on undefined.org are 1.4.x > series. As I understood it, the python.org UB is the only solution > if you want to build redistributable applications. Not necessarily. py2app should have no trouble using a custom built python. > I also have been using it as a jumping off point so that I have a > completely common dev environment on 10.5 and 10.4 for other stuff I > do. The solution below will only work on 10.5, but it should be possible to build against the 10.4 universal sdk with the appropriate modifications. > > > Well, I'm trying to build PyObjC 2.0 from trunk with the python.org > package and running into all sorts of errors. > > For example, pyobjc-core fails to build with this: > > Modules/objc/bundle-variables.m: In function > 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > Modules/objc/bundle-variables.m: In function > 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > lipo: can't figure out the architecture type of: /var/folders/Hv/ > HvVKXkVwF3Kt9ULgIvCLP++++TI/-Tmp-//ccrLeLvv.out > error: command 'gcc' failed with exit status 1 > > I found one post on the mailing list from July that went unanswered > detailing pretty much the same situation. Any hints? > I ran into this problem also when first trying to build pyobjc from trunk. I don't know if it's possible to build against the python.org binaries, but if you build python from source with the options below it should work: export installprefix=/opt/python # set this to wherever you want to put it export DYLD_LIBRARY_PATH=$installprefix/lib:$DYLD_LIBRARY_PATH export DYLD_FRAMEWORK_PATH=$installprefix/Library/Frameworks: $DYLD_LIBRARY_PATH:$DYLD_FRAMEWORK_PATH export MACOSX_DEPLOYMENT_TARGET=10.5 export sdk=/Developer/SDKs/MacOSX10.5.sdk export CPPFLAGS="-I$installprefix/include -L$installprefix/lib" export CFLAGS="-O -g -isysroot $sdk -arch i386 -arch ppc -mmacosx- version-min=10.5" export LDFLAGS="-Wl,-syslibroot,$sdk -flat_namespace" ./configure \ --enable-universalsdk=$sdk \ --enable-framework=$installprefix/Library/Frameworks make make install Then, to build pyobjc, you should be able to use 02-develop-all.sh from trunk, provided you modify it to use the python you just built above (change the paths on lines 18, 19, 24, 35, and 36). Good luck, -David From lpritc at scri.ac.uk Mon Dec 15 17:13:50 2008 From: lpritc at scri.ac.uk (Leighton Pritchard) Date: Mon, 15 Dec 2008 16:13:50 +0000 Subject: [Pythonmac-SIG] Status of Python 3.0 for Mac? In-Reply-To: Message-ID: > I want to install 3.0 to experiment with all the new features, but I > don't want to do anything horrible to my default Leopard install, and > I'd like to be able to remove 3.0 easily. What's the most sensible > way of doing this? Setting a --prefix of /opt/python3.0 , for > example, or just using the default prefix and using make altinstall? I installed a framework version, using otherwise default settings, and it played nicely with my existing Python installation: ./configure --enable-framework make sudo make install On one machine this worked without any issues. On another, I had to fix the symbolic link at /Library/Frameworks/Python.framework/Versions/Current to point to the [...]/Versions/2.6 directory, rather than the [...]/Versions/3.0 directory that the installation seemed to have linked to. The executables live in /usr/local/bin/ and will probably be in your default $PATH, so just issuing python3.0 At the command line should put you into the new interpreter. -- Dr Leighton Pritchard MRSC D131, Plant Pathology Programme, SCRI Errol Road, Invergowrie, Perth and Kinross, Scotland, DD2 5DA e:lpritc at scri.ac.uk w:http://www.scri.ac.uk/staff/leightonpritchard gpg/pgp: 0xFEFC205C tel:+44(0)1382 562731 x2405 ______________________________________________________________________ SCRI, Invergowrie, Dundee, DD2 5DA. The Scottish Crop Research Institute is a charitable company limited by guarantee. Registered in Scotland No: SC 29367. Recognised by the Inland Revenue as a Scottish Charity No: SC 006662. DISCLAIMER: This email is from the Scottish Crop Research Institute, but the views expressed by the sender are not necessarily the views of SCRI and its subsidiaries. This email and any files transmitted with it are confidential to the intended recipient at the e-mail address to which it has been addressed. It may not be disclosed or used by any other than that addressee. If you are not the intended recipient you are requested to preserve this confidentiality and you must not use, disclose, copy, print or rely on this e-mail in any way. Please notify postmaster at scri.ac.uk quoting the name of the sender and delete the email from your system. Although SCRI has taken reasonable precautions to ensure no viruses are present in this email, neither the Institute nor the sender accepts any responsibility for any viruses, and it is your responsibility to scan the email and the attachments (if any). ______________________________________________________________________ From dhain at zognot.org Wed Dec 17 18:53:14 2008 From: dhain at zognot.org (David Hain) Date: Wed, 17 Dec 2008 09:53:14 -0800 Subject: [Pythonmac-SIG] pyobjc 2.0 with the python.org distribution? In-Reply-To: <356e30830812170303hfc2acdeh1b11f3a070e653cc@mail.gmail.com> References: <4FDA9BA6-A77C-41FB-9FEE-FA7E4A719282@cs.toronto.edu> <356e30830812170303hfc2acdeh1b11f3a070e653cc@mail.gmail.com> Message-ID: On Dec 17, 2008, at 3:03 AM, Reza Lotun wrote: > Hi, > > As an addendum to that, what is the current status of trying to > build Pyobjc 2.0 for Python 2.6? I tried a few weeks ago but it > didn't seem to work - is it at all possible? Yes, it is possible. I haven't tried building it against the python.org binary dist of 2.6, but I have a script that will build 2.6 from source and then build pyobjc from trunk. See below for the important bits. > > > Thanks, > Reza > > On Wed, Dec 17, 2008 at 9:52 AM, David Warde-Farley > wrote: > Hi folks, > > I noticed today that while PyObjC, etc. is included in the system > Python in 10.5, the py2.5-fat binaries on undefined.org are 1.4.x > series. As I understood it, the python.org UB is the only solution > if you want to build redistributable applications. Not necessarily. py2app should have no trouble using a custom built python. > I also have been using it as a jumping off point so that I have a > completely common dev environment on 10.5 and 10.4 for other stuff I > do. The solution below will only work on 10.5, but it should be possible to build against the 10.4 universal sdk with the appropriate modifications. > > > Well, I'm trying to build PyObjC 2.0 from trunk with the python.org > package and running into all sorts of errors. > > For example, pyobjc-core fails to build with this: > > Modules/objc/bundle-variables.m: In function > 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > Modules/objc/bundle-variables.m: In function > 'PyObjC_loadBundleFunctions': > Modules/objc/bundle-variables.m:221: error: '_localHandler' > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > lipo: can't figure out the architecture type of: /var/folders/Hv/ > HvVKXkVwF3Kt9ULgIvCLP++++TI/-Tmp-//ccrLeLvv.out > error: command 'gcc' failed with exit status 1 > > I found one post on the mailing list from July that went unanswered > detailing pretty much the same situation. Any hints? > I ran into this problem also when first trying to build pyobjc from trunk. I don't know if it's possible to build against the python.org binaries, but if you build python from source with the options below it should work: export installprefix=/opt/python # set this to wherever you want to put it export DYLD_LIBRARY_PATH=$installprefix/lib:$DYLD_LIBRARY_PATH export DYLD_FRAMEWORK_PATH=$installprefix/Library/Frameworks: $DYLD_LIBRARY_PATH:$DYLD_FRAMEWORK_PATH export MACOSX_DEPLOYMENT_TARGET=10.5 export sdk=/Developer/SDKs/MacOSX10.5.sdk export CPPFLAGS="-I$installprefix/include -L$installprefix/lib" export CFLAGS="-O -g -isysroot $sdk -arch i386 -arch ppc -mmacosx- version-min=10.5" export LDFLAGS="-Wl,-syslibroot,$sdk -flat_namespace" ./configure \ --enable-universalsdk=$sdk \ --enable-framework=$installprefix/Library/Frameworks make make install Then, to build pyobjc, you should be able to use 02-develop-all.sh from trunk, provided you modify it to use the python you just built above (change the paths on lines 18, 19, 24, 35, and 36). Good luck, -David From hengist.podd at virgin.net Thu Dec 18 12:32:01 2008 From: hengist.podd at virgin.net (has) Date: Thu, 18 Dec 2008 11:32:01 +0000 Subject: [Pythonmac-SIG] appscript Python script preventing logout In-Reply-To: References: Message-ID: <56D8084D-8F84-44CB-8327-700B346A5FA5@virgin.net> Bill Janssen wrote: > I'm having a bit of a problem with a Python script I'm running. It > sits > in a loop and periodically asks "System Events" what's going on, via > appscript. The use of appscript turns it into a "foreground process", Yes, this is annoying and unnecessary behaviour; the problem is that the OS will automatically GUI-ify any non-GUI process launched from an application bundle if it calls certain system APIs. Appscript uses the Process Manager to locate applications and get their process ids, and unfortunately that's one of the APIs that has this side effect. This isn't a problem for Ruby appscript as the 'ruby' interpreter isn't packaged as a .app, but the 'python' executables in Python.framework's bin directory all use the framework's Python.app executable to run the script; hence the automatic promotion when it uses Process Manager. Slightly embarrassing for me, as I was one of those pushing for the previous python/pythonw distinction to be eliminated, which it was in Python 2.4, but I didn't realise at the time that this would have negative as well as positive consequences for appscript. I still think allowing the 'python' executable to automatically promote itself was a reasonable thing to do, as it's the one that folk habitually use and prior to 2.4 this would catch them out when running a script that required GUI access, e.g. to display a dialog. What might be useful if there was also a 'pythonb' executable that doesn't provide automatic promotion for benefit of those who know what they're doing, although I'm not sure if that falls outside the responsibility of the main Python distribution. > This means that when I try to logout, or reboot, the loginwindow sends > it a kAEQuitApplication event, but it never replies, which means that > after 45 seconds loginwindow automatically aborts the logout or > shutdown. So, I either need to take that darn rocket out of the Dock > (which I'd like to be able to do), If you don't want your python process to be promoted, there are a few tricks you could try: target System Events by PID or raw address descriptor instead of name/path/bundle id; run your script with a non- framework Python; copy Python.app's executable (.../Python.app/ Contents/MacOS/Python) to /usr/local/bin/pythonb and use that to run your scripts. > or somehow catch and handle kAEQuitApplication events. aemreceive's sfba module lets you run an event loop, which you need to handle any sort of incoming events, and installs a default 'quit' handler for you. It doesn't provide support for Carbon timers or background threads, however, so wouldn't be any use to you here. A better solution would be to build use Cocoa to provide your script with an event loop, as PyObjC isn't subject to the same restrictions as sfba. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From janssen at parc.com Thu Dec 18 17:04:25 2008 From: janssen at parc.com (Bill Janssen) Date: Thu, 18 Dec 2008 08:04:25 PST Subject: [Pythonmac-SIG] appscript Python script preventing logout In-Reply-To: <56D8084D-8F84-44CB-8327-700B346A5FA5@virgin.net> References: <56D8084D-8F84-44CB-8327-700B346A5FA5@virgin.net> Message-ID: <7069.1229616265@parc.com> has wrote: > copy Python.app's executable (.../Python.app/ > Contents/MacOS/Python) to /usr/local/bin/pythonb and use that to run > your scripts. Ah! That sounds easy. I'll try it. > aemreceive's sfba module lets you run an event loop, which you need to > handle any sort of incoming events, and installs a default 'quit' > handler for you. It doesn't provide support for Carbon timers or > background threads, however, so wouldn't be any use to you here. A > better solution would be to build use Cocoa to provide your script > with an event loop, as PyObjC isn't subject to the same restrictions > as sfba. I was thinking the same thing. Thanks for the help! Bill From pdorange at mac.com Fri Dec 19 07:36:23 2008 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Fri, 19 Dec 2008 07:36:23 +0100 Subject: [Pythonmac-SIG] Troubles with pygame+py2app to get icon Message-ID: <1is6psn.xnkk7140wor6N%pdorange@mac.com> Hi, I got a trouble to have an icon to the Mac bundle of my little game using py2app. The bundle is correct but the icon is not set, always got the default pygame icon. The icon file is copied and put in the bundle by py2app (in ressources/english.lproj but the info.plist set CFBundleIconFile to 'PythonApplet.icns'. The 'PythonApplet.icns' is in the bundle in the main dir. with the alien example (from py2app) and other pygame examples, the icon is also not set when bundle. Any clue, or working samples ? My config : Python 2.5.2 Pygame 1.8.1rc1 py2app 0.4.2 the structure on disk : the icon file (mwar.icns) is located inside 'English.lproj' directory, i also try to locate it in the main dir but then if icon file is not copied. The script : #!/usr/bin/env python from setuptools import setup from mwarbasic import * plist = dict( CFBundleIconFile='mwar.icns', CFBundleName=k_NAME, CFBundleShortVersionString=k_VERSION, CFBundleGetInfoString=' '.join([k_NAME, k_VERSION]), CFBundleExecutable=k_NAME, CFBundleIdentifier='org.maddog.microwar', ) setup( data_files=['English.lproj', 'data'], setup_requires=["py2app"], app=[dict(script="microwar.py", plist=plist, iconfile='English.lproj/mwar.icns')], ) -- Pierre-Alain Dorange From reza at getpeer.com Fri Dec 19 11:04:27 2008 From: reza at getpeer.com (Reza Lotun) Date: Fri, 19 Dec 2008 10:04:27 +0000 Subject: [Pythonmac-SIG] pyobjc 2.0 with the python.org distribution? In-Reply-To: References: <4FDA9BA6-A77C-41FB-9FEE-FA7E4A719282@cs.toronto.edu> <356e30830812170303hfc2acdeh1b11f3a070e653cc@mail.gmail.com> Message-ID: <356e30830812190204q28914b43p14a59026a38e9d0e@mail.gmail.com> On Wed, Dec 17, 2008 at 5:53 PM, David Hain wrote: > > export installprefix=/opt/python # set this to wherever you want to put > it > export DYLD_LIBRARY_PATH=$installprefix/lib:$DYLD_LIBRARY_PATH > export > DYLD_FRAMEWORK_PATH=$installprefix/Library/Frameworks:$DYLD_LIBRARY_PATH:$DYLD_FRAMEWORK_PATH > export MACOSX_DEPLOYMENT_TARGET=10.5 > export sdk=/Developer/SDKs/MacOSX10.5.sdk > export CPPFLAGS="-I$installprefix/include -L$installprefix/lib" > export CFLAGS="-O -g -isysroot $sdk -arch i386 -arch ppc > -mmacosx-version-min=10.5" > export LDFLAGS="-Wl,-syslibroot,$sdk -flat_namespace" > > ./configure \ > --enable-universalsdk=$sdk \ > --enable-framework=$installprefix/Library/Frameworks > make > make install > > > Then, to build pyobjc, you should be able to use 02-develop-all.sh from > trunk, provided you modify it to use the python you just built above (change > the paths on lines 18, 19, 24, 35, and 36). > > Good luck, > -David > > Thanks David - those instructions worked perfectly! I now have pyobjc and python 2.6.1 built from source and working. Regards, Reza -- Reza Lotun Senior Software Engineer Peer Technologies Limited reza at getpeer.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From georgewr at bigpond.net.au Fri Dec 19 22:14:20 2008 From: georgewr at bigpond.net.au (George Wright) Date: Sat, 20 Dec 2008 08:14:20 +1100 Subject: [Pythonmac-SIG] python help() problems Message-ID: <1E662154-304A-469E-A980-0149A14159E3@bigpond.net.au> Gidday I continue to have problems with python 2.5.1 and python2.4 on OSX 10.5.5 I can't access help() > modules Here is the complete error report for 2.5 geomacbk:~ georgewr$ python Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> help() Welcome to Python 2.5! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://www.python.org/doc/tut/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". help> modules Please wait a moment while I gather a list of all available modules... Leopard libedit detected. /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ pkgutil.py:110: DeprecationWarning: twisted.flow is unmaintained. __import__(name) /Library/Python/2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.5- i386.egg/twisted/words/im/__init__.py:8: UserWarning: twisted.im will be undergoing a rewrite at some point in the future. warnings.warn("twisted.im will be undergoing a rewrite at some point in the future.") Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site.py", line 348, in __call__ return pydoc.help(*args, **kwds) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1647, in __call__ self.interact() File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1665, in interact self.help(request) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1681, in help elif request == 'modules': self.listmodules() File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1802, in listmodules ModuleScanner().run(callback) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1853, in run for importer, modname, ispkg in pkgutil.walk_packages(): File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pkgutil.py", line 110, in walk_packages __import__(name) File "/usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site- packages/wxaddons/__init__.py", line 29, in config = wx.Config("wxaddons") File "//usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site- packages/wx-2.8-mac-unicode/wx/_misc.py", line 3298, in __init__ _misc_.Config_swiginit(self,_misc_.new_Config(*args, **kwargs)) wx._core.PyNoAppError: The wx.App object must be created first! >>> __________________________________ I also have an error on python2.4 help() help> modules Bus error geomacbk:~ georgewr$ ___________________________________ Any assistance appreciated. George Wright georgewr at bigpond.net.au http://mywebsite.bigpond.net.au/georgewr/ http://www.labyrinth.net.au/~gwright From pythonmac at rebertia.com Sat Dec 20 01:31:29 2008 From: pythonmac at rebertia.com (Chris Rebert) Date: Fri, 19 Dec 2008 16:31:29 -0800 Subject: [Pythonmac-SIG] python help() problems In-Reply-To: <1E662154-304A-469E-A980-0149A14159E3@bigpond.net.au> References: <1E662154-304A-469E-A980-0149A14159E3@bigpond.net.au> Message-ID: <47c890dc0812191631h37b97011l533633c45e50ce6b@mail.gmail.com> On Fri, Dec 19, 2008 at 1:14 PM, George Wright wrote: > Gidday > I continue to have problems with python 2.5.1 and python2.4 on OSX 10.5.5 > I can't access help() > modules Here is the complete error report for 2.5 > > geomacbk:~ georgewr$ python > Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> help() > > Welcome to Python 2.5! This is the online help utility. > > If this is your first time using Python, you should definitely check out > the tutorial on the Internet at http://www.python.org/doc/tut/. > > Enter the name of any module, keyword, or topic to get help on writing > Python programs and using Python modules. To quit this help utility and > return to the interpreter, just type "quit". > > To get a list of available modules, keywords, or topics, type "modules", > "keywords", or "topics". Each module also comes with a one-line summary > of what it does; to list the modules whose summaries contain a given word > such as "spam", type "modules spam". > > help> modules > > Please wait a moment while I gather a list of all available modules... > > Leopard libedit detected. > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py:110: > DeprecationWarning: twisted.flow is unmaintained. > __import__(name) > /Library/Python/2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.5-i386.egg/twisted/words/im/__init__.py:8: > UserWarning: twisted.im will be undergoing a rewrite at some point in the > future. > warnings.warn("twisted.im will be undergoing a rewrite at some point in the > future.") > Traceback (most recent call last): > File "", line 1, in > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.py", > line 348, in __call__ > return pydoc.help(*args, **kwds) > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", > line 1647, in __call__ > self.interact() > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", > line 1665, in interact > self.help(request) > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", > line 1681, in help > elif request == 'modules': self.listmodules() > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", > line 1802, in listmodules > ModuleScanner().run(callback) > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py", > line 1853, in run > for importer, modname, ispkg in pkgutil.walk_packages(): > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py", > line 110, in walk_packages > __import__(name) > File > "/usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wxaddons/__init__.py", > line 29, in > config = wx.Config("wxaddons") > File > "//usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_misc.py", > line 3298, in __init__ > _misc_.Config_swiginit(self,_misc_.new_Config(*args, **kwargs)) > wx._core.PyNoAppError: The wx.App object must be created first! >>>> Doesn't sound very Mac-specific to me. Sounds like Python is trying to import part of a package named 'wxPython-unicode-2.8.9.1' in the course of probing for modules and that this import epic-fails. The error sounds wxpython-related if anything. I'd try asking the wxpython or c.l.p mailinglists rather than here. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com From Chris.Barker at noaa.gov Sat Dec 20 01:33:14 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 19 Dec 2008 16:33:14 -0800 Subject: [Pythonmac-SIG] python help() problems In-Reply-To: <1E662154-304A-469E-A980-0149A14159E3@bigpond.net.au> References: <1E662154-304A-469E-A980-0149A14159E3@bigpond.net.au> Message-ID: <494C3D4A.70702@noaa.gov> George Wright wrote: > "/usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wxaddons/__init__.py", > line 29, in > config = wx.Config("wxaddons") > File > "//usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_misc.py", > line 3298, in __init__ > _misc_.Config_swiginit(self,_misc_.new_Config(*args, **kwargs)) > wx._core.PyNoAppError: The wx.App object must be created first! This is a bug I just happened to discover in a recent wxPython -- you should be able to import wx.addons without initializing an App first. I just sent a note to the wxPythons list, but have not yet gotten a reply. For now, you have to go back top an older version of wxPython -- I"m not aure how to get help() not to choke -- it really should have the imports wrapped in a try block. > I also have an error on python2.4 help() no idea here. -CHB -- 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 From rellsworthpollard at gmail.com Sun Dec 21 02:33:19 2008 From: rellsworthpollard at gmail.com (R. Ellsworth Pollard) Date: Sat, 20 Dec 2008 20:33:19 -0500 Subject: [Pythonmac-SIG] Compiling Python 2.6.1 on Leopard Message-ID: Where might I find instructions for compiling Python on Leopard? I just asked this on tutor and someone suggested that this list might be a better place to ask. I'm specifically looking for how to compile Python to replace the native installation of 2.5.1, what common libraries I should build it with, and how to support readline. The default ./configure seems to compile it to function as python2.6 instead of python, also. Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Sun Dec 21 03:11:53 2008 From: nad at acm.org (Ned Deily) Date: Sat, 20 Dec 2008 18:11:53 -0800 Subject: [Pythonmac-SIG] Compiling Python 2.6.1 on Leopard References: Message-ID: In article , "R. Ellsworth Pollard" wrote: > Where might I find instructions for compiling Python on Leopard? I just > asked this on tutor and someone suggested that this list might be a better > place to ask. I'm specifically looking for how to compile Python to replace > the native installation of 2.5.1, what common libraries I should build it > with, and how to support readline. The default ./configure seems to compile > it to function as python2.6 instead of python, also. FYI, an "official" OSX installer disk image for 2.6.1 has just been added at python.org: -- Ned Deily, nad at acm.org From reza at getpeer.com Mon Dec 22 11:36:57 2008 From: reza at getpeer.com (Reza Lotun) Date: Mon, 22 Dec 2008 10:36:57 +0000 Subject: [Pythonmac-SIG] Compiling Python 2.6.1 on Leopard In-Reply-To: References: Message-ID: <356e30830812220236l617d650ctfa1fa42fc54f23c9@mail.gmail.com> Hi Ned, These instructions are what I put up on my company wiki, verbatim. They describe a way to compile python2.6 as an "altinstall" so that it doesn't interfere with the system python (a really good idea). To get to the new python you simply invoke "python2.6" - that also means you'll also have to reinstall each library you're interested by doing something like "python2.6 setup.py install" for each library. These instructions also makes it easy to use pyobjc, as needed by my project, so you might not need all these options specified. 1. Download http://python.org/ftp/python/2.6.1/Python-2.6.1.tar.bz2 2. bzip2 -dc Python-2.6.tar.bz2 | tar -xvf - 3. Save these commands into a script called mybuild, do a chmod +x mybuild and run it with ./mybuild: export installprefix=/opt/python # set this to wherever you want to put it export DYLD_LIBRARY_PATH=$installprefix/lib:$DYLD_LIBRARY_PATH export DYLD_FRAMEWORK_PATH=$installprefix/Library/Frameworks:$DYLD_LIBRARY_PATH:$DYLD_FRAMEWORK_PATH export MACOSX_DEPLOYMENT_TARGET=10.5 export sdk=/Developer/SDKs/MacOSX10.5.sdk export CPPFLAGS="-I$installprefix/include -L$installprefix/lib" export CFLAGS="-O -g -isysroot $sdk -arch i386 -arch ppc -mmacosx-version-min=10.5" export LDFLAGS="-Wl,-syslibroot,$sdk -flat_namespace" ./configure \ --enable-universalsdk=$sdk \ --enable-framework=$installprefix/Library/Frameworks make && make altinstall Again, this will install Python 2.6 as an "alternative install" to not interfere with the system Python. NOTE: you'll only be able to access Python 2.6 by invoking python2.6 at the command line! Hope this helps, Reza On Sun, Dec 21, 2008 at 2:11 AM, Ned Deily wrote: > > In article > , > "R. Ellsworth Pollard" wrote: > > Where might I find instructions for compiling Python on Leopard? I just > > asked this on tutor and someone suggested that this list might be a better > > place to ask. I'm specifically looking for how to compile Python to replace > > the native installation of 2.5.1, what common libraries I should build it > > with, and how to support readline. The default ./configure seems to compile > > it to function as python2.6 instead of python, also. > > FYI, an "official" OSX installer disk image for 2.6.1 has just been > added at python.org: > > > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -- Reza Lotun Senior Software Engineer Peer Technologies Limited reza at getpeer.com From dave.opstad at monotypeimaging.com Mon Dec 22 18:40:27 2008 From: dave.opstad at monotypeimaging.com (Dave Opstad) Date: Mon, 22 Dec 2008 09:40:27 -0800 Subject: [Pythonmac-SIG] Compiling Python 2.6.1 on Leopard In-Reply-To: Message-ID: Ned Deily wrote: > FYI, an "official" OSX installer disk image for 2.6.1 has just been > added at python.org: > > Thank you for this note! I just installed it, and this one fixes the Tkinter problem, so I'm able to use Tkinter with 2.6 finally. Yay! Dave From Chris.Barker at noaa.gov Mon Dec 22 23:29:59 2008 From: Chris.Barker at noaa.gov (Chris.Barker) Date: Mon, 22 Dec 2008 14:29:59 -0800 Subject: [Pythonmac-SIG] python help() problems In-Reply-To: <494C3D4A.70702@noaa.gov> References: <1E662154-304A-469E-A980-0149A14159E3@bigpond.net.au> <494C3D4A.70702@noaa.gov> Message-ID: <495014E7.6090403@noaa.gov> Christopher Barker wrote: > This is a bug I just happened to discover in a recent wxPython -- you > should be able to import wx.addons without initializing an App first. I > just sent a note to the wxPythons list, but have not yet gotten a reply. OK. I got an answer, it turns out that wx.addons is deprecated -- it shouldn't be there at all. Indeed, it's not there in the latest Windows build (all I can check from home now). Anyway, it looks like the solution is to remove it from your build. I"d delete the wxaddons directory: /usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wxaddons and that should do it. -Chris -- 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 From bryanabsmith at gmail.com Wed Dec 24 19:53:11 2008 From: bryanabsmith at gmail.com (Bryan Smith) Date: Wed, 24 Dec 2008 13:53:11 -0500 Subject: [Pythonmac-SIG] py2app and Terminal Message-ID: Hi everyone, I am just finishing up an application and I would like to create an app file for my program. That said, it's CLI based with no GUI. If I try to make an app, it only seems to work if I have a GUI. Is it possible to tell py2app to open Terminal.app first and run my program through that? Thanks, Bryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From half.italian at gmail.com Wed Dec 24 23:02:48 2008 From: half.italian at gmail.com (Sean DiZazzo) Date: Wed, 24 Dec 2008 14:02:48 -0800 Subject: [Pythonmac-SIG] py2app and Terminal In-Reply-To: References: Message-ID: <7baa94f60812241402u3490a2f1i66d5ebd675b11371@mail.gmail.com> Give your app a shebang line """#!/usr/bin/env python"" and then rename the script ".command" Then you can double click it and it will open a shell and run. ~Sean On Wed, Dec 24, 2008 at 10:53 AM, Bryan Smith wrote: > Hi everyone, > > I am just finishing up an application and I would like to create an app > file for my program. That said, it's CLI based with no GUI. If I try to make > an app, it only seems to work if I have a GUI. Is it possible to tell py2app > to open Terminal.app first and run my program through that? > > Thanks, > Bryan > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From conan at warp.byu.edu Thu Dec 25 04:34:56 2008 From: conan at warp.byu.edu (Conan C. Albrecht) Date: Wed, 24 Dec 2008 20:34:56 -0700 Subject: [Pythonmac-SIG] py2app and Terminal In-Reply-To: <7baa94f60812241402u3490a2f1i66d5ebd675b11371@mail.gmail.com> References: <7baa94f60812241402u3490a2f1i66d5ebd675b11371@mail.gmail.com> Message-ID: Be sure the shebang is at the TOP of your script -- first line with nothing in front of it. Py2app is really for GUI applications. The solution Sean suggests is the best way for a terminal app. ____________________________________ Conan C. Albrecht, Ph.D. Information Systems Department Brigham Young University Email: conan at warp.byu.edu Phone: +1-801-805-1615 Web/Blog: http://warp.byu.edu/ On Dec 24, 2008, at 15:02, Sean DiZazzo wrote: > Give your app a shebang line """#!/usr/bin/env python"" and then > rename the script ".command" > > Then you can double click it and it will open a shell and run. > > ~Sean > > On Wed, Dec 24, 2008 at 10:53 AM, Bryan Smith > wrote: > Hi everyone, > > I am just finishing up an application and I would like to create an > app file for my program. That said, it's CLI based with no GUI. If I > try to make an app, it only seems to work if I have a GUI. Is it > possible to tell py2app to open Terminal.app first and run my > program through that? > > Thanks, > Bryan > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2727 bytes Desc: not available URL: From blufur at gmail.com Thu Dec 25 18:34:31 2008 From: blufur at gmail.com (Dan) Date: Thu, 25 Dec 2008 12:34:31 -0500 Subject: [Pythonmac-SIG] python3 on my mac Message-ID: <5D58FE9F-E460-40A0-9A2D-706107F915A8@gmail.com> HI everyone. Wondering if anyone can help a newbie. I tried installing python 3 on my mac and think I messed up a bit: 1. I didn't do the altinstall option. Is this really bad, and should I uninstall and try again? Right now I have to type "python3.0" to get it to work at terminal screen 2. If so, how can I uninstall? Would time machine be of any help here? 3. I can't seem to get IDLE to work, especially with Python 3 (when I run it from terminal it has no menu bar and i think it's using python 2.x) Any help would be greatly appreciated. Hopefully I didn't permanently screw up my mac's python installation... From blufur at gmail.com Thu Dec 25 19:31:46 2008 From: blufur at gmail.com (Dan) Date: Thu, 25 Dec 2008 13:31:46 -0500 Subject: [Pythonmac-SIG] python3 on my mac In-Reply-To: <65fadfc30812251022ue7d9238y588892af6f4a9913@mail.gmail.com> References: <5D58FE9F-E460-40A0-9A2D-706107F915A8@gmail.com> <65fadfc30812251022ue7d9238y588892af6f4a9913@mail.gmail.com> Message-ID: <5DEAD615-665E-43CC-82A8-02E7FCB57B84@gmail.com> Thanks for requesting clarification. I am running Leopard (10.5.6) I installed from source - and just used the standard: ./configure make make test sudo make install I searched the archives of this discussion group, and learned I could see where all pythons are installed, and here's what things look like on my system: DMS-MacBook-2:~ dan$ ls -l /usr/local/bin/python* lrwxr-xr-x 1 root wheel 68 Oct 8 10:31 /usr/local/bin/python - > ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/python lrwxr-xr-x 1 root wheel 75 Oct 8 10:31 /usr/local/bin/python- config -> ../../../Library/Frameworks/Python.framework/Versions/2.6/ bin/python-config lrwxr-xr-x 1 root wheel 71 Oct 8 10:31 /usr/local/bin/ python2.6 -> ../../../Library/Frameworks/Python.framework/Versions/2.6/ bin/python2.6 lrwxr-xr-x 1 root wheel 78 Oct 8 10:31 /usr/local/bin/ python2.6-config -> ../../../Library/Frameworks/Python.framework/ Versions/2.6/bin/python2.6-config -rwxr-xr-x 1 root wheel 1658332 Dec 21 19:40 /usr/local/bin/python3.0 -rwxr-xr-x 1 root wheel 1401 Dec 21 19:41 /usr/local/bin/ python3.0-config lrwxr-xr-x 1 root wheel 69 Oct 8 10:31 /usr/local/bin/pythonw -> ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw lrwxr-xr-x 1 root wheel 72 Oct 8 10:31 /usr/local/bin/ pythonw2.6 -> ../../../Library/Frameworks/Python.framework/Versions/ 2.6/bin/pythonw2.6 As of now, if I type "python" at the terminal, it starts up interactive python version 2.6 If I type "python3.0", it starts interactive python 3.0 If I type "IDLE" it actually seems to open a window that says "python shell" and is running python 3.0 (even says IDLE 3.0 above prompt). But there's no menu for debugging, etc. So what I'm wondering is: 1. Should I have used altinstall (i.e. did I possibly break something by just using sudo make install? Can you all tell from those python version links above if I've screwed things up on my system?). 2. If so, can I undo what I've done? 3. How can I get the full version of IDLE running with the menu bar across the top? 4. Is there some online resource I could have used to do this properly? The links from python.org for mac info seems to be a bit out of date... Thanks for your help, and I apologize for my ignorance as someone new to all this. On Dec 25, 2008, at 1:22 PM, Nehemiah Dacres wrote: > I take it you're installing from source? or from macports? name the > method and we might be able to help you > > On Thu, Dec 25, 2008 at 11:34 AM, Dan wrote: > HI everyone. Wondering if anyone can help a newbie. I tried > installing python 3 on my mac and think I messed up a bit: > > 1. I didn't do the altinstall option. Is this really bad, and > should I uninstall and try again? Right now I have to type > "python3.0" to get it to work at terminal screen > 2. If so, how can I uninstall? Would time machine be of any help here? > 3. I can't seem to get IDLE to work, especially with Python 3 (when > I run it from terminal it has no menu bar and i think it's using > python 2.x) > > Any help would be greatly appreciated. Hopefully I didn't > permanently screw up my mac's python installation... > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > > > -- > > "lalalalala! it's not broken because I can use it" > > http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 From half.italian at gmail.com Thu Dec 25 20:02:40 2008 From: half.italian at gmail.com (Sean DiZazzo) Date: Thu, 25 Dec 2008 11:02:40 -0800 Subject: [Pythonmac-SIG] python3 on my mac In-Reply-To: <5DEAD615-665E-43CC-82A8-02E7FCB57B84@gmail.com> References: <5D58FE9F-E460-40A0-9A2D-706107F915A8@gmail.com> <65fadfc30812251022ue7d9238y588892af6f4a9913@mail.gmail.com> <5DEAD615-665E-43CC-82A8-02E7FCB57B84@gmail.com> Message-ID: <7baa94f60812251102x736f3badh7bbdc6cc5b99dd8d@mail.gmail.com> You didn't hurt your system install. I've been running python built from source like that alongside my system python for years with no problems. Not sure about IDLE... Mine works fine with 2.5.2 compiled and installed as you did. I'm curious of what the real benefits of installing python as a framework are, and what exactly it means to be a 'framework' Maybe it makes python more accessible to other parts of the OS? Maybe it helps when compiling mixed language packages...ie PyObjC or PyQT? I'm grabbing at straws... Google would probably help, but it's Christmas, and I think the group could benefit from knowing as well! Merry Christmas! ~Sean On Thu, Dec 25, 2008 at 10:31 AM, Dan wrote: > Thanks for requesting clarification. I am running Leopard (10.5.6) I > installed from source - and just used the standard: > > ./configure > make > make test > sudo make install > > I searched the archives of this discussion group, and learned I could see > where all pythons are installed, and here's what things look like on my > system: > > DMS-MacBook-2:~ dan$ ls -l /usr/local/bin/python* > lrwxr-xr-x 1 root wheel 68 Oct 8 10:31 /usr/local/bin/python -> > ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/python > lrwxr-xr-x 1 root wheel 75 Oct 8 10:31 > /usr/local/bin/python-config -> > ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/python-config > lrwxr-xr-x 1 root wheel 71 Oct 8 10:31 /usr/local/bin/python2.6 -> > ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 > lrwxr-xr-x 1 root wheel 78 Oct 8 10:31 > /usr/local/bin/python2.6-config -> > ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config > -rwxr-xr-x 1 root wheel 1658332 Dec 21 19:40 /usr/local/bin/python3.0 > -rwxr-xr-x 1 root wheel 1401 Dec 21 19:41 > /usr/local/bin/python3.0-config > lrwxr-xr-x 1 root wheel 69 Oct 8 10:31 /usr/local/bin/pythonw -> > ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw > lrwxr-xr-x 1 root wheel 72 Oct 8 10:31 /usr/local/bin/pythonw2.6 > -> ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6 > > As of now, if I type "python" at the terminal, it starts up interactive > python version 2.6 > If I type "python3.0", it starts interactive python 3.0 > > If I type "IDLE" it actually seems to open a window that says "python > shell" and is running python 3.0 (even says IDLE 3.0 above prompt). > > But there's no menu for debugging, etc. > > So what I'm wondering is: > 1. Should I have used altinstall (i.e. did I possibly break something by > just using sudo make install? Can you all tell from those python version > links above if I've screwed things up on my system?). > 2. If so, can I undo what I've done? > 3. How can I get the full version of IDLE running with the menu bar across > the top? > 4. Is there some online resource I could have used to do this properly? > The links from python.org for mac info seems to be a bit out of date... > > Thanks for your help, and I apologize for my ignorance as someone new to > all this. > > > On Dec 25, 2008, at 1:22 PM, Nehemiah Dacres wrote: > > I take it you're installing from source? or from macports? name the method >> and we might be able to help you >> >> >> On Thu, Dec 25, 2008 at 11:34 AM, Dan wrote: >> HI everyone. Wondering if anyone can help a newbie. I tried installing >> python 3 on my mac and think I messed up a bit: >> >> 1. I didn't do the altinstall option. Is this really bad, and should I >> uninstall and try again? Right now I have to type "python3.0" to get it to >> work at terminal screen >> 2. If so, how can I uninstall? Would time machine be of any help here? >> 3. I can't seem to get IDLE to work, especially with Python 3 (when I run >> it from terminal it has no menu bar and i think it's using python 2.x) >> >> Any help would be greatly appreciated. Hopefully I didn't permanently >> screw up my mac's python installation... >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> >> >> -- >> >> "lalalalala! it's not broken because I can use it" >> >> >> http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blufur at gmail.com Thu Dec 25 20:17:34 2008 From: blufur at gmail.com (Dan) Date: Thu, 25 Dec 2008 14:17:34 -0500 Subject: [Pythonmac-SIG] python3 on my mac In-Reply-To: <135A3240-3BAE-4CDA-9C30-B475D8167CF3@gmail.com> References: <5D58FE9F-E460-40A0-9A2D-706107F915A8@gmail.com> <65fadfc30812251022ue7d9238y588892af6f4a9913@mail.gmail.com> <5DEAD615-665E-43CC-82A8-02E7FCB57B84@gmail.com> <7baa94f60812251102x736f3badh7bbdc6cc5b99dd8d@mail.gmail.com> <135A3240-3BAE-4CDA-9C30-B475D8167CF3@gmail.com> Message-ID: <26F08533-FFC5-4DB2-947C-8418404207E4@gmail.com> Thanks everyone so far for the help. In regard to IDLE - right now when I type IDLE at the terminal I get a python shell that looks like the attached image (myidle.jpg). As you can see there is no real GUI with menu, as opposed to the full IDLE program (see http://en.wikipedia.org/wiki/File:Idle_gui.png) that usually includes "File, Edit, Shell, Debug, Options, Windows, Help... Any suggestions about how to get that running on my mac, especially using Python 3.0 as the interpreter? Happy Holidays to everyone. -------------- next part -------------- A non-text attachment was scrubbed... Name: myidle.jpg Type: image/jpeg Size: 16692 bytes Desc: not available URL: -------------- next part -------------- > On Dec 25, 2008, at 2:02 PM, Sean DiZazzo wrote: > >> You didn't hurt your system install. I've been running python >> built from source like that alongside my system python for years >> with no problems. >> >> Not sure about IDLE... Mine works fine with 2.5.2 compiled and >> installed as you did. >> >> I'm curious of what the real benefits of installing python as a >> framework are, and what exactly it means to be a 'framework' Maybe >> it makes python more accessible to other parts of the OS? Maybe it >> helps when compiling mixed language packages...ie PyObjC or PyQT? >> I'm grabbing at straws... Google would probably help, but it's >> Christmas, and I think the group could benefit from knowing as well! >> >> Merry Christmas! >> >> ~Sean >> >> >> On Thu, Dec 25, 2008 at 10:31 AM, Dan wrote: >> Thanks for requesting clarification. I am running Leopard (10.5.6) >> I installed from source - and just used the standard: >> >> ./configure >> make >> make test >> sudo make install >> >> I searched the archives of this discussion group, and learned I >> could see where all pythons are installed, and here's what things >> look like on my system: >> >> DMS-MacBook-2:~ dan$ ls -l /usr/local/bin/python* >> lrwxr-xr-x 1 root wheel 68 Oct 8 10:31 /usr/local/bin/ >> python -> ../../../Library/Frameworks/Python.framework/Versions/2.6/ >> bin/python >> lrwxr-xr-x 1 root wheel 75 Oct 8 10:31 /usr/local/bin/ >> python-config -> ../../../Library/Frameworks/Python.framework/ >> Versions/2.6/bin/python-config >> lrwxr-xr-x 1 root wheel 71 Oct 8 10:31 /usr/local/bin/ >> python2.6 -> ../../../Library/Frameworks/Python.framework/Versions/ >> 2.6/bin/python2.6 >> lrwxr-xr-x 1 root wheel 78 Oct 8 10:31 /usr/local/bin/ >> python2.6-config -> ../../../Library/Frameworks/Python.framework/ >> Versions/2.6/bin/python2.6-config >> -rwxr-xr-x 1 root wheel 1658332 Dec 21 19:40 /usr/local/bin/ >> python3.0 >> -rwxr-xr-x 1 root wheel 1401 Dec 21 19:41 /usr/local/bin/ >> python3.0-config >> lrwxr-xr-x 1 root wheel 69 Oct 8 10:31 /usr/local/bin/ >> pythonw -> ../../../Library/Frameworks/Python.framework/Versions/ >> 2.6/bin/pythonw >> lrwxr-xr-x 1 root wheel 72 Oct 8 10:31 /usr/local/bin/ >> pythonw2.6 -> ../../../Library/Frameworks/Python.framework/Versions/ >> 2.6/bin/pythonw2.6 >> >> As of now, if I type "python" at the terminal, it starts up >> interactive python version 2.6 >> If I type "python3.0", it starts interactive python 3.0 >> >> If I type "IDLE" it actually seems to open a window that says >> "python shell" and is running python 3.0 (even says IDLE 3.0 above >> prompt). >> >> But there's no menu for debugging, etc. >> >> So what I'm wondering is: >> 1. Should I have used altinstall (i.e. did I possibly break >> something by just using sudo make install? Can you all tell from >> those python version links above if I've screwed things up on my >> system?). >> 2. If so, can I undo what I've done? >> 3. How can I get the full version of IDLE running with the menu bar >> across the top? >> 4. Is there some online resource I could have used to do this >> properly? The links from python.org for mac info seems to be a bit >> out of date... >> >> Thanks for your help, and I apologize for my ignorance as someone >> new to all this. >> >> >> On Dec 25, 2008, at 1:22 PM, Nehemiah Dacres wrote: >> >> I take it you're installing from source? or from macports? name the >> method and we might be able to help you >> >> >> On Thu, Dec 25, 2008 at 11:34 AM, Dan wrote: >> HI everyone. Wondering if anyone can help a newbie. I tried >> installing python 3 on my mac and think I messed up a bit: >> >> 1. I didn't do the altinstall option. Is this really bad, and >> should I uninstall and try again? Right now I have to type >> "python3.0" to get it to work at terminal screen >> 2. If so, how can I uninstall? Would time machine be of any help >> here? >> 3. I can't seem to get IDLE to work, especially with Python 3 (when >> I run it from terminal it has no menu bar and i think it's using >> python 2.x) >> >> Any help would be greatly appreciated. Hopefully I didn't >> permanently screw up my mac's python installation... >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> >> >> -- >> >> "lalalalala! it's not broken because I can use it" >> >> http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > From Jack.Jansen at cwi.nl Fri Dec 26 22:33:10 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Fri, 26 Dec 2008 22:33:10 +0100 Subject: [Pythonmac-SIG] python3 on my mac In-Reply-To: <26F08533-FFC5-4DB2-947C-8418404207E4@gmail.com> References: <5D58FE9F-E460-40A0-9A2D-706107F915A8@gmail.com> <65fadfc30812251022ue7d9238y588892af6f4a9913@mail.gmail.com> <5DEAD615-665E-43CC-82A8-02E7FCB57B84@gmail.com> <7baa94f60812251102x736f3badh7bbdc6cc5b99dd8d@mail.gmail.com> <135A3240-3BAE-4CDA-9C30-B475D8167CF3@gmail.com> <26F08533-FFC5-4DB2-947C-8418404207E4@gmail.com> Message-ID: <70293DB5-FBD3-44B1-8A2E-546516FA9CAF@cwi.nl> On 25 dec 2008, at 20:17, Dan wrote: > Thanks everyone so far for the help. > > In regard to IDLE - right now when I type IDLE at the terminal I get > a python shell that looks like the attached image (myidle.jpg). As > you can see there is no real GUI with menu, as opposed to the full > IDLE program (see http://en.wikipedia.org/wiki/File:Idle_gui.png) > that usually includes "File, Edit, Shell, Debug, Options, Windows, > Help... > > Any suggestions about how to get that running on my mac, especially > using Python 3.0 as the interpreter? > > Happy Holidays to everyone. > > This looks like a perfectly normal IDLE window to me... You said in a previous message that you're a newbie (so please excuse me if I'm asking something ridiculous:-): are you aware of the fact that Mac programs have their menu bar at the top of the screen, not inside the window (as it is on Windows)? The File/Edit/etc menus should be in the system menubar, at top-of- screen. So, either you've overlooked them, or (more probable) they're somehow missing in IDLE for Python 3.0. If the latter is the case: what do you see in the menu bar? You may also want to try running IDLE from a Terminal window, just to check that it isn't giving useful output on stderr ("Error creating menu bar: bla bla bla"). -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From vip at avatar.com.au Sat Dec 27 14:10:55 2008 From: vip at avatar.com.au (DavidW) Date: Sun, 28 Dec 2008 00:10:55 +1100 Subject: [Pythonmac-SIG] update on v2.6 Message-ID: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> Hello all - seasons greetings! Would someone give a _short_ eval./summary of the state of v2.6 - I'm wondering how stable it is and whether I might need to put aside some a decent amount of time to upgrade. I use quite a lot of 3rd party packages including numpy, wxpython, matplotlib etc etc. I'd like to pass the response back to the csound dev. group, it that's OK. thanks for your help, David ________________________________________________ - Sonic Communications Research Group: creative.canberra.edu.au/scrg - Experimental Polymedia: www.avatar.com.au - Capital Markets Cooperative Research Centre: www.cmcrc.com - Education for Financial Independence: www.mindthemarkets.com.au From dav at alum.mit.edu Sat Dec 27 18:25:13 2008 From: dav at alum.mit.edu (Dav Clark) Date: Sat, 27 Dec 2008 12:25:13 -0500 Subject: [Pythonmac-SIG] update on v2.6 In-Reply-To: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> Message-ID: <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> This is probably the best place to track the answer to your question: http://projects.scipy.org/scipy/numpy/milestone/1.3.0 Once that's done, you should expect other projects to gain support quickly. Cheers, Dav On Dec 27, 2008, at 8:10 AM, DavidW wrote: > Hello all - seasons greetings! > > Would someone give a _short_ eval./summary of the state of v2.6 - > I'm wondering how stable it is and whether I might need to put aside > some a decent amount of time to upgrade. > I use quite a lot of 3rd party packages including numpy, wxpython, > matplotlib etc etc. > > I'd like to pass the response back to the csound dev. group, it > that's OK. > > thanks for your help, > > David > > ________________________________________________ > - Sonic Communications Research Group: creative.canberra.edu.au/scrg > - Experimental Polymedia: www.avatar.com.au > - Capital Markets Cooperative Research Centre: www.cmcrc.com > - Education for Financial Independence: www.mindthemarkets.com.au > > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From chris.van.bael at gmail.com Sat Dec 27 19:21:46 2008 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Sat, 27 Dec 2008 19:21:46 +0100 Subject: [Pythonmac-SIG] PyGTK on OSX? Message-ID: <5465ee790812271021q693e822em105adfef75dc7651@mail.gmail.com> Hi all, I'm trying to get our program to run on OSX (see www.schoolsplay.org) We use GTK and Pango for RTL support and better font rendering. I installed the framework from http://www.gtk-osx.org/, but PyGTK doesn't seem to be installed. Does anybody have an idea where I can get a binary build of PyGTK? Or where I can find building instructions that don't need DarwinPorts? Any particular things I have to keep in mind while making an Application Bundle with GTK on OSX? Thanks, Chris From vip at avatar.com.au Sun Dec 28 19:59:35 2008 From: vip at avatar.com.au (DavidW) Date: Mon, 29 Dec 2008 05:59:35 +1100 Subject: [Pythonmac-SIG] update on v2.6 In-Reply-To: <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> Message-ID: Thanks for your reply Dav. Although the link is useful it was only marginally related to my question, which was about about v2.6 compatability in general, not just numpy. (For which there seems to be no numpy .dmg yet). I a capable of visiting all the 3rd party sites in turn and seeing if there is a binary etc etc then downloading them and doing a series of cross checks for combatability - then I could answer my own question which I wouldn't have needed to ask. I was hoping someone closer to the bleeding edge might have done some of it and been able to report progress. ciao4now, David On 28/12/2008, at 4:25 AM, Dav Clark wrote: > This is probably the best place to track the answer to your question: > > http://projects.scipy.org/scipy/numpy/milestone/1.3.0 > > Once that's done, you should expect other projects to gain support > quickly. > > Cheers, > Dav > > On Dec 27, 2008, at 8:10 AM, DavidW wrote: > >> Hello all - seasons greetings! >> >> Would someone give a _short_ eval./summary of the state of v2.6 - >> I'm wondering how stable it is and whether I might need to put >> aside some a decent amount of time to upgrade. >> I use quite a lot of 3rd party packages including numpy, wxpython, >> matplotlib etc etc. >> >> I'd like to pass the response back to the csound dev. group, it >> that's OK. >> >> thanks for your help, >> >> David >> >> ________________________________________________ >> - Sonic Communications Research Group: creative.canberra.edu.au/scrg >> - Experimental Polymedia: www.avatar.com.au >> - Capital Markets Cooperative Research Centre: www.cmcrc.com >> - Education for Financial Independence: www.mindthemarkets.com.au >> >> >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > ________________________________________________ David Worrall. - Experimental Polymedia: www.avatar.com.au - Education for Financial Independence: www.mindthemarkets.com.au Australian research affiliations: - Capital Markets Cooperative Research Centre: www.cmcrc.com - Sonic Communications Research Group: creative.canberra.edu.au/scrg - MARCS Auditory Laboratories: marcs.uws.edu.au From jf at ai.univ-paris8.fr Mon Dec 29 16:01:31 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 29 Dec 2008 16:01:31 +0100 Subject: [Pythonmac-SIG] string ids In-Reply-To: References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> Message-ID: I thought a string was stored as a unique object, so why isn't this evidenced by the code below ? Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin >>> [light is 'green' for light in 'green', 'red'] [True, False] >>> color = 'green' >>> [light is 'green' for light in 'green', 'red'] [False, False] >>> color = 1 >>> [light is 'green' for light in 'green', 'red'] [True, False] whereas: >>> [x is 1 for x in 1, 2] [True, False] whether the value 1 is assigned to some other variable or not... the id of 1 doesn't vary -- just what is the rationale behind that? I know I could use the == predicate instead, but just how many different greens (with different ids) can there be, and how do I know which one is under focus at a given time? -- Jym Feat ~ Paris FR 75018 From half.italian at gmail.com Mon Dec 29 16:31:37 2008 From: half.italian at gmail.com (Sean DiZazzo) Date: Mon, 29 Dec 2008 07:31:37 -0800 Subject: [Pythonmac-SIG] string ids In-Reply-To: References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> Message-ID: <7baa94f60812290731j39384a95he690adb322b6bf0e@mail.gmail.com> Interesting... It behaves correctly for strings if you use a list inside the comprehension instead of a tuple. ~Sean On Mon, Dec 29, 2008 at 7:01 AM, Feat wrote: > I thought a string was stored as a unique object, so why isn't this > evidenced by the code below ? > > Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) > [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin > >>> [light is 'green' for light in 'green', 'red'] > [True, False] > >>> color = 'green' > >>> [light is 'green' for light in 'green', 'red'] > [False, False] > >>> color = 1 > >>> [light is 'green' for light in 'green', 'red'] > [True, False] > > whereas: > > >>> [x is 1 for x in 1, 2] > [True, False] > > whether the value 1 is assigned to some other variable or not... the id of > 1 doesn't vary -- just what is the rationale behind that? > > I know I could use the == predicate instead, but just how many different > greens (with different ids) can there be, and how do I know which one is > under focus at a given time? > > -- > Jym Feat ~ Paris FR 75018 > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jf at ai.univ-paris8.fr Mon Dec 29 16:52:35 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 29 Dec 2008 16:52:35 +0100 Subject: [Pythonmac-SIG] string ids In-Reply-To: <7baa94f60812290731j39384a95he690adb322b6bf0e@mail.gmail.com> References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> <7baa94f60812290731j39384a95he690adb322b6bf0e@mail.gmail.com> Message-ID: Maybe at first sight, but look: Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin >>> C = 'red', 'green' >>> [light is 'green' for light in C] [False, False] NB: I have to quit Python each time and reload to make sure the workspace hasn't been polluted by some other definition. The problem is I teach the Python language, and this is no easy to explain behavior, unless it has something to do with interning strings for performance reasons in a for context, but even so, this isn't obvious for beginners. From jf at ai.univ-paris8.fr Mon Dec 29 17:04:46 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 29 Dec 2008 17:04:46 +0100 Subject: [Pythonmac-SIG] string ids Message-ID: The only way to ensure it will *always* work is when sharing values: Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin >>> c1 = 'red' ; c2 = 'green' ; colors = (c1, c2) >>> [x is c2 for x in colors] [False, True] Any new list will break the identity: >>> [x is c2 for x in 'red green'.split()] [False, False] >>> [x is 'green' for x in 'red green'.split()] [False, False] I'm baffled... From ronaldoussoren at mac.com Mon Dec 29 16:59:30 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 29 Dec 2008 16:59:30 +0100 Subject: [Pythonmac-SIG] string ids In-Reply-To: References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> Message-ID: <106205477636088182517245762895177479505-Webmail@me.com> On Monday, December 29, 2008, at 04:01PM, "Feat" wrote: >I thought a string was stored as a unique object, so why isn't this evidenced by the code below ? Because strings aren't stored as unique objects. That is, there is no guarantee whatsoever that 'string1 == string2' implies 'string1 is string2'. Ronald From ronaldoussoren at mac.com Mon Dec 29 16:57:24 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 29 Dec 2008 16:57:24 +0100 Subject: [Pythonmac-SIG] string ids Message-ID: <55709011183170157762537400421156640144-Webmail@me.com> Do not rely on the id of instances of builtin types of Python. The "is" operator is used to determine if two expressions refer to the same object, use the "==" operator to determine if two expressions have the same value. For some builtin value types the interpreter always uses the same Python object for the same value, for other types it does not. That's purely an implementation detail, future versions of Python may behave differently in this respect. That's the explanation for the behaviour you're seeing. When you execute this code: :>>> x = 'blue' :>>> y = 'bl' + 'ue' :>>> a = 1 :>>> b = 2/2 "x" and "y" refer to two different string objects with the value 'blue'. "a" and "b" refer to the same integer object with value 1, which is due to the optimisation I mentioned earlier. This is not true for arbitrary objects though: :>>> c = 2 ** 12 :>>> d = 2 ** 12 :>>> c is d False Ronald On Monday, December 29, 2008, at 04:31PM, "Sean DiZazzo" wrote: >Interesting... It behaves correctly for strings if you use a list inside the >comprehension instead of a tuple. >~Sean > >On Mon, Dec 29, 2008 at 7:01 AM, Feat wrote: > >> I thought a string was stored as a unique object, so why isn't this >> evidenced by the code below ? >> >> Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) >> [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin >> >>> [light is 'green' for light in 'green', 'red'] >> [True, False] >> >>> color = 'green' >> >>> [light is 'green' for light in 'green', 'red'] >> [False, False] >> >>> color = 1 >> >>> [light is 'green' for light in 'green', 'red'] >> [True, False] >> >> whereas: >> >> >>> [x is 1 for x in 1, 2] >> [True, False] >> >> whether the value 1 is assigned to some other variable or not... the id of >> 1 doesn't vary -- just what is the rationale behind that? >> >> I know I could use the == predicate instead, but just how many different >> greens (with different ids) can there be, and how do I know which one is >> under focus at a given time? >> >> -- >> Jym Feat ~ Paris FR 75018 >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > From jf at ai.univ-paris8.fr Mon Dec 29 17:09:49 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 29 Dec 2008 17:09:49 +0100 Subject: [Pythonmac-SIG] string ids In-Reply-To: <106205477636088182517245762895177479505-Webmail@me.com> References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> <106205477636088182517245762895177479505-Webmail@me.com> Message-ID: At 16:59 +0100 29/12/08, Ronald Oussoren wrote: >Because strings aren't stored as unique objects. That is, there is no guarantee whatsoever that 'string1 == string2' implies 'string1 is string2'. Optimization, uh? Okay, that settles it: thanks! -- Jym Feat ~ Paris FR 75018 From negativesum at gmail.com Mon Dec 29 17:21:12 2008 From: negativesum at gmail.com (David Hostetler) Date: Mon, 29 Dec 2008 11:21:12 -0500 Subject: [Pythonmac-SIG] string ids In-Reply-To: References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> <106205477636088182517245762895177479505-Webmail@me.com> Message-ID: <687a7c670812290821q18cd5654k50269b33dec15292@mail.gmail.com> see: http://docs.python.org/reference/expressions.html#id24 "Due to automatic garbage-collection, free lists, and the dynamic nature of descriptors, you may notice seemingly unusual behaviour in certain uses of the is operator, like those involving comparisons between instance methods, or constants. Check their documentation for more info." As for teaching this issue, I would imagine that the appropriate distinction needs to be made between 'is' as a built-in operator that performs object identity comparison, vs. lexicographical comparison. Also: http://docs.python.org/library/stdtypes.html#comparisons http://docs.python.org/reference/expressions.html#comparisons On Mon, Dec 29, 2008 at 11:09 AM, Feat wrote: > At 16:59 +0100 29/12/08, Ronald Oussoren wrote: >>Because strings aren't stored as unique objects. That is, there is no guarantee whatsoever that 'string1 == string2' implies 'string1 is string2'. > > Optimization, uh? Okay, that settles it: thanks! > > -- > Jym Feat ~ Paris FR 75018 > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From negativesum at gmail.com Mon Dec 29 17:30:03 2008 From: negativesum at gmail.com (David Hostetler) Date: Mon, 29 Dec 2008 11:30:03 -0500 Subject: [Pythonmac-SIG] string ids In-Reply-To: <687a7c670812290821q18cd5654k50269b33dec15292@mail.gmail.com> References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> <106205477636088182517245762895177479505-Webmail@me.com> <687a7c670812290821q18cd5654k50269b33dec15292@mail.gmail.com> Message-ID: <687a7c670812290830m1fd372c1u26aeb86e210c924e@mail.gmail.com> To describe it another way: 'is' does exactly what it say it does -- tests for object instance equivalence. That's _NOT_ the same as type value equivalence. Perhaps think of 'is' as doing memory address, or pointer, comparison, if you've done any C/C++ programming. If you need to do that kind of comparison, 'is' is there for you. Chances are you probably don't, and instead you're interested in value comparison, in which case you need to stick to the operators and functions that do normal value comparisons. The 'weird' results you were seeing when using 'is' were really just the python interpretor lifting up its skirts a bit and (inadvertantly perhaps) revealing when it had shared the memory storage for a string literal and when it hadn't. On Mon, Dec 29, 2008 at 11:21 AM, David Hostetler wrote: > see: http://docs.python.org/reference/expressions.html#id24 > > "Due to automatic garbage-collection, free lists, and the dynamic > nature of descriptors, you may notice seemingly unusual behaviour in > certain uses of the is operator, like those involving comparisons > between instance methods, or constants. Check their documentation for > more info." > > > As for teaching this issue, I would imagine that the appropriate > distinction needs to be made between 'is' as a built-in operator that > performs object identity comparison, vs. lexicographical comparison. > > > Also: > http://docs.python.org/library/stdtypes.html#comparisons > http://docs.python.org/reference/expressions.html#comparisons > > > On Mon, Dec 29, 2008 at 11:09 AM, Feat wrote: >> At 16:59 +0100 29/12/08, Ronald Oussoren wrote: >>>Because strings aren't stored as unique objects. That is, there is no guarantee whatsoever that 'string1 == string2' implies 'string1 is string2'. >> >> Optimization, uh? Okay, that settles it: thanks! >> >> -- >> Jym Feat ~ Paris FR 75018 >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > From jf at ai.univ-paris8.fr Mon Dec 29 20:46:37 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 29 Dec 2008 20:46:37 +0100 Subject: [Pythonmac-SIG] string ids In-Reply-To: <687a7c670812290830m1fd372c1u26aeb86e210c924e@mail.gmail.com> References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> <106205477636088182517245762895177479505-Webmail@me.com> <687a7c670812290821q18cd5654k50269b33dec15292@mail.gmail.com> <687a7c670812290830m1fd372c1u26aeb86e210c924e@mail.gmail.com> Message-ID: At 11:30 -0500 29/12/08, David Hostetler wrote: >The 'weird' results you were seeing when using 'is' were really just the python interpretor lifting up its skirts a bit and (inadvertantly perhaps) revealing when it had shared the memory storage for a string literal and when it hadn't. Yes: thank you. Is there any way to predict whether the values are going to be shared or not? As a matter of fact, the ids are the same as long as I do not use any for statement with the values in a sequence, and when I use any, it will sometimes get them from the context and some other times it will make up new values. I had hoped I could tell my students how to discriminate between the two cases. They are no C programmers yet, but they're fully aware of the difference between the eq() and equal() Lisp predicates, eq() being totally reliable as for pointers comparison. -- Jym Feat ~ Paris FR 75018 From pythonmac at rebertia.com Tue Dec 30 02:29:17 2008 From: pythonmac at rebertia.com (Chris Rebert) Date: Mon, 29 Dec 2008 17:29:17 -0800 Subject: [Pythonmac-SIG] string ids In-Reply-To: References: <392DE3C3-9F9F-4508-9AD4-97B2FFA643F9@avatar.com.au> <423E9C0F-8D36-4C20-99C1-B26C26F28387@alum.mit.edu> <106205477636088182517245762895177479505-Webmail@me.com> <687a7c670812290821q18cd5654k50269b33dec15292@mail.gmail.com> <687a7c670812290830m1fd372c1u26aeb86e210c924e@mail.gmail.com> Message-ID: <47c890dc0812291729n44189530me781ac62fde3c09f@mail.gmail.com> On Mon, Dec 29, 2008 at 11:46 AM, Feat wrote: > At 11:30 -0500 29/12/08, David Hostetler wrote: >>The 'weird' results you were seeing when using 'is' were really just the python interpretor lifting up its skirts a bit and (inadvertantly perhaps) revealing when it had shared the memory storage for a string literal and when it hadn't. > > Yes: thank you. Is there any way to predict whether the values are going to be shared or not? As a matter of fact, the ids are the same as long as I do not use any for statement with the values in a sequence, and when I use any, it will sometimes get them from the context and some other times it will make up new values. I think the interpreter only automatically interns extremely short strings, like one or two characters long, and the empty string of course. In any case, you shouldn't worry about it or really care about the mysterious rules the interpreter uses to decide when to share a string. As explained below, you almost always should use == and not `is`; thus, comparing strings for pointer equality almost never comes up in practice, so the 'sharing' rules don't matter much at all. > I had hoped I could tell my students how to discriminate between the two cases. They are no C programmers yet, but they're fully aware of the difference between the eq() and equal() Lisp predicates, eq() being totally reliable as for pointers comparison. The difference between `is` and == is exactly the same as between eq() and equal(), pointer equality versus value equality. `is` is used extremely rarely, apart from comparisons with None, with `if foo is None:` being idiomatic in that case. Unless you're comparing with None or have very good reason, always use ==. It's similar to how one should always use .equals() rather than == with objects in Java. If you want to give your students a more straightforward example to demonstrate the difference, use a normal, non-builtin object instead of a string so that the interpreter doesn't do any unexpected magical sharing. For example, write a simple Point class and show how: a = Point(1, 2) b = Point(1, 2) c = a print a == b #---> True print a is b, b is a #---> False False print a is c, c is a #---> True True Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com From joe at strout.net Tue Dec 30 22:26:19 2008 From: joe at strout.net (Joe Strout) Date: Tue, 30 Dec 2008 14:26:19 -0700 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? Message-ID: <495A91FB.20509@strout.net> I'm still struggling to build Mac apps (based on wxPython and MySQL) that work on any 10.4 or 10.5 machine. I understand that the general picture is: 1. Install the latest python.org Python release on 10.4 (make sure it's a universal binary). 2. Install setuptools (including py2app). 3. Install MySQL. 4. Build and install MySQLdb. 5. Use py2applet to generate a setup.py file. 6. Tweak setup.py as needed, then use it (with the py2app command) to build an app. 7. Cross fingers and pray to favorite deity. We've gotten most of this mostly working on 10.5 Intel, but now to make a properly portable app, I need to go back and do it all again on a 10.4 machine. I'm stuck on step 1. says "On Mac OS X 10.3.9 or 10.4, download and run an installer for the latest version. This is a Universal binary version of Python that runs natively on PPC and Intel systems." But the link ( to ) actually claims to contain "Mac OS X 10.4 (Python 2.4.1 framework build, PPC ONLY)". This is neither the latest version, nor a Universal binary. (Nor does it actually appear to be Python -- instead it looks like a collection of four different extension sets plus a "TigerPython24Fix". So... if following the directions on python.org isn't going to work, how exactly should I get the latest 2.5 framework release of Python installed on 10.4? Thanks, - Joe From joe at strout.net Tue Dec 30 22:26:19 2008 From: joe at strout.net (Joe Strout) Date: Tue, 30 Dec 2008 14:26:19 -0700 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? Message-ID: <495A91FB.20509@strout.net> I'm still struggling to build Mac apps (based on wxPython and MySQL) that work on any 10.4 or 10.5 machine. I understand that the general picture is: 1. Install the latest python.org Python release on 10.4 (make sure it's a universal binary). 2. Install setuptools (including py2app). 3. Install MySQL. 4. Build and install MySQLdb. 5. Use py2applet to generate a setup.py file. 6. Tweak setup.py as needed, then use it (with the py2app command) to build an app. 7. Cross fingers and pray to favorite deity. We've gotten most of this mostly working on 10.5 Intel, but now to make a properly portable app, I need to go back and do it all again on a 10.4 machine. I'm stuck on step 1. says "On Mac OS X 10.3.9 or 10.4, download and run an installer for the latest version. This is a Universal binary version of Python that runs natively on PPC and Intel systems." But the link ( to ) actually claims to contain "Mac OS X 10.4 (Python 2.4.1 framework build, PPC ONLY)". This is neither the latest version, nor a Universal binary. (Nor does it actually appear to be Python -- instead it looks like a collection of four different extension sets plus a "TigerPython24Fix". So... if following the directions on python.org isn't going to work, how exactly should I get the latest 2.5 framework release of Python installed on 10.4? Thanks, - Joe From codyprecord at gmail.com Tue Dec 30 22:32:58 2008 From: codyprecord at gmail.com (Cody Precord) Date: Tue, 30 Dec 2008 15:32:58 -0600 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? In-Reply-To: <495A91FB.20509@strout.net> References: <495A91FB.20509@strout.net> Message-ID: Hello, On Tue, Dec 30, 2008 at 3:26 PM, Joe Strout wrote: > > says "On Mac OS X 10.3.9 or 10.4, > download and run an installer for the latest version. This is a Universal > binary version of Python that runs natively on PPC and Intel systems." But > the link ( to ) actually claims to > contain "Mac OS X 10.4 (Python 2.4.1 framework build, PPC ONLY)". This is > neither the latest version, nor a Universal binary. (Nor does it actually > appear to be Python -- instead it looks like a collection of four different > extension sets plus a "TigerPython24Fix". > > So... if following the directions on python.org isn't going to work, how > exactly should I get the latest 2.5 framework release of Python installed on > 10.4? http://python.org -> Download -> 2.5.2 -> Scroll screen down to Mac OSX: Universal Binary for 10.3.9 and higher: http://python.org/ftp/python/2.5.2/python-2.5.2-macosx.dmg Cody -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at strout.net Tue Dec 30 22:46:30 2008 From: joe at strout.net (Joe Strout) Date: Tue, 30 Dec 2008 14:46:30 -0700 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? In-Reply-To: <495A91FB.20509@strout.net> References: <495A91FB.20509@strout.net> Message-ID: <495A96B6.1040603@strout.net> Hmm, I'm not sure why that appeared twice. But anyway, possibly answering my own question... Joe Strout wrote: > So... if following the directions on python.org isn't going to work, how > exactly should I get the latest 2.5 framework release of Python > installed on 10.4? I poked around via the instructions for 10.5, and found , which leads to a 2.5 installer that claims to work on 10.3.9 and later. So I'm trying that now... Nuts. This isn't the latest 2.5, either; it appears to be 2.5.0 (from September 2006). I know that our app takes advantages of some bug fixes in later versions of wx, at the very least, and who knows whether it also needs something fixed in Python itself between 2.5.0 and 2.5.4. ... Aha, it looks like if I ignore all the "Mac" links directly off of python.org, and instead go to the Download page and follow the "Python 2.5.2" link (the latest 2.5 release listed there), and from there jump to the 2.5.4 page which the download page failed to list, I finally get to here , which links to a Universal installer for 2.5.4. I'll try that next. Best, - Joe From joe at strout.net Tue Dec 30 22:46:30 2008 From: joe at strout.net (Joe Strout) Date: Tue, 30 Dec 2008 14:46:30 -0700 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? In-Reply-To: <495A91FB.20509@strout.net> References: <495A91FB.20509@strout.net> Message-ID: <495A96B6.1040603@strout.net> Hmm, I'm not sure why that appeared twice. But anyway, possibly answering my own question... Joe Strout wrote: > So... if following the directions on python.org isn't going to work, how > exactly should I get the latest 2.5 framework release of Python > installed on 10.4? I poked around via the instructions for 10.5, and found , which leads to a 2.5 installer that claims to work on 10.3.9 and later. So I'm trying that now... Nuts. This isn't the latest 2.5, either; it appears to be 2.5.0 (from September 2006). I know that our app takes advantages of some bug fixes in later versions of wx, at the very least, and who knows whether it also needs something fixed in Python itself between 2.5.0 and 2.5.4. ... Aha, it looks like if I ignore all the "Mac" links directly off of python.org, and instead go to the Download page and follow the "Python 2.5.2" link (the latest 2.5 release listed there), and from there jump to the 2.5.4 page which the download page failed to list, I finally get to here , which links to a Universal installer for 2.5.4. I'll try that next. Best, - Joe From Chris.Barker at noaa.gov Wed Dec 31 18:33:57 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 31 Dec 2008 09:33:57 -0800 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? In-Reply-To: <495A96B6.1040603@strout.net> References: <495A91FB.20509@strout.net> <495A96B6.1040603@strout.net> Message-ID: <495BAD05.8010507@noaa.gov> Joe Strout wrote: >> So... if following the directions on python.org isn't going to work, I guess those instructions are old -- we really need to update them! > I poked around via the instructions for 10.5, and found > , That site is no longer maintained. Partly because python.org and many package maintainers are simply releasing their own builds, and partly because Bob I. seems to be doing other things. Personally, I still think there is a need for a site like that -- OS-X is still a strange beast that is not as widely used as the other platforms. I'd contribute to it but I'm not in a position to host it, or have the time to be the core maintainer. Oh well. > go to the Download page and follow the "Python > 2.5.2" link (the latest 2.5 release listed there), and from there jump > to the 2.5.4 page which the download page failed to list, I finally get > to here , which links to a > Universal installer for 2.5.4. I'll try that next. yup -- that's what you want. Sometimes it's easier than you expect! Does anyone here have permissions to edit the python.org site? 1) It would be nice for the "quick links" in the left to point to a OS-X download too. 2) This page: http://www.python.org/download/mac/ needs updating. Joe, was that where you got your out-of-date info? -Chris -- 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 From joe at strout.net Wed Dec 31 18:48:18 2008 From: joe at strout.net (Joe Strout) Date: Wed, 31 Dec 2008 10:48:18 -0700 Subject: [Pythonmac-SIG] How to install latest 2.5 in OS X 10.4? In-Reply-To: <495BAD05.8010507@noaa.gov> References: <495A91FB.20509@strout.net> <495A96B6.1040603@strout.net> <495BAD05.8010507@noaa.gov> Message-ID: <495BB062.6060407@strout.net> Christopher Barker wrote: > I guess those instructions are old -- we really need to update them! > >> I poked around via the instructions for 10.5, and found >> , > > That site is no longer maintained. Partly because python.org and many > package maintainers are simply releasing their own builds, and partly > because Bob I. seems to be doing other things. > > Personally, I still think there is a need for a site like that -- OS-X > is still a strange beast that is not as widely used as the other > platforms. I'd contribute to it but I'm not in a position to host it, or > have the time to be the core maintainer. Oh well. It might be best to close it, or at least add a note at the top of all the "main" pages explaining the situation. That'd be better than leaving stale data to lead new users astray. > Does anyone here have permissions to edit the python.org site? > > 1) It would be nice for the "quick links" in the left to point to a OS-X > download too. > > 2) This page: http://www.python.org/download/mac/ needs updating. Joe, > was that where you got your out-of-date info? Yes, that was one of the places. I sent several suggestions to webmaster at python.org yesterday, pointing out inaccuracies and omissions that I stumbled upon. Best, - Joe From joelgluck at yahoo.com Tue Dec 30 15:50:04 2008 From: joelgluck at yahoo.com (Joel Gluck) Date: Tue, 30 Dec 2008 09:50:04 -0500 Subject: [Pythonmac-SIG] py2app + pygame: how to exclude pygame icon? Message-ID: <45DB697E-97D4-49AB-AB12-4BE41C43DE49@yahoo.com> Hi all, Am using py2app and hitting this problem: py2app's built-in recipe for pygame is causing the pygame icon to appear when I run the app from the dock. It goes something like this: 1) The icon file I provide for my app appears in the dock by default, thanks to python setup.py py2app --iconfile my_icon.icns. 2) However, when I click on that icon in the dock, it briefly changes to the pygame icon (snake with game controller in mouth) and bounces up and down, before my app runs. 3) I tried adding a call at the start of my app to pygame.display.set_icon() to override the pygame icon with my own icon -- this causes the bouncing pygame icon to change back to my app's icon immediately before my app takes over the screen. However, I still see the pygame icon for a moment or two. This may sound like a small issue, but I'm about to submit the app for testing to a "serious" client, and I know they would not appreciate the pygame icon. So, is there a way to either: 1) Exclude pygame_icon.icns on the command line (I tried --excludes and --dylib-excludes to no avail); or 2) Change the default recipe for pygame; 3) Invoke some other magic to fix this? BTW: I also tried to remove pygame_icon.icns manually after the app was created (deleting it from site-packages.zip, then recreating the .zip file), but this broke something else. TIA...! Happy holidays, Joel Joel Gluck, MEd, RDT Metta Software Somerville, MA, USA -------------- next part -------------- An HTML attachment was scrubbed... URL: