From gandreas at gandreas.com Wed Jun 1 00:41:56 2005 From: gandreas at gandreas.com (gandreas@gandreas.com) Date: Tue, 31 May 2005 17:41:56 -0500 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> <4CECCD45-1384-4C36-9FED-D436219B86EA@gandreas.com> Message-ID: On May 31, 2005, at 4:54 PM, Bob Ippolito wrote: >> >>> Somewhere in PyOXIDE you're not managing interpreter state >>> correctly, probably not in the code you've pasted, I don't have >>> time to look into it... >>> >>> >> >> Obviously you've got next week's session to get prepared for, but >> there is no code for managing the interpreter state to be wrong, >> since there isn't any (and without any threading, there shouldn't >> be the need for any - and this case is entirely threading free). >> > > Actually, there is. Look at: > src/main.m> So you're saying that in order for PyObjC to work correctly, there must be an explicit PyEval_InitThreads call during the embedding code's initialization? Because embedding "in general" (i.e., without threads) doesn't need to call this: (and I wasn't in previous versions - thus my comment about "there was no code for managing the interpreter state", since I was following those instructions). And I'm assuming there must be the PyGILState_Ensure/ PyGILState_Release as well? Could perhaps this sort of thing be pulled in to a PyObjC_InitForEmebbeding() / PyObjC_DeInitForEmbedding() routine? That way any additional things added in future versions could be encapsulated there... How should my native script calling code (which might be called as a result of a callback from Python or from a purely native UI routine - i.e., with or without the interpreter somewhere back on the stack) handle the interpreter state so as to work appropriately with PyObjC? Because clearly there are some unwritten assumptions here... Glenn Andreas gandreas at gandreas.com wicked fun! quadrium | build, mutate, evolve | images, textures, backgrounds, art From bob at redivi.com Wed Jun 1 00:47:59 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 31 May 2005 15:47:59 -0700 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> <4CECCD45-1384-4C36-9FED-D436219B86EA@gandreas.com> Message-ID: <56B7AC45-B8AA-4310-B74A-0721FAF7BC86@redivi.com> On May 31, 2005, at 3:41 PM, gandreas at gandreas.com wrote: > > On May 31, 2005, at 4:54 PM, Bob Ippolito wrote: > > >>> >>> >>>> Somewhere in PyOXIDE you're not managing interpreter state >>>> correctly, probably not in the code you've pasted, I don't have >>>> time to look into it... >>>> >>>> >>>> >>> >>> Obviously you've got next week's session to get prepared for, but >>> there is no code for managing the interpreter state to be wrong, >>> since there isn't any (and without any threading, there shouldn't >>> be the need for any - and this case is entirely threading free). >>> >>> >> >> Actually, there is. Look at: >> > bundletemplate/src/main.m> >> > > So you're saying that in order for PyObjC to work correctly, there > must be an explicit PyEval_InitThreads call during the embedding > code's initialization? Because embedding "in general" (i.e., > without threads) doesn't need to call this: ext/pure-embedding.html> (and I wasn't in previous versions - thus > my comment about "there was no code for managing the interpreter > state", since I was following those instructions). Possibly, but I don't think that's the problem. > And I'm assuming there must be the PyGILState_Ensure/ > PyGILState_Release as well? Yeah, most likely. > Could perhaps this sort of thing be pulled in to a > PyObjC_InitForEmebbeding() / PyObjC_DeInitForEmbedding() routine? > That way any additional things added in future versions could be > encapsulated there... I doubt it.. The recommended method is to create a plugin bundle, not to use the Python C API. There is no good reason to use the Python C API from an Objective-C application unless you already went down that road.. which, is basically your application, and little else (if anything). I still think you should change your app to do it sanely. > How should my native script calling code (which might be called as > a result of a callback from Python or from a purely native UI > routine - i.e., with or without the interpreter somewhere back on > the stack) handle the interpreter state so as to work appropriately > with PyObjC? Because clearly there are some unwritten assumptions > here... Do what's done in the bundle template stub for intiialization, and do PyGILState_Ensure() before calling any Python code, and PyGILState_Release() afterwards. Better yet, use a bundle. -bob From bob at redivi.com Wed Jun 1 00:54:56 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 31 May 2005 15:54:56 -0700 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> Message-ID: <33D2406E-627C-4390-A41C-4716DF53C2E2@redivi.com> On May 31, 2005, at 2:27 PM, David Reed wrote: > > On May 31, 2005, at 4:51 PM, Bob Ippolito wrote: > > >> >> On May 31, 2005, at 1:17 PM, gandreas at gandreas.com wrote: >> >> >>> (* - I've downloaded and installed PyObjC 1.3.6 twice but for some >>> reason it doesn't want to use it: >>> >>> gandreas% /Library/Frameworks/Python.framework/Versions/Current/bin/ >>> python2.4 >>> Python 2.4.1 (#2, Mar 31 2005, 00:05:10) >>> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin >>> Type "help", "copyright", "credits" or "license" for more >>> information. >>> >>> >>>>>> import objc >>>>>> objc.__version__ >>>>>> >>>>>> >>> '1.3.5' >>> >>> >>>>>> objc.__file__ >>>>>> >>>>>> >>> '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >>> site-packages/PyObjC/objc/__init__.pyc' >>> ) >>> >>> >> >> Anyone else have this problem? > > > I just downloaded and installed 1.3.6 and also have that problem. > > $ python2.4 > Python 2.4.1 (#2, Mar 31 2005, 00:05:10) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>>> import objc >>>> objc.__version__ >>>> > '1.3.5' > >>>> objc.__file__ >>>> > '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- > packages/PyObjC/objc/__init__.pyc' Did you have a previous installation of PyObjC 1.3.5? Which package did you install? The one from pythonmac.org, or sourceforge? What is the name of the package that you installed? -bob From mdavids at bantha.org Wed Jun 1 01:09:00 2005 From: mdavids at bantha.org (Michael Davidson) Date: Tue, 31 May 2005 19:09:00 -0400 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: <33D2406E-627C-4390-A41C-4716DF53C2E2@redivi.com> References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> <33D2406E-627C-4390-A41C-4716DF53C2E2@redivi.com> Message-ID: <20050531230900.GA3366@bantha.org> I just downloaded PyObjC from sourceforge (1.3.6 installer package for python 2.4.1 on OSX 10.4), and I see: >>> objc.__version__ '1.3.5' >>> objc.__file__ '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/PyObjC/objc/__init__.pyc' >>> I had no previous version installed. Michael From dreedmac at columbus.rr.com Wed Jun 1 01:13:48 2005 From: dreedmac at columbus.rr.com (David Reed) Date: Tue, 31 May 2005 19:13:48 -0400 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: <33D2406E-627C-4390-A41C-4716DF53C2E2@redivi.com> References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> <33D2406E-627C-4390-A41C-4716DF53C2E2@redivi.com> Message-ID: On May 31, 2005, at 6:54 PM, Bob Ippolito wrote: > > On May 31, 2005, at 2:27 PM, David Reed wrote: > > >> >> On May 31, 2005, at 4:51 PM, Bob Ippolito wrote: >> >> >> >>> >>> On May 31, 2005, at 1:17 PM, gandreas at gandreas.com wrote: >>> >>> >>> >>>> (* - I've downloaded and installed PyObjC 1.3.6 twice but for some >>>> reason it doesn't want to use it: >>>> >>>> gandreas% /Library/Frameworks/Python.framework/Versions/Current/ >>>> bin/ >>>> python2.4 >>>> Python 2.4.1 (#2, Mar 31 2005, 00:05:10) >>>> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin >>>> Type "help", "copyright", "credits" or "license" for more >>>> information. >>>> >>>> >>>> >>>>>>> import objc >>>>>>> objc.__version__ >>>>>>> >>>>>>> >>>>>>> >>>> '1.3.5' >>>> >>>> >>>> >>>>>>> objc.__file__ >>>>>>> >>>>>>> >>>>>>> >>>> '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >>>> site-packages/PyObjC/objc/__init__.pyc' >>>> ) >>>> >>>> >>>> >>> >>> Anyone else have this problem? >>> >> >> >> I just downloaded and installed 1.3.6 and also have that problem. >> >> $ python2.4 >> Python 2.4.1 (#2, Mar 31 2005, 00:05:10) >> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin >> Type "help", "copyright", "credits" or "license" for more >> information. >> >> >>>>> import objc >>>>> objc.__version__ >>>>> >>>>> >> '1.3.5' >> >> >>>>> objc.__file__ >>>>> >>>>> >> '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >> site- >> packages/PyObjC/objc/__init__.pyc' >> > > Did you have a previous installation of PyObjC 1.3.5? Which > package did you install? The one from pythonmac.org, or > sourceforge? What is the name of the package that you installed? > > -bob I did have an earlier version of pyobjc but I don't think it was 1.3.5. I recently got a desktop and had OS X transfer all the files from my laptop so it should be what is there. The laptop reports version 1.3 so that should be the earlier version that was installed on my desktop. Are you certain the version number just isn't wrong in the file? I installed pyobjc-1.3.6-py2.4-macosx10.4.mpkg I'm not certain where I started, but it did come from sf.net. http://prdownloads.sourceforge.net/pyobjc/pyobjc-1.3.6-py2.4- macosx10.4.zip?download Dave From bob at redivi.com Wed Jun 1 01:26:21 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 31 May 2005 16:26:21 -0700 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> <33D2406E-627C-4390-A41C-4716DF53C2E2@redivi.com> Message-ID: On May 31, 2005, at 4:13 PM, David Reed wrote: > > On May 31, 2005, at 6:54 PM, Bob Ippolito wrote: > > >> >> On May 31, 2005, at 2:27 PM, David Reed wrote: >> >> >> >>> >>> On May 31, 2005, at 4:51 PM, Bob Ippolito wrote: >>> >>> >>> >>> >>>> >>>> On May 31, 2005, at 1:17 PM, gandreas at gandreas.com wrote: >>>> >>>> >>>> >>>> >>>>> (* - I've downloaded and installed PyObjC 1.3.6 twice but for some >>>>> reason it doesn't want to use it: >>>>> >>>>> gandreas% /Library/Frameworks/Python.framework/Versions/Current/ >>>>> bin/ >>>>> python2.4 >>>>> Python 2.4.1 (#2, Mar 31 2005, 00:05:10) >>>>> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin >>>>> Type "help", "copyright", "credits" or "license" for more >>>>> information. >>>>> >>>>> >>>>> >>>>> >>>>>>>> import objc >>>>>>>> objc.__version__ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>> '1.3.5' >>>>> >>>>> >>>>> >>>>> >>>>>>>> objc.__file__ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>> '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >>>>> site-packages/PyObjC/objc/__init__.pyc' >>>>> ) >>>>> >>>>> >>>>> >>>>> >>>> >>>> Anyone else have this problem? >>>> >>>> >>> >>> >>> I just downloaded and installed 1.3.6 and also have that problem. >>> >>> $ python2.4 >>> Python 2.4.1 (#2, Mar 31 2005, 00:05:10) >>> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin >>> Type "help", "copyright", "credits" or "license" for more >>> information. >>> >>> >>> >>>>>> import objc >>>>>> objc.__version__ >>>>>> >>>>>> >>>>>> >>> '1.3.5' >>> >>> >>> >>>>>> objc.__file__ >>>>>> >>>>>> >>>>>> >>> '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >>> site- >>> packages/PyObjC/objc/__init__.pyc' >>> >>> >> >> Did you have a previous installation of PyObjC 1.3.5? Which >> package did you install? The one from pythonmac.org, or >> sourceforge? What is the name of the package that you installed? > > > I did have an earlier version of pyobjc but I don't think it was > 1.3.5. I recently got a desktop and had OS X transfer all the files > from my laptop so it should be what is there. The laptop reports > version 1.3 so that should be the earlier version that was > installed on my desktop. > > Are you certain the version number just isn't wrong in the file? > > I installed pyobjc-1.3.6-py2.4-macosx10.4.mpkg > > I'm not certain where I started, but it did come from sf.net. > > http://prdownloads.sourceforge.net/pyobjc/pyobjc-1.3.6-py2.4- > macosx10.4.zip?download I can verify that the _objc.so extension in that package indeed incorrectly versioned. Because the package was named correctly, the only explanation for this is that it was built from an earlier svn revision where the version was still marked as 1.3.5. The header that defines the version was then trivially changed to reflect the new version, but no source was changed so distutils didn't rebuild of that extension. What you've installed *is* 1.3.6 in every way except for what it reports (because no functional changes were made to any headers). I'll put up new 10.4 installers later today, but again -- no big deal. -bob From ronaldoussoren at mac.com Wed Jun 1 07:18:31 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 1 Jun 2005 07:18:31 +0200 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> Message-ID: <0A71B866-E570-4379-A32E-D38FBF616E0E@mac.com> On 31-mei-2005, at 22:17, gandreas at gandreas.com wrote: > So PyOXIDE is based on the traditional way to embed python in an > application (explicitly calling the python APIs to access and call > stuff), and this worked reasonably well. For example, it runs > various scripts at startup, which register various callbacks to > handle things like new documents, new interactives, etc... (and > then the underlying Objective C code explicitly calls these > callbacks at appropriate points). > > Unfortunately, things recently have gone downhill (with either the > Tiger system framework or the 2.4 unofficial official framework, > with PyObjC 1.3.5(*)). I've got an "interactive" window (i.e., the > interactive shell) which is loaded via a menu command - in the > window's controller awakenFromNib: I've got the following code: > - (void) awakeFromNib > { > NSLog(@"Interactive awakeFromNib"); > myMain = PyImport_AddModule("__main__"); > if (myMain == NULL || (PyErr_Occurred())) { > //NSLog(@"Couldn't add module __main__"); > PyErr_Print(); > } > (... and then the code that calls the python code to hook the > interactive window to the text view, etc...) > > > Now, when the interactive window is created by the menu, everything > works fine (application main loop calls the Objective C code which > loads a nib, nib loading calls above routine, everything fine). If > the same thing includes a layer of python on the stack, such as is > done as part of the debugger (since I've got interactive windows in > the debugger so you can directly access/execute code in your > debugged context), it fails - namely, PyImport_AddModule crashes: > > #0 0x100a68d8 in PyImport_AddModule (name=0x159c8 "__main__") at / > Users/bob/src/Python-2.4.1/Python/import.c:308 > #1 0x000090bc in -[PyInteractive awakeFromNib] (self=0x54b71a0, > _cmd=0x909f36ac) at /Volumes/YWork1/PyOXIDE/Source/PyInteractive.mm: > 132 > #2 0x92886788 in -[NSSet makeObjectsPerformSelector:] () > #3 0x93636f94 in -[NSIBObjectData > nibInstantiateWithOwner:topLevelObjects:] () > #4 0x9370dbdc in old_loadNib () > [snip] > #8 0x9370d6a4 in -[NSWindowController window] () > #9 0x007d7a98 in ffi_call_DARWIN () > #10 0x007d74b0 in ffi_call () > #11 0x007beb24 in PyObjCFFI_Caller () > #12 0x007d1e3c in PyObjCAPI_Register () > #13 0x1000c348 in PyObject_Call (func=0x0, arg=0x101158b4, > kw=0x101268b8) at /Users/bob/src/Python-2.4.1/Objects/abstract.c:1751 > [snip] > #39 0x100092cc in PyObject_CallMethod (o=0x0, name=0x10119178 "a > more convenient interface.", format=0x713030 "") at /Users/bob/src/ > Python-2.4.1/Objects/abstract.c:1751 > #40 0x0000d954 in -[NSDocument(NSDocumentPyHandler) > pythonOnHandler:] (self=0x4cef190, _cmd=0x1746c, sender=0x387220) > at /Volumes/YWork1/PyOXIDE/Source/NSDocumentPyHandler.mm:181 > #41 0x936be08c in -[NSApplication sendAction:to:from:] () > [snip] > > Basically, the app calls my object to handle the menu command > ("Debug") which calls PyObject_CallMethod to handle the "bound > menu routine". That python code does a bunch of stuff, loads a > nib, the nib loading fires off my awakeFromNib code, which tries to > get the __main__ module, and boom! > > Looking at import.c:308: > > PyObject * > PyImport_GetModuleDict(void) > { > PyInterpreterState *interp = PyThreadState_GET()->interp; // > Crash is here, since PyThreadState_GET is NULL > if (interp->modules == NULL) > Py_FatalError("PyImport_GetModuleDict: no module > dictionary!"); > return interp->modules; > } > > > There are no python threads running, I've not called > PyEval_InitThreads() or anything like that. So it _appears_ that > any code called from Python through the Objective C bridge can no > longer access the interpreter - is this correct? What would be the > approach to allow this to work? Should I initialize threads > support, and execute all my callbacks on a separate thread? Or > would I need to create a new interpreter state for these? Or am I > just plain hosed on mixing "traditional" embedding techniques with > PyObjC? PyObjC gives up the GIL before calling into ObjC. This is necesary to make it possible to use python from multiple threads. You should use the API in PEP311 to acquire the GIL before you starting using the Python API and release it again when you're done. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050601/30c81d10/smime.bin From mwh at python.net Wed Jun 1 12:13:47 2005 From: mwh at python.net (Michael Hudson) Date: Wed, 01 Jun 2005 11:13:47 +0100 Subject: [Pythonmac-SIG] PyObjC vs "old school" embedding In-Reply-To: (gandreas@gandreas.com's message of "Tue, 31 May 2005 17:41:56 -0500") References: <5282E5B0-18AD-4061-8829-90AA2AB2FD43@gandreas.com> <4CECCD45-1384-4C36-9FED-D436219B86EA@gandreas.com> Message-ID: <2m8y1uwfj8.fsf@starship.python.net> gandreas at gandreas.com writes: > So you're saying that in order for PyObjC to work correctly, there > must be an explicit PyEval_InitThreads call during the embedding > code's initialization? Before 2.4.2 (not released yet) you need to call PyEval_InitThreads before calling PyGILState_Release (because of a silly bug), but I wouldn't expect this to cause a crash where you're seeing one. Still, might want to try it, though. Cheers, mwh -- A difference which makes no difference is no difference at all. -- William James (I think. Reference anyone?) From mitchchapman at earthlink.net Thu Jun 2 01:43:41 2005 From: mitchchapman at earthlink.net (Mitch Chapman) Date: Wed, 1 Jun 2005 17:43:41 -0600 Subject: [Pythonmac-SIG] frameworkinstall and non-default --prefix/--enable-framework Message-ID: <371118146c14eb0ce48694c09d35debd@earthlink.net> I've been trying to do a framework install of Python 2.4.1 to a non-standard location, on Mac OS X 10.3.8. $ ./configure --prefix= --enable-framework=/Frameworks $ make $ make frameworkinstall The last step has been failing. The cause appears to be line 20 of Mac/OSX/Makefile: bindir=/usr/local/bin I changed it to bindir=$(prefix)/bin Now the frameworkinstall seems to work. Is there a reason why bindir needs to be hardwired to /usr/local/bin? Apologies if this has already been discussed. I have searched my Python-Mac mailbox, the Python sourceforge bugtracker and Google, but have found nothing relevant. -- Mitch From bob at redivi.com Thu Jun 2 02:01:05 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 1 Jun 2005 17:01:05 -0700 Subject: [Pythonmac-SIG] frameworkinstall and non-default --prefix/--enable-framework In-Reply-To: <371118146c14eb0ce48694c09d35debd@earthlink.net> References: <371118146c14eb0ce48694c09d35debd@earthlink.net> Message-ID: On Jun 1, 2005, at 4:43 PM, Mitch Chapman wrote: > I've been trying to do a framework install of Python 2.4.1 to a > non-standard location, on Mac OS X 10.3.8. > > $ ./configure --prefix= > --enable-framework=/Frameworks > $ make > $ make frameworkinstall > > The last step has been failing. The cause appears to be line 20 of > Mac/OSX/Makefile: > > bindir=/usr/local/bin > > I changed it to > > bindir=$(prefix)/bin > > Now the frameworkinstall seems to work. > > Is there a reason why bindir needs to be hardwired to /usr/local/bin? No > Apologies if this has already been discussed. I have searched my > Python-Mac mailbox, the Python sourceforge bugtracker and Google, but > have found nothing relevant. File a bug please -bob From matsakis at mit.edu Thu Jun 2 08:08:58 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Thu, 2 Jun 2005 02:08:58 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 Message-ID: HAS and I are working on a new version of the appscript binary installer. An alpha version of the installer can be found at: http://appscript.ai.mit.edu/appscript-1.1a1.dmg Changes from Appscript Installer 1.0.x include: - Changed installation location to be compatible with 10.4 python installation - Includes latest versions of all components, including adding macfile - Updated documentation and sample scripts - Replaced RenderTerminology with HTMLDictionary - Removed CarbonAE dependency, (no longer modifies System framework) Don't be put off by the "alpha", it just refers to the fact that the installer isn't quite feature complete yet---I'd like to add support for the framework build of Python 2.4.1. As it stands, this installer should work to install or upgrade the appscript installation to work with the stock python installations in Mac OS X 10.3.x and 10.4.x. It also includes all the documentation and sample scripts we intend for the final distribution. If you do install it, note your OS version and which version (if any) of the appscript installer you have used in the past when sending me any bug reports. Not that I expect there to be issues, but if you have any please let me know as soon as possible (note particularly any issues with permissions---this installer doesn't assume root priviledges, so those shouldn't be a problem). I plan to have a beta release out by the weekend and then, assuming all goes well, a release perhaps at the end of next week. One thing in particular that I would love to test is whether this install survives an upgrade from 10.3->10.4 (it should). If you were planning on installing Tiger this week, perhaps try installing appscript first. Finally, on the matter of Python 2.4, is there a standard place that the macpython 2.4.1 looks for packages? /Library/Python/2.4/site-packages, perhaps? Nick Matsakis From mathbymath at aol.com Thu Jun 2 04:33:52 2005 From: mathbymath at aol.com (Matthew S-H) Date: Wed, 1 Jun 2005 22:33:52 -0400 Subject: [Pythonmac-SIG] Python Help? Message-ID: <80F8A9D4-7353-4FF4-A301-5C8127698FED@aol.com> I've tried finding the solution to this problem using Google as well as spending hours fooling around to try to fix the problem. I'm a bit new at programming and decided to take Python as a first language. I know I could easily get around this by doing it a different way, but I wanted to figure out why this way wasn't working. Here is the code: #---START--- ##SETUP import string from string import * #----------------------------------------------------------------------- --- def pigTranslator(text): list = text.split() list = puncSep(list) wordsWithCaps = capRemem(list) list = makeLC(list) list = pigTranslate(list) list = capFromMem(list, wordsWithCaps) list = addSpaces(list) return join(list,"") #----------------------------------------------------------------------- --- def pigLatin(word): if word[0] in "aeiouAEIOU": return word + "way" else: count = 1 for char in word[1:]: if char in "aeiouAEIOUyY" and not (word[count] == "u" and word[count - 1] == "q"): return word[count:] + word[:count] + "ay" else: count = count + 1 return word + "ay" #----------------------------------------------------------------------- --- ##Seperates words with punctuation into 2 seperate words. def puncSep(list): currentWord = -1 for word in list: currentWord = currentWord + 1 if word[-1] in punctuation: # list = list[:currentWord] + [word[0:-1], word[-1]] + list [currentWord + 1:] list[currentWord:currentWord + 1] = [word[:-1], word[-1]] currentWord = currentWord + 1 return list #----------------------------------------------------------------------- --- ##Creates a list stating the word# of each word beginning with a capital. def capRemem(list): currentWord = -1 wordsWithCaps = [[], []] for word in list: currentWord = currentWord + 1 if word != upper(word): if word[0] in uppercase: wordsWithCaps[1] = wordsWithCaps[1] + [currentWord] else: wordsWithCaps[0] = wordsWithCaps[0] + [currentWord] return wordsWithCaps #----------------------------------------------------------------------- --- ##Makes all words in list completely lowercase def makeLC(list): currentWord = -1 for word in list: currentWord = currentWord + 1 list[currentWord] = lower(word) return list #----------------------------------------------------------------------- --- def pigTranslate(list): currentWord = -1 for word in list: currentWord = currentWord + 1 if word not in punctuation: list = list[:currentWord] + [pigLatin(word)] + list [currentWord + 1:] return list #----------------------------------------------------------------------- --- def capFromMem(list, wordsWithCaps): for reference in wordsWithCaps[1]: list[reference] = capitalize(list[reference]) for reference in wordsWithCaps[0]: list[reference] = upper(list[reference]) return list #----------------------------------------------------------------------- --- def addSpaces(list): lastWord = -1 for word in list[1:]: lastWord = lastWord + 1 if word not in punctuation: list[lastWord] = list[lastWord] + " " return list #----------------------------------------------------------------------- --- ##Function Calls w = raw_input("enter a sentence: ") print pigTranslator(w) print "" #---END--- Here is the code I am having trouble with: ##Seperates words with punctuation into 2 seperate words. def puncSep(list): currentWord = -1 for word in list: currentWord = currentWord + 1 if word[-1] in punctuation: # list = list[:currentWord] + [word[0:-1], word[-1]] + list [currentWord + 1:] list[currentWord:currentWord + 1] = [word[:-1], word[-1]] currentWord = currentWord + 1 return list The line that is commented out is the way I had been doing it (which worked fine). I just wanted to try doing it this way. However, when this runs (use "U?" as an example) it returns an error ("IndexError: string index out of range"). I was wondering if any of you have any idea why this might be happening and how I might get around this without going about it a different way. Also, if anyone could be so kind as to explain the difference in effect between the first method and the second method. Thank in advance to anyone who replies with some help. ~Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050601/6a52b2c3/attachment-0001.htm From charles.hartman at conncoll.edu Thu Jun 2 13:30:48 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Thu, 2 Jun 2005 07:30:48 -0400 Subject: [Pythonmac-SIG] Python Help? In-Reply-To: <80F8A9D4-7353-4FF4-A301-5C8127698FED@aol.com> References: <80F8A9D4-7353-4FF4-A301-5C8127698FED@aol.com> Message-ID: <8C1520BC-23E2-4F10-8651-701D1EE1B69B@conncoll.edu> On Jun 1, 2005, at 10:33 PM, Matthew S-H wrote: > ##Seperates words with punctuation into 2 seperate words. > def puncSep(list): > currentWord = -1 > for word in list: > currentWord = currentWord + 1 > if word[-1] in punctuation: > # list = list[:currentWord] + [word[0:-1], word[-1]] + > list[currentWord + 1:] > list[currentWord:currentWord + 1] = [word[:-1], word[-1]] > currentWord = currentWord + 1 > return list A couple of problems here (though you'll get better advice from more experienced people). You start with a list of strings, but your code replaces one (or more) of them, not with a different string or two strings, but with a tuple whose elements are two strings. The comma is what does that. Then (I thnk) you're expecting the size of your list to adjust itself, so that the index of the last element will be one larger than it was before the substitution. But the list's length -- the number of elements in the list -- hasn't changed; it's just that one of them has been replaced with a tuple, a different kind of object from a string. One easy (not necessarily efficient) way to revise it would be (off the top of my head without testing) list[currentWord] = word[:-1] list.insert(currentWord + 1, word[-1]) (though there are more elegant ways to do it without using the currentWord indexing variable). By the way, "list" is an operator in Python (it turns its argument into a list), so it's a bad idea to use that as the name of a variable. Charles Hartman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050602/2cc1a87e/attachment.html From Chris.Barker at noaa.gov Thu Jun 2 18:53:47 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 02 Jun 2005 09:53:47 -0700 Subject: [Pythonmac-SIG] Python Help? In-Reply-To: <8C1520BC-23E2-4F10-8651-701D1EE1B69B@conncoll.edu> References: <80F8A9D4-7353-4FF4-A301-5C8127698FED@aol.com> <8C1520BC-23E2-4F10-8651-701D1EE1B69B@conncoll.edu> Message-ID: <429F399B.1030801@noaa.gov> Charles Hartman wrote: > On Jun 1, 2005, at 10:33 PM, Matthew S-H wrote: >> list[currentWord:currentWord + 1] = [word[:-1], word[-1]] > You start with a list of strings, but your code replaces one (or more) > of them, not with a different string or two strings, but with a tuple > whose elements are two strings. The comma is what does that. Well, no. It's a 2-element list, not a tuple (the [ ] make it a list), and he's assigning it to a slice, which should work: >>> l = [1,2,3,4] >>> l[2:3] = [5,6] >>> l [1, 2, 5, 6, 4] >>> So what is going on? I wrote a little test, and inserted a print statement: import string ##Separates words with punctuation into 2 separate words. def puncSep(list): currentWord = -1 for word in list: currentWord = currentWord + 1 print currentWord, word if word[-1] in string.punctuation: ## list = list[:currentWord] + [word[0:-1], word[-1]] + list[currentWord + 1:] list[currentWord:currentWord + 1] = [word[:-1], word[-1]] currentWord = currentWord + 1 return list #L = "This is a sentence.".split() L = ["Word?"] print L print puncSep(L) Running it gave me: cbarker at localhost junk $ ./piglatin.py ['Word?'] 0 Word? 2 ? 4 Traceback (most recent call last): File "./piglatin.py", line 113, in ? print puncSep(L) File "./piglatin.py", line 103, in puncSep if word[-1] in string.punctuation: IndexError: string index out of range same error, but I got a hint: the last "word" is an empty string, which is why you got the IndexError. So I added another print statement: print "adding:", [word[:-1], word[-1]] list[currentWord:currentWord + 1] = [word[:-1], word[-1]] cbarker at localhost junk $ ./piglatin.py ['Word?'] 0 Word? adding: ['Word', '?'] 2 ? adding: ['', '?'] 4 Traceback (most recent call last): File "./piglatin.py", line 114, in ? print puncSep(L) File "./piglatin.py", line 103, in puncSep if word[-1] in string.punctuation: IndexError: string index out of range So you are adding an empty string. I'm not totally sure why yet, but I see a common trip-up in this code: Never alter a list while iterating through it with a for loop! (actually, it's not never, but don't do it unless you know what you are doing.) I'll check if this is the problem by printing the list as we go: print "adding:", [word[:-1], word[-1]] list[currentWord:currentWord + 1] = [word[:-1], word[-1]] print "the list is now:", list and we get:cbarker at localhost junk $ ./piglatin.py ['Word?'] 0 Word? adding: ['Word', '?'] the list is now: ['Word', '?'] 2 ? adding: ['', '?'] the list is now: ['Word', '?', '', '?'] 4 Traceback (most recent call last): File "./piglatin.py", line 115, in ? print puncSep(L) File "./piglatin.py", line 103, in puncSep if word[-1] in string.punctuation: IndexError: string index out of range So what happened? The iteration started with the one word in the list: "Word?". Then that was replaced by two words: ["Word", "?"], Now this list has two elements, so the iteration continues, and the next word in the list is "?". It gets replaced by ["","?"].. whoops, that's not supposed to happen! So what's the solution? two options: 1) make sure you only iterate through the original number of items in the list: replace: for word in list: currentWord = currentWord + 1 with: while currentWord < len(list)-1: currentWord = currentWord + 1 word = list[currentWord] that's a bit ugly, so I'd rather move the increment to the end of the while block: and move the increment to the end of the loop: def puncSep(list): currentWord = 0 while currentWord < len(list)-1: word = list[currentWord] if word[-1] in string.punctuation: list[currentWord:currentWord + 1] = [word[:-1], word[-1]] currentWord += 1 currentWord += 1 return list Another option, and one I'd probably do, is to create a new, list, rather than altering the one you have in place: def puncSep(list): currentWord = 0 newList = [] for currentWord, word in enumerate(list): if word[-1] in string.punctuation: newList.extend([word[:-1], word[-1]]) else: newList.append(word) return newList But what if there is a punctuation mark by itself? (which I suppose is a syntax error in the input, but probably best to check for it): before: ['two', 'words', '?'] after: ['two', 'words', '', '?'] It adds an empty string, which you don't want: if len(word)> 1 and word[-1] in string.punctuation: before: ['two', 'words', '?'] after: ['two', 'words', '?'] There, that's fixed it. Now, a few style issues: 1) don't use "import *", you can get name clashes, and it's hard to know where stuff comes from when you look at your code later. 2) as pointed out, don't use "list" as a variable name 3) use enumerate, if you need to loop through a list, and keep track of the index, though you don't need to anymore here. 4) minor point, but I"m not sure there's much point in using list.extend() when you are creating the list in the argument anyway, so I've just used two append()s Here's my version now: import string ##Separates words with punctuation into 2 separate words. def puncSep(oldList): newList = [] for word in oldList: if len(word)> 1 and word[-1] in string.punctuation: newList.append(word[:-1]) newList.append(word[-1]) else: newList.append(word) return newList L = "This is a sentence. Is this another? Here is one with a lone punctuation mark .".split() #L = ["Word?"] #L = ["two","words", "?"] print "before:", L print "after:", puncSep(L) By the way, this cries out for unit testing of some sort. Read up about it in "Dive Into Python" in print or on the web. For an additional challenge, could you do this with list comprehensions? -Chris Then (I > thnk) you're expecting the size of your list to adjust itself, so that > the index of the last element will be one larger than it was before the > substitution. But the list's length -- the number of elements in the > list -- hasn't changed; it's just that one of them has been replaced > with a tuple, a different kind of object from a string. > > One easy (not necessarily efficient) way to revise it would be (off the > top of my head without testing) > > list[currentWord] = word[:-1] > list.insert(currentWord + 1, word[-1]) > > (though there are more elegant ways to do it without using the > currentWord indexing variable). > > By the way, "list" is an operator in Python (it turns its argument into > a list), so it's a bad idea to use that as the name of a variable. > > Charles Hartman > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 cmoad at indiana.edu Fri Jun 3 03:44:23 2005 From: cmoad at indiana.edu (Charles Moad) Date: Thu, 2 Jun 2005 20:44:23 -0500 Subject: [Pythonmac-SIG] py2app data files Message-ID: py2app-0.2 sticks the data files for matplotlib in /usr/local/ share/share/matplotlib instead of /System/Library/Frameworks/ Python.framework/Versions/2.3/share/matplotlib when running bdist_mpkg then installing the created package. Any clues??? (basemap files go to the wrong place too) Thanks, Charlie From chairos at gmail.com Fri Jun 3 03:48:50 2005 From: chairos at gmail.com (Jon Rosebaugh) Date: Thu, 2 Jun 2005 20:48:50 -0500 Subject: [Pythonmac-SIG] MacPython addons and Tiger Message-ID: I recently did an "Archive & Install" from 10.3 to 10.4. Under 10.3 I used the version of python that shipped with the OS, and the MacPython addons. After the upgrade, the IDE didn't work, which wasn't really any great surprise. What _was_ a surprise, however, was that the MacPython site doesn't have a new set of addons for 10.4. Are these still being worked on, or should I try some other method of development? -- Bloggity: http://blog.inklesspen.com/ From rkern at ucsd.edu Fri Jun 3 04:07:41 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 02 Jun 2005 19:07:41 -0700 Subject: [Pythonmac-SIG] py2app data files In-Reply-To: References: Message-ID: <429FBB6D.3040709@ucsd.edu> Charles Moad wrote: > py2app-0.2 sticks the data files for matplotlib in /usr/local/ > share/share/matplotlib instead of /System/Library/Frameworks/ > Python.framework/Versions/2.3/share/matplotlib when running > bdist_mpkg then installing the created package. Any clues??? > (basemap files go to the wrong place too) Use --install-data=/usr/local . matplotlib will look in /usr/local/share/matplotlib . You will need to edit a line somewhere in basemap to look for data in /usr/local/share/basemap . It's better this way; trust me. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From bob at redivi.com Fri Jun 3 05:26:06 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 2 Jun 2005 20:26:06 -0700 Subject: [Pythonmac-SIG] MacPython addons and Tiger In-Reply-To: References: Message-ID: On Jun 2, 2005, at 6:48 PM, Jon Rosebaugh wrote: > I recently did an "Archive & Install" from 10.3 to 10.4. Under 10.3 I > used the version of python that shipped with the OS, and the MacPython > addons. After the upgrade, the IDE didn't work, which wasn't really > any great surprise. What _was_ a surprise, however, was that the > MacPython site doesn't have a new set of addons for 10.4. Are these > still being worked on, or should I try some other method of > development? The older ones probably work if you also install TigerPython23Compat -- however, you're better off just using Python 2.4.1. Forget about Python 2.3. -bob From sw at wordtech-software.com Fri Jun 3 05:56:04 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Thu, 02 Jun 2005 23:56:04 -0400 Subject: [Pythonmac-SIG] Spe-OSX package, wxGladeOSX updates; Boa Constructor coming Message-ID: <429FD4D4.2040807@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi everyone, I've updated my SPE-OSX package to support Bob's MacPython 2.4.1 package only, as well as wxPython 2.6.1. I'm now also supporting Tiger only. I've seen general improvements in stability with the latest versions of wxPython and Python. The applications themselves are at the same version except for wxGlade, which I've updated to v. 0.4 from CVS. There seem to have been a lot of bug fixes with wxGlade, and I haven't seen the crashes that made earlier versions very difficult to use. Finally, I'm working on assembling a Mac package of Boa Constructor (http://boa-constructor.sourceforge.net), which hasn't run well on OS X in quite some time. (It was only recently updated to support a version of wxPython later than 2.4.) It seems to run well with the latest versions of Python and wxPython, so those will be requirements as well. I'll post a general announcement when it's available. - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCn9TTJmdQs+6YVcoRAu4IAJ9fHxAbP0ba1XJV0N2iaMtZk5DhRACfUQ3y vmXAvKVcaJv/eiypDvLS3bM= =GqVS -----END PGP SIGNATURE----- From matsakis at mit.edu Fri Jun 3 07:02:40 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Fri, 3 Jun 2005 01:02:40 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: On Thu, 2 Jun 2005, Nick Matsakis wrote: > Finally, on the matter of Python 2.4, is there a standard place that the > macpython 2.4.1 looks for packages? /Library/Python/2.4/site-packages, > perhaps? So, my understanding is that independent framework builds of macpython default to only looking in their site-packages folder (in fact, this is how Apple's installs works, except that their site-packages folders are softlinks to folders within /Library/Python). In building the appscript installer, I see two options: either create a package that is able to find the python frameworks by using Apple's system for upgrading relocateable bundles, then as the user where to install the software OR install the 2.4 software in /Library/Python/2.4/site-packages and provide a couple of .pth files on the disk image that people can drag into their installation's site package. I'm strongly leaning towards the second option, because its a lot less work for me and I think it offers more flexibility to the end user as well. Thoughts? Nick Matsakis From bob at redivi.com Fri Jun 3 07:37:25 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 2 Jun 2005 22:37:25 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: On Jun 2, 2005, at 10:02 PM, Nick Matsakis wrote: > > On Thu, 2 Jun 2005, Nick Matsakis wrote: > > >> Finally, on the matter of Python 2.4, is there a standard place >> that the >> macpython 2.4.1 looks for packages? /Library/Python/2.4/site- >> packages, >> perhaps? >> > > So, my understanding is that independent framework builds of macpython > default to only looking in their site-packages folder (in fact, > this is > how Apple's installs works, except that their site-packages folders > are > softlinks to folders within /Library/Python). > > In building the appscript installer, I see two options: either > create a > package that is able to find the python frameworks by using Apple's > system > for upgrading relocateable bundles, then as the user where to > install the > software OR install the 2.4 software in /Library/Python/2.4/site- > packages > and provide a couple of .pth files on the disk image that people > can drag > into their installation's site package. I'm strongly leaning > towards the > second option, because its a lot less work for me and I think it > offers > more flexibility to the end user as well. MacPython 2.4.1 looks in the site-packages directory embedded in its framework. There is only one supported framework location (/Library/ Frameworks), so there's no need to care about alternatives. If you build the installer with py2app's bdist_mpkg, you don't have to care about these details, because it does the right thing. -bob From matsakis at mit.edu Fri Jun 3 08:19:14 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Fri, 3 Jun 2005 02:19:14 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: On Thu, 2 Jun 2005, Bob Ippolito wrote: > MacPython 2.4.1 looks in the site-packages directory embedded in its > framework. There is only one supported framework location (/Library/ > Frameworks), so there's no need to care about alternatives. Frameworks can also appear in application bundles too, though it may not be the case with the Python 2.4 framework. It seems like the /Library/Python system is a better one to standardize on, since it mirrors the way that a lot of other software is installed on the mac. (e.g. /Library/Java). Also, it seems strange to install into a framework that doesn't exist. Maybe the 2.4 installer should just be a separate package, then. > If you build the installer with py2app's bdist_mpkg, you don't have to > care about these details, because it does the right thing. What do you mean? Nick From bob at redivi.com Fri Jun 3 08:45:15 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 2 Jun 2005 23:45:15 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: On Jun 2, 2005, at 11:19 PM, Nick Matsakis wrote: > > On Thu, 2 Jun 2005, Bob Ippolito wrote: > > >> MacPython 2.4.1 looks in the site-packages directory embedded in its >> framework. There is only one supported framework location (/Library/ >> Frameworks), so there's no need to care about alternatives. >> > > Frameworks can also appear in application bundles too, though it > may not > be the case with the Python 2.4 framework. It seems like the > /Library/Python system is a better one to standardize on, since it > mirrors > the way that a lot of other software is installed on the mac. (e.g. > /Library/Java). Also, it seems strange to install into a framework > that > doesn't exist. Maybe the 2.4 installer should just be a separate > package, > then. What planet are you on? :) MacPython 2.4.1 only exists in /Library/Frameworks. No other installation location is supported unless you compile it yourself. If you compile it yourself with a different prefix, you lose privileges to use installers. So far, nobody cares. If it's shoved into an application, it shouldn't be touched. An installer, as built by bdist_mpkg, won't install anything unless Python is where it expects it to be. Thus, it's not possible to install into a framework that doesn't exist. Maybe I'm missing something. Are you saying that you have an installer that attempts to install an extension that's "compatible with either Python 2.3 or Python 2.4"? Well, if that's what you're saying, then it's not going to work anyway. Extensions are only compatible across micro Python revisions (i.e. Python 2.3.0 and Python 2.3.5), if and only if they were linked in such a way that allows it (i.e. with PantherPythonFix installed on a Panther machine). >> If you build the installer with py2app's bdist_mpkg, you don't >> have to >> care about these details, because it does the right thing. >> > > What do you mean? -bob From hengist.podd at virgin.net Fri Jun 3 11:37:08 2005 From: hengist.podd at virgin.net (has) Date: Fri, 3 Jun 2005 10:37:08 +0100 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 Message-ID: Bob Ippolito wrote: >An installer, as built by bdist_mpkg, won't install anything unless >Python is where it expects it to be. Thus, it's not possible to >install into a framework that doesn't exist. Interjecting a moment, the appscript installer needs to carry both 2.3 and 2.4 versions of half a dozen package binaries (including osaterminology, which needs to be hand-built across two different OSes), so that it can install the appropriate set of binaries into each Python.framework it finds: Apple-installed 2.3.x on 10.3 and 10.4, user-installed 2.4.x on either; maybe more. Plus a couple pre-built helper apps to go in /Applications/Utilities. Is bdist_mpkg suitable for building such general-purpose installers? My impression was that it's limited to building a binary installer for a single Python package on a single major Python version, or can it do more? OK, back to you guys now... :) has -- http://freespace.virgin.net/hamish.sanderson/ From chairos at gmail.com Fri Jun 3 14:00:01 2005 From: chairos at gmail.com (Jon Rosebaugh) Date: Fri, 3 Jun 2005 07:00:01 -0500 Subject: [Pythonmac-SIG] MacPython addons and Tiger In-Reply-To: References: Message-ID: On 6/2/05, Bob Ippolito wrote: > The older ones probably work if you also install TigerPython23Compat > -- however, you're better off just using Python 2.4.1. Forget about > Python 2.3. Okay... Do I have to do anything special to avoid breaking things? I understand some Apple tools depend on the version that ships with the OS. (I'd read the webpages, but I can't find any official macpython webpages that have been updated for Tiger.) -- Bloggity: http://blog.inklesspen.com/ From bob at redivi.com Fri Jun 3 17:33:24 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 08:33:24 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: <97C4FE50-B572-4E6E-99AC-7DE223B7732B@redivi.com> On Jun 3, 2005, at 2:37 AM, has wrote: > Bob Ippolito wrote: > > >> An installer, as built by bdist_mpkg, won't install anything unless >> Python is where it expects it to be. Thus, it's not possible to >> install into a framework that doesn't exist. >> > > Interjecting a moment, the appscript installer needs to carry both > 2.3 and 2.4 versions of half a dozen package binaries (including > osaterminology, which needs to be hand-built across two different > OSes), so that it can install the appropriate set of binaries into > each Python.framework it finds: Apple-installed 2.3.x on 10.3 and > 10.4, user-installed 2.4.x on either; maybe more. Plus a couple pre- > built helper apps to go in /Applications/Utilities. That sounds awful, I'd like to know which one I'm installing and what version of Python the applications in /Applications/Utilities are going to use. You should make separate installers. > Is bdist_mpkg suitable for building such general-purpose > installers? My impression was that it's limited to building a > binary installer for a single Python package on a single major > Python version, or can it do more? It can't do more, but you can use the mpkgs it outputs as packages for another mpkg. You shouldn't be building packages that install Python stuff by hand. -bob From bob at redivi.com Fri Jun 3 17:40:10 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 08:40:10 -0700 Subject: [Pythonmac-SIG] MacPython addons and Tiger In-Reply-To: References: Message-ID: <890F5E48-CAE1-4FE9-9290-9E96F1C9B998@redivi.com> On Jun 3, 2005, at 5:00 AM, Jon Rosebaugh wrote: > On 6/2/05, Bob Ippolito wrote: > >> The older ones probably work if you also install TigerPython23Compat >> -- however, you're better off just using Python 2.4.1. Forget about >> Python 2.3. >> > > Okay... Do I have to do anything special to avoid breaking things? I > understand some Apple tools depend on the version that ships with the > OS. No, it installs to /Library/Frameworks and makes a few symlinks /usr/ local/bin. > (I'd read the webpages, but I can't find any official macpython > webpages that have been updated for Tiger.) Python 2.4.1 works fine on Tiger (it probably says "10.3+" or "10.3 and later", which means "works on tiger"), but if you want to compile extensions, you'll have to pick up TigerPython24Compat from -- which is a patch that fixes a header in the pkg. There should be plenty of information on Tiger and the various Pythons on my blog: . If someone would like to distill this information and put it in the wiki then please feel free. As far as the "official macpython webpages" go, Jack is a busy guy and doesn't update them very regularly. Currently the information in my blog and the archives of this list are authoritative, especially with regard to Python 2.4.1, since I built that distribution. -bob From Chris.Barker at noaa.gov Fri Jun 3 20:05:05 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 03 Jun 2005 11:05:05 -0700 Subject: [Pythonmac-SIG] Spe-OSX package, wxGladeOSX updates; Boa Constructor coming In-Reply-To: <429FD4D4.2040807@wordtech-software.com> References: <429FD4D4.2040807@wordtech-software.com> Message-ID: <42A09BD1.2030100@noaa.gov> Kevin Walzer wrote: > I'm now also supporting Tiger only. ouch! Darn, this is disappointing. It will be a quite a while 'till most people are running Tiger. Is there any chance of sticking with Panther? My understanding is that anything built for Panther will run on Tiger anyway. In any case, thanks for the effort, you've done a lot to make stuff usable on OS-X -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 bob at redivi.com Fri Jun 3 20:19:55 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 11:19:55 -0700 Subject: [Pythonmac-SIG] Spe-OSX package, wxGladeOSX updates; Boa Constructor coming In-Reply-To: <42A09BD1.2030100@noaa.gov> References: <429FD4D4.2040807@wordtech-software.com> <42A09BD1.2030100@noaa.gov> Message-ID: <1EAD6058-2B07-4F3D-99F2-AE86283515B1@redivi.com> On Jun 3, 2005, at 11:05 AM, Chris Barker wrote: > Kevin Walzer wrote: > >> I'm now also supporting Tiger only. >> > > ouch! Darn, this is disappointing. It will be a quite a while 'till > most > people are running Tiger. Is there any chance of sticking with > Panther? > My understanding is that anything built for Panther will run on Tiger > anyway. says that Tiger is 44.5% and Panther is 53.1% as of this morning, so it's catching up! Anyhow, yes, just about anything built on Panther will run on Tiger, but that requires having a Panther machine accessible. Perhaps someone who cares about Panther should offer SSH access to a Panther machine so that software may be built there? I don't have access to one when I'm traveling. I'm also moving soon, and I'm not sure I'm going to keep the extra machines.. or if I do, they might end up in storage somewhere for a while. -bob From tobis at geosci.uchicago.edu Fri Jun 3 19:31:01 2005 From: tobis at geosci.uchicago.edu (Michael Tobis) Date: Fri, 03 Jun 2005 12:31:01 -0500 Subject: [Pythonmac-SIG] Mac-in-Research community In-Reply-To: Message-ID: Forwarded fyi: >From: "Ivan R. Judson" >Subject: New Mac Research Site >Date: Fri, 3 Jun 2005 11:21:26 -0500 >Organization: Futures Laboratory > >There's a new community website that I'm helping get started. It's >http://www.macresearch.org/; it's supposed to be a research >alternative to the (apparently) popular http://www.macenterprise.org/ site. > >I'd encourage anyone doing interesting research of *any* kind, clusters, >bio, whatever, to go join and load it with information. >We've gotten the ear of a lot of internal Apple folks and any issues that >are "hot" issues for you on OS X or Apple Hardware, I'd >love to see discussed. > >--Ivan > >PS - Please feel free to forward this to anyone you know... From sw at wordtech-software.com Fri Jun 3 20:57:12 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 03 Jun 2005 14:57:12 -0400 Subject: [Pythonmac-SIG] Spe-OSX package, wxGladeOSX updates; Boa Constructor coming In-Reply-To: <42A09BD1.2030100@noaa.gov> References: <429FD4D4.2040807@wordtech-software.com> <42A09BD1.2030100@noaa.gov> Message-ID: <42A0A808.1080902@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Barker wrote: | Kevin Walzer wrote: | |> I'm now also supporting Tiger only. | | | ouch! Darn, this is disappointing. It will be a quite a while 'till most | people are running Tiger. Is there any chance of sticking with Panther? Well, actually, it may be possible to run them on Panther, as they are pure-Python tools, and I'm using "build applet" to wrap them against Bob's 2.4.1 package. Bob, am I correct that that your MacPython build supports both 10.3 and 10.4? If a Panther user can test SPE and the other apps bundled with it, I would appreciate it. If they work, then I'll add Panther as a supported platform. This brings me to a related question. How many of you find SPE, wxGlade, etc. useful? The feedback I've gotten, both public and private, indicates that most of you try them, find them buggy and crash-prone (which they certainly were under Python 2.3 and wxPython 2.5.x), and don't use them. On the other hand, they get at least 50 downloads a month on average, so obviously some people are giving them a try. I'll certainly keep maintaing them/updating them as long as I'm able, because it dovetails with my own needs. But knowing there's actually a real user base, with interest in the applications, would be helpful in planning how to move forward with these packages. Kevin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCoKgIJmdQs+6YVcoRAli7AJ9QUaHMVagil9fHSKzgSnzUb540lgCeKyzL ys2X/bSSyWr6t5GV/VW74Y0= =5N0X -----END PGP SIGNATURE----- From bob at redivi.com Fri Jun 3 21:02:55 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 12:02:55 -0700 Subject: [Pythonmac-SIG] Spe-OSX package, wxGladeOSX updates; Boa Constructor coming In-Reply-To: <42A0A808.1080902@wordtech-software.com> References: <429FD4D4.2040807@wordtech-software.com> <42A09BD1.2030100@noaa.gov> <42A0A808.1080902@wordtech-software.com> Message-ID: <373E5552-88B9-469A-92D1-D4BB66B37791@redivi.com> On Jun 3, 2005, at 11:57 AM, Kevin Walzer wrote: > Chris Barker wrote: > | Kevin Walzer wrote: > | > |> I'm now also supporting Tiger only. > | > | > | ouch! Darn, this is disappointing. It will be a quite a while > 'till most > | people are running Tiger. Is there any chance of sticking with > Panther? > > Well, actually, it may be possible to run them on Panther, as they are > pure-Python tools, and I'm using "build applet" to wrap them against > Bob's 2.4.1 package. Bob, am I correct that that your MacPython build > supports both 10.3 and 10.4? Yes, MacPython 2.4.1 was built on 10.3 and is compatible with both 10.3 and 10.4. As long as you don't add any extensions built on Tiger, then you're probably OK to claim Panther compatibility -- but of course someone will have to test it. -bob From matsakis at mit.edu Fri Jun 3 21:12:34 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Fri, 3 Jun 2005 15:12:34 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: On Thu, 2 Jun 2005, Bob Ippolito wrote: > An installer, as built by bdist_mpkg, won't install anything unless > Python is where it expects it to be. Thus, it's not possible to > install into a framework that doesn't exist. Here's the experience that I was hoping for: User installs appscript binary installer once, and it works with built-in pythons on 10.3, 10.4, and 10.3 upgraded to 10.4. I was also thinking it might be nice if Python 2.4.1 could be installed after appscript and it would "just work" without any additional effort. It seems that the "right" way to do this would be to use Apple's TokenDefinitions to install relative to some python framework. If you installed in the framework's site-packages, you would automatically wind up in /Library/Python with the built-in frameworks due to the symlinks and you could install into other framework builds as well. However, if you did it this way, then upgrading from 10.3 to 10.4 would break the install because the site-packages destination changed. I think this illustrates the fundamental problem with installing into existing frameworks---Appscript is not part of the python framework and by installing in there you open yourself up to breakage when the framework changes. This is true for both the built-in pythons and the ready-built python 2.4. From the Mac user's perspective appscript is basically a "plug in", a software resource that he doesn't deal with directly but is necessary to run other software (such as scripts and workflows that depend on it). I think the mac way of dealing with plugins is to not require an installer at all, but rather create a bundle with the software and drag it into some Library folder (Library being the canonical place for resources the user doesn't need to deal with directly). > Maybe I'm missing something. Are you saying that you have an > installer that attempts to install an extension that's "compatible > with either Python 2.3 or Python 2.4"? Well, yes, but not how you mean in. I was hoping to install 2.3 and 2.4 compatible binaries into /Library/Python/2.x/site-packages. This is simple and more future-proof than the alternatives, as I see it. >>> If you build the installer with py2app's bdist_mpkg, you don't >>> care about these details, because it does the right thing. >> What do you mean? > I know but bdist_mkpg is, you pointed me at it the last time we had this discussion. I've choosen not to use it; While underwhelming, PackageMaker is sufficient for my needs and I've found the difficult part of building the installer isn't making the package but knowing what the "right thing" is. That was what I was asking about when I said "what do you mean?". For the purposes of this installer, it's easy enough to make it work. The reason I'm asking these questions is because I'm not what the story is for third-party python additions on the Mac. It appears that bdist_mkpg is the closest thing we've got, but I can't find any documentation on it. Nick Matsakis From managan at llnl.gov Fri Jun 3 22:14:37 2005 From: managan at llnl.gov (Rob Managan) Date: Fri, 3 Jun 2005 13:14:37 -0700 Subject: [Pythonmac-SIG] Spe-OSX package, wxGladeOSX updates; Boa Constructor coming In-Reply-To: <42A0A808.1080902@wordtech-software.com> References: <429FD4D4.2040807@wordtech-software.com> <42A09BD1.2030100@noaa.gov> <42A0A808.1080902@wordtech-software.com> Message-ID: Seems to run fine on 10.3.9 with python 2.4.1 installed. I opened a few files and the editor seems fine. I did not test extensively but it looks good so far. At 2:57 PM -0400 6/3/05, Kevin Walzer wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > > >Chris Barker wrote: >| Kevin Walzer wrote: >| >|> I'm now also supporting Tiger only. >| >| >| ouch! Darn, this is disappointing. It will be a quite a while 'till most >| people are running Tiger. Is there any chance of sticking with Panther? > >Well, actually, it may be possible to run them on Panther, as they are >pure-Python tools, and I'm using "build applet" to wrap them against >Bob's 2.4.1 package. Bob, am I correct that that your MacPython build >supports both 10.3 and 10.4? > >If a Panther user can test SPE and the other apps bundled with it, I >would appreciate it. If they work, then I'll add Panther as a supported >platform. > >This brings me to a related question. How many of you find SPE, wxGlade, >etc. useful? The feedback I've gotten, both public and private, >indicates that most of you try them, find them buggy and crash-prone >(which they certainly were under Python 2.3 and wxPython 2.5.x), and >don't use them. > >On the other hand, they get at least 50 downloads a month on average, so >obviously some people are giving them a try. > >I'll certainly keep maintaing them/updating them as long as I'm able, >because it dovetails with my own needs. But knowing there's actually a >real user base, with interest in the applications, would be helpful in >planning how to move forward with these packages. > >Kevin > > >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.4.1 (Darwin) >Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > >iD8DBQFCoKgIJmdQs+6YVcoRAli7AJ9QUaHMVagil9fHSKzgSnzUb540lgCeKyzL >ys2X/bSSyWr6t5GV/VW74Y0= >=5N0X >-----END PGP SIGNATURE----- >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG at python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig -- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Rob Managan email managan at llnl.gov LLNL phone: 925-423-0903 P.O. Box 808, L-095 FAX: 925-422-3389 Livermore, CA 94551-0808 From bob at redivi.com Fri Jun 3 23:02:29 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 14:02:29 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: <72DEF719-0C42-42C6-9CB3-1781724773B9@redivi.com> On Jun 3, 2005, at 12:12 PM, Nick Matsakis wrote: > > On Thu, 2 Jun 2005, Bob Ippolito wrote: > > >> An installer, as built by bdist_mpkg, won't install anything unless >> Python is where it expects it to be. Thus, it's not possible to >> install into a framework that doesn't exist. > > Here's the experience that I was hoping for: User installs appscript > binary installer once, and it works with built-in pythons on 10.3, > 10.4, > and 10.3 upgraded to 10.4. I was also thinking it might be nice if > Python > 2.4.1 could be installed after appscript and it would "just work" > without > any additional effort. > > It seems that the "right" way to do this would be to use Apple's > TokenDefinitions to install relative to some python framework. If you > installed in the framework's site-packages, you would automatically > wind > up in /Library/Python with the built-in frameworks due to the > symlinks and > you could install into other framework builds as well. However, if > you > did it this way, then upgrading from 10.3 to 10.4 would break the > install > because the site-packages destination changed. That's why we have the TigerPython23Compat package, which puts a .pth file in the 10.4 path such that it will also look in the 10.3 path. Problem solved. > I think this illustrates the fundamental problem with installing into > existing frameworks---Appscript is not part of the python framework > and by > installing in there you open yourself up to breakage when the > framework > changes. This is true for both the built-in pythons and the ready- > built > python 2.4. From the Mac user's perspective appscript is basically a > "plug in", a software resource that he doesn't deal with directly > but is > necessary to run other software (such as scripts and workflows that > depend > on it). I think the mac way of dealing with plugins is to not > require an > installer at all, but rather create a bundle with the software and > drag it > into some Library folder (Library being the canonical place for > resources > the user doesn't need to deal with directly). Python extensions/packages don't and can't currently do things the Mac way, trying to shoehorn it into the Mac way before it's ready just causes unnecessary hassle for the developer and the user. You should just do it the way that everyone else does things, consistency is good. There are three situations you should be concerned with: 1. Python 2.3.0 on Mac OS X 10.3 2. Python 2.3.5 on Mac OS X 10.4 3. Python 2.4.x on either 1 and 2 can be dealt with by a single package, built on Mac OS X 10.3 with bdist_mpkg installed for Python 2.3.0, so long as the user also has the TigerPython23Compat .pth file installed (which you can safely include in the package if you feel the need). This package will almost certainly break on 10.5 and there's nothing you can do about that (since Python 2.3 will probably no longer ship). 3 can be dealt with by a single package, built on Mac OS X 10.3 with bdist_mpkg installed for Python 2.4.1. This package will be forwards compatible to future micro-releases of Python 2.4 on any version of Mac OS X >= 10.3. I can effectively guarantee that any Python 2.3.x packages are going to break on Mac OS X 10.5, so if you care about forwards compatibility then target the Python 2.4.x. Since its third party, it will continue to work regardless of changes to the vendor Python. As you've noticed, vendor Python changes can break vendor Python packages. That's just how it works, don't try and solve that problem, only Apple can do that (and I doubt they will). >> Maybe I'm missing something. Are you saying that you have an >> installer that attempts to install an extension that's "compatible >> with either Python 2.3 or Python 2.4"? >> > > Well, yes, but not how you mean in. I was hoping to install 2.3 > and 2.4 > compatible binaries into /Library/Python/2.x/site-packages. This is > simple and more future-proof than the alternatives, as I see it. Don't. Keep 2.3 and 2.4 separate. >>>> If you build the installer with py2app's bdist_mpkg, you don't >>>> care about these details, because it does the right thing. >>>> > > >>> What do you mean? >>> > > >> >> > > I know but bdist_mkpg is, you pointed me at it the last time we had > this > discussion. I've choosen not to use it; While underwhelming, > PackageMaker > is sufficient for my needs and I've found the difficult part of > building > the installer isn't making the package but knowing what the "right > thing" > is. That was what I was asking about when I said "what do you > mean?". Choosing not to use it at all is the wrong decision. The right thing is the behavior that bdist_mpkg has (effectively a serialized distutils install command), so you might as well just use it. It's easier than building it by hand anyway. If you still want to use Installer to build a package that installs other stuff too, go ahead, just build a mpkg that references what you've built with bdist_mpkg. > For the purposes of this installer, it's easy enough to make it work. > The reason I'm asking these questions is because I'm not what the > story is > for third-party python additions on the Mac. It appears that > bdist_mkpg > is the closest thing we've got, but I can't find any documentation > on it. Easy enough to do wrong, too. As far as documentation goes, bdist_mpkg has documentation on the first google hit! -bob From ronaldoussoren at mac.com Fri Jun 3 23:30:44 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 3 Jun 2005 23:30:44 +0200 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: <72DEF719-0C42-42C6-9CB3-1781724773B9@redivi.com> References: <72DEF719-0C42-42C6-9CB3-1781724773B9@redivi.com> Message-ID: <8C3B6949-7010-4B62-A913-239816AB347C@mac.com> On 3-jun-2005, at 23:02, Bob Ippolito wrote: > > I can effectively guarantee that any Python 2.3.x packages are going > to break on Mac OS X 10.5, Why are you so sure Py2.3 packages will break on OS X 10.5? Is it that 10.5 is so long away that Py2.3 will no longer be supported by the python.org crew or is it something else? BTW. Moving to python 2.4 is a smart thing to do anyway, at the very least is faster than python 2.3. Ronald From ronaldoussoren at mac.com Fri Jun 3 23:34:15 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 3 Jun 2005 23:34:15 +0200 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: On 3-jun-2005, at 21:12, Nick Matsakis wrote: > I was also thinking it might be nice if Python > 2.4.1 could be installed after appscript and it would "just work" > without > any additional effort. I don't think that's worth the effort. Someone who goes through the effort of downloading a python 2.4.1 can also download a seperate installer for appscript-for-python2.4 (and every other package they like to use with python 2.4). You'd also be different than every other package, users might even be confused when you don't have a seperate python 2.4 package. Ronald From bob at redivi.com Sat Jun 4 00:00:52 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 15:00:52 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: <8C3B6949-7010-4B62-A913-239816AB347C@mac.com> References: <72DEF719-0C42-42C6-9CB3-1781724773B9@redivi.com> <8C3B6949-7010-4B62-A913-239816AB347C@mac.com> Message-ID: On Jun 3, 2005, at 2:30 PM, Ronald Oussoren wrote: > > On 3-jun-2005, at 23:02, Bob Ippolito wrote: > >> I can effectively guarantee that any Python 2.3.x packages are going >> to break on Mac OS X 10.5, >> > > Why are you so sure Py2.3 packages will break on OS X 10.5? Is it that > 10.5 is so long away that Py2.3 will no longer be supported by the > python.org crew or is it something else? Because Python 2.3 packages are distributed for the vendor installed Python 2.3, which will almost definitely disappear. Sure, once 10.5 comes out, you can probably install a Python 2.3 interpreter and use old stuff (though I certainly won't care to support that), but the act of installing 10.5 will break things. > BTW. Moving to python 2.4 is a smart thing to do anyway, at the very > least is faster than python 2.3. Yeah. -bob From matsakis at mit.edu Sat Jun 4 00:20:06 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Fri, 3 Jun 2005 18:20:06 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: <72DEF719-0C42-42C6-9CB3-1781724773B9@redivi.com> References: <72DEF719-0C42-42C6-9CB3-1781724773B9@redivi.com> Message-ID: On Fri, 3 Jun 2005, Bob Ippolito wrote: > Python extensions/packages don't and can't currently do things the > Mac way, trying to shoehorn it into the Mac way before it's ready > just causes unnecessary hassle for the developer and the user. You > should just do it the way that everyone else does things, consistency > is good. Answer this simple question, then: What is the right way to install third-party python additions on the Mac? and don't say use "use bdist_mpkg". I'm not interested in the mechanics but the end result. It sounds like the answer to this question is: "Extensions sould be installed in the site-packages directory of the python framework". Is that a fair answer? > > I was hoping to install 2.3 and 2.4 compatible binaries into > > /Library/Python/2.x/site-packages. This is simple and more > > future-proof than the alternatives, as I see it. > > Don't. Keep 2.3 and 2.4 separate. /Library/Python/2.3/site-packages is separate from /Library/Python/2.4/site-packages. > Easy enough to do wrong, too. As far as documentation goes, > bdist_mpkg has documentation on the first google hit! 300 words is not "documentation". How do I actually run it once I've installed it? How do I set .mpkg specific flags and metadata, pre and postflight scripts? Nick From matsakis at mit.edu Sat Jun 4 00:22:44 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Fri, 3 Jun 2005 18:22:44 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: On Fri, 3 Jun 2005, Ronald Oussoren wrote: > I don't think that's worth the effort. Someone who goes through the > effort of downloading a python 2.4.1 can also download a seperate > installer for appscript-for-python2.4 (and every other package they like > to use with python 2.4). That's the same as saying "someone who does some work can do more work". Why should this person do more work when they don't have to? Why don't we just take the half-cent worth of disk space and install the 2.4 binaries while we're there? It's great that Python ships on Macs now, but the python "add-on" experience is really weak. If someone wants to run the latest python on their Mac they have to sort through py23Compat, TigerPython23Compat, TigerPython24Fix, PantherPythonFix, MacPythonPantherAddons and figure out which apply to their system. If we're taking the time to build an installer package, then we shouldn't we spend the effort to make sure our users don't have to? To install bdist_mkpg on 10.4 I had to download *three* different packages. Why is this necessary? Nick Matsakis From hengist.podd at virgin.net Sat Jun 4 00:30:42 2005 From: hengist.podd at virgin.net (has) Date: Fri, 3 Jun 2005 23:30:42 +0100 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 Message-ID: Bob Ippolito wrote: >There are three situations you should be concerned with: >1. Python 2.3.0 on Mac OS X 10.3 >2. Python 2.3.5 on Mac OS X 10.4 >3. Python 2.4.x on either > >1 and 2 can be dealt with by a single package, built on Mac OS X 10.3 >with bdist_mpkg installed for Python 2.3.0 > >3 can be dealt with by a single package, built on Mac OS X 10.3 with >bdist_mpkg installed for Python 2.4.1. I'd better point out - as much for Nick's benefit as anyone's - that bdist_mpkg currently isn't suitable for building an appscript installer as osaterminology's OSATerminology extension has to be built on both OS 10.3 and 10.4 and the resulting pieces assembled by hand. Though I think I could split osaterminology into three separate packages, two to be built on 10.3 and the other on 10.4, to get around that problem. If bdist_mpkg was used for that, would the third installer, the one built on Tiger, also work correctly on Panther? has -- http://freespace.virgin.net/hamish.sanderson/ From bob at redivi.com Sat Jun 4 00:37:08 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 15:37:08 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: <72DEF719-0C42-42C6-9CB3-1781724773B9@redivi.com> Message-ID: On Jun 3, 2005, at 3:20 PM, Nick Matsakis wrote: > > On Fri, 3 Jun 2005, Bob Ippolito wrote: > > >> Python extensions/packages don't and can't currently do things the >> Mac way, trying to shoehorn it into the Mac way before it's ready >> just causes unnecessary hassle for the developer and the user. You >> should just do it the way that everyone else does things, consistency >> is good. >> > > Answer this simple question, then: What is the right way to install > third-party python additions on the Mac? and don't say use "use > bdist_mpkg". I'm not interested in the mechanics but the end > result. It > sounds like the answer to this question is: "Extensions sould be > installed > in the site-packages directory of the python framework". Is that a > fair > answer? Extensions should be installed exactly how distutils installs them ("sudo python setup.py install"). bdist_mpkg does exactly this. The only exception is that it ensures that scripts end up in /usr/local/ bin rather than inside of a framework unless instructed to do otherwise. >>> I was hoping to install 2.3 and 2.4 compatible binaries into >>> /Library/Python/2.x/site-packages. This is simple and more >>> future-proof than the alternatives, as I see it. >>> >> >> Don't. Keep 2.3 and 2.4 separate. >> > > /Library/Python/2.3/site-packages is separate from > /Library/Python/2.4/site-packages. Keep 2.3 and 2.4 *installers* separate. That 2.4 location isn't valid, anyway. Not until Apple starts distributing a Python 2.4 interpreter, anyway. >> Easy enough to do wrong, too. As far as documentation goes, >> bdist_mpkg has documentation on the first google hit! >> > > 300 words is not "documentation". How do I actually run it once I've > installed it? How do I set .mpkg specific flags and metadata, pre and > postflight scripts? Like it says, run the bdist_mpkg tool in the same location as the setup.py. That's all there is to it. You don't have control over anything .mpkg-specific beyond what's covered in the help (i.e. a readme, etc.). If you need fancy stuff, make a .mpkg with PackageMaker that does whatever junk you want to do, and reference the bdist_mpkg-built package. bdist_mpkg is not a general replacement for PackageMaker, it is a way of pushing the last step of distutils on to Apple's installer. -bob From bob at redivi.com Sat Jun 4 00:48:15 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 15:48:15 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: <52DE416D-D626-4531-A560-1EC8CE8C6A9B@redivi.com> On Jun 3, 2005, at 3:22 PM, Nick Matsakis wrote: > > On Fri, 3 Jun 2005, Ronald Oussoren wrote: > > >> I don't think that's worth the effort. Someone who goes through the >> effort of downloading a python 2.4.1 can also download a seperate >> installer for appscript-for-python2.4 (and every other package >> they like >> to use with python 2.4). >> > > That's the same as saying "someone who does some work can do more > work". > Why should this person do more work when they don't have to? Why > don't we > just take the half-cent worth of disk space and install the 2.4 > binaries > while we're there? It's not technically possible unless Python 2.4.1 is already present. Also, even if it were possible, no other packages do this so the behavior would be surprising to say the least. The utilities that AppScript ships with can only run with a given Python interpreter. The user should have control over what this is, and the best way to do that is simply keep separate packages. > It's great that Python ships on Macs now, but the python "add-on" > experience is really weak. If someone wants to run the latest > python on > their Mac they have to sort through py23Compat, TigerPython23Compat, > TigerPython24Fix, PantherPythonFix, MacPythonPantherAddons and > figure out > which apply to their system. If we're taking the time to build an > installer package, then we shouldn't we spend the effort to make > sure our > users don't have to? To install bdist_mkpg on 10.4 I had to download > *three* different packages. Why is this necessary? What we really need is for someone to write clear and obvious documentation as to what you need to get to do Python development, but I don't have time to do that any time soon. We can't issue Software Updates to fix flaws in Apple's operating system distribution, and bdist_mpkg has no inherent knowledge of patches that it should be installing for various combinations of Mac OS X and Python, so it doesn't wrap them up into installer packages. Just include the relevant dependencies in your distribution if you want a single step install. Python23Compat, and the fixes aren't ever going to be updated, so it's not going to cause a problem for anyone. -bob From bob at redivi.com Sat Jun 4 00:53:37 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 15:53:37 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: <19162E5E-3BA4-4DF3-904A-B5B3BC08EA9A@redivi.com> On Jun 3, 2005, at 3:30 PM, has wrote: > Bob Ippolito wrote: > > >> There are three situations you should be concerned with: >> 1. Python 2.3.0 on Mac OS X 10.3 >> 2. Python 2.3.5 on Mac OS X 10.4 >> 3. Python 2.4.x on either >> >> 1 and 2 can be dealt with by a single package, built on Mac OS X 10.3 >> with bdist_mpkg installed for Python 2.3.0 >> >> 3 can be dealt with by a single package, built on Mac OS X 10.3 with >> bdist_mpkg installed for Python 2.4.1. >> > > I'd better point out - as much for Nick's benefit as anyone's - > that bdist_mpkg currently isn't suitable for building an appscript > installer as osaterminology's OSATerminology extension has to be > built on both OS 10.3 and 10.4 and the resulting pieces assembled > by hand. > > Though I think I could split osaterminology into three separate > packages, two to be built on 10.3 and the other on 10.4, to get > around that problem. If bdist_mpkg was used for that, would the > third installer, the one built on Tiger, also work correctly on > Panther? Some packages when built on Mac OS X 10.4 will work on 10.3. This is more likely if you're using gcc 3.3 (sudo gcc_switch 3.3 before building) rather than the default 4.0. However, the only way to know is to do it and see if it works. -bob From matsakis at mit.edu Sat Jun 4 08:24:10 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Sat, 4 Jun 2005 02:24:10 -0400 (EDT) Subject: [Pythonmac-SIG] bdist_mpkg questions Message-ID: I'm playing around with bdist_mpkg and have some questions. If these get answered, I promise to put them on the wiki: 1. Why does it build a meta-package with a single package inside? Why not just a package? 2. When I install a bdist-made package, the files have the owner of the user that built the package not the user installing the package, even though no root authorization is required. Apple's documentation says "By default, if no authorization is required, the files that Installer places on a user's computer are owned by the user doing the installation." see: http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_permissions_author.html I strongly suspect this is a bug in Apple's installer; Under 10.3, their documentation claimed that packages wouldn't change the permissions of existing directories, but this is exactly what happened with the Appscript Installer 1.0 (10.4 appears to fix this). Anyway, if we can't trust Installer.app to set the permissions appropriately, is there any way to set the owner/permissions of the file at the time the package is built (other than su-ing to that user)? 3. What's the deal with PackageManager? What is a "repository", exactly, and what format are the packages in a repository? 4. I'm getting a very bizarre error trying to run bdist_mpkg. If I run the script directly, it can't find the bdist package. However, if I run it as an argument to python2.3, it does. I'm willing to ignore this, but if anyone has suggestions I'd love to hear them (this is with the built-in python on 10.3.9. Observe: artoo% cat /usr/local/bin/bdist_mpkg #!/usr/bin/python2.3 from bdist_mpkg.scripts.script_bdist_mpkg import main main() artoo% bdist_mpkg -h Traceback (most recent call last): File "/usr/local/bin/bdist_mpkg", line 2, in ? from bdist_mpkg.scripts.script_bdist_mpkg import main ImportError: No module named bdist_mpkg.scripts.script_bdist_mpkg artoo% /usr/bin/python2.3 /usr/local/bin/bdist_mpkg -h Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message ... ??? Nick Matsakis From bob at redivi.com Sat Jun 4 08:33:23 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Jun 2005 23:33:23 -0700 Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: References: Message-ID: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> On Jun 3, 2005, at 11:24 PM, Nick Matsakis wrote: > > I'm playing around with bdist_mpkg and have some questions. If > these get > answered, I promise to put them on the wiki: > > 1. Why does it build a meta-package with a single package inside? > Why not > just a package? Each distutils target is a separate pkg. Anyway, it's an implementation detail, you shouldn't need to care, it doesn't really make a difference for anything except the receipt(s). > 2. When I install a bdist-made package, the files have the owner of > the > user that built the package not the user installing the package, even > though no root authorization is required. Apple's documentation > says "By > default, if no authorization is required, the files that Installer > places > on a user's computer are owned by the user doing the installation." > see: > > http://developer.apple.com/documentation/DeveloperTools/Conceptual/ > SoftwareDistribution/Concepts/sd_permissions_author.html > > I strongly suspect this is a bug in Apple's installer; Under 10.3, > their > documentation claimed that packages wouldn't change the permissions of > existing directories, but this is exactly what happened with the > Appscript > Installer 1.0 (10.4 appears to fix this). Anyway, if we can't trust > Installer.app to set the permissions appropriately, is there any > way to > set the owner/permissions of the file at the time the package is built > (other than su-ing to that user)? bdist_mpkg always finds the deepest installation location to install to, so changing the permissions of existing directories won't happen. Even if installer does have that bug, it shouldn't matter. > 3. What's the deal with PackageManager? What is a "repository", > exactly, > and what format are the packages in a repository? PackageManager is completely irrelevant. > 4. I'm getting a very bizarre error trying to run bdist_mpkg. If I > run > the script directly, it can't find the bdist package. However, if > I run > it as an argument to python2.3, it does. I'm willing to ignore > this, but > if anyone has suggestions I'd love to hear them (this is with the > built-in > python on 10.3.9. Observe: > > artoo% cat /usr/local/bin/bdist_mpkg > #!/usr/bin/python2.3 > from bdist_mpkg.scripts.script_bdist_mpkg import main > main() > > artoo% bdist_mpkg -h > Traceback (most recent call last): > File "/usr/local/bin/bdist_mpkg", line 2, in ? > from bdist_mpkg.scripts.script_bdist_mpkg import main > ImportError: No module named bdist_mpkg.scripts.script_bdist_mpkg Did you have some old installation of py2app or PyObjC? It was organized differently many versions ago and can cause stuff like this. Clean out any of /Library/Python/2.3 that is also in /Library/ Python/2.3/py2app (i.e. bdist_mpkg, macholib, etc.). You might as well rip out the py2app folder in there too and reinstall, just in case. -bob From matsakis at mit.edu Sat Jun 4 08:52:16 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Sat, 4 Jun 2005 02:52:16 -0400 (EDT) Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> Message-ID: On Fri, 3 Jun 2005, Bob Ippolito wrote: > > 2. When I install a bdist-made package, the files have the owner of > > the user that built the package not the user installing the package, > > even though no root authorization is required. > bdist_mpkg always finds the deepest installation location to install > to, so changing the permissions of existing directories won't > happen. Even if installer does have that bug, it shouldn't matter. bdist_mpkg-build packages *do* change the permissions on existing directories. See for yourself: ----- artoo% ll -d /Library/Python/2.3/ drwxrwxr-x 8 root admin 272 4 Jun 00:11 /Library/Python/2.3/ artoo% installer -pkg LaunchServices-0.2.mpkg -target / installer: Package name is LaunchServices 0.2 installer: Upgrading volume mounted at /. installer: The upgrade was successful. artoo% ll -d /Library/Python/2.3/ drwxrwxr-x 10 admin admin 340 4 Jun 02:45 /Library/Python/2.3/ ----- If you repair permissions it changes it back to the way it was. It does make a difference because some users think you're incompetent if you ruin permissions with your >> 3. What's the deal with PackageManager? What is a "repository", >> exactly, and what format are the packages in a repository? > PackageManager is completely irrelevant. I know PackageManager is unrelated to bdist_mpkg. I'd still like my question answered so that I can put it up on the Wiki. It's this kind of thing that makes macpython so unapproachable---lots of different ways of doing the same thing, some deprecated, some not. Nick From bob at redivi.com Sat Jun 4 09:42:54 2005 From: bob at redivi.com (Bob Ippolito) Date: Sat, 4 Jun 2005 00:42:54 -0700 Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> Message-ID: On Jun 3, 2005, at 11:52 PM, Nick Matsakis wrote: > > On Fri, 3 Jun 2005, Bob Ippolito wrote: > > >>> 2. When I install a bdist-made package, the files have the owner of >>> the user that built the package not the user installing the package, >>> even though no root authorization is required. >>> > > >> bdist_mpkg always finds the deepest installation location to install >> to, so changing the permissions of existing directories won't >> happen. Even if installer does have that bug, it shouldn't matter. >> > > bdist_mpkg-build packages *do* change the permissions on existing > directories. See for yourself: > > ----- > artoo% ll -d /Library/Python/2.3/ > drwxrwxr-x 8 root admin 272 4 Jun 00:11 /Library/Python/2.3/ > > artoo% installer -pkg LaunchServices-0.2.mpkg -target / > installer: Package name is LaunchServices 0.2 > installer: Upgrading volume mounted at /. > installer: The upgrade was successful. > > artoo% ll -d /Library/Python/2.3/ > drwxrwxr-x 10 admin admin 340 4 Jun 02:45 /Library/Python/2.3/ > ----- > > If you repair permissions it changes it back to the way it was. It > does > make a difference because some users think you're incompetent if > you ruin > permissions with your The /usr/bin/installer and the Installer.app can have different behavior, and if either does happen to change permissions, then it's a bug in Mac OS X 10.3 (one that looks rather inconsequential). It absolutely does not have that behavior in 10.4, and it does everything it should be doing as documented. Where did that package come from anyway? I certainly didn't build it. >>> 3. What's the deal with PackageManager? What is a "repository", >>> exactly, and what format are the packages in a repository? >>> > > >> PackageManager is completely irrelevant. >> > > I know PackageManager is unrelated to bdist_mpkg. I'd still like my > question answered so that I can put it up on the Wiki. It's this > kind of > thing that makes macpython so unapproachable---lots of different > ways of > doing the same thing, some deprecated, some not. I meant that it's irrelevant, entirely. Ignore that it exists. PackageManager shouldn't be used. -bob From matsakis at mit.edu Sat Jun 4 16:05:17 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Sat, 4 Jun 2005 10:05:17 -0400 (EDT) Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> Message-ID: On Sat, 4 Jun 2005, Bob Ippolito wrote: > The /usr/bin/installer and the Installer.app can have different > behavior, and if either does happen to change permissions, then it's a > bug in Mac OS X 10.3 (one that looks rather inconsequential). It > absolutely does not have that behavior in 10.4, and it does everything > it should be doing as documented. I've observed this bug with the Installer application as well. As I said in my original message: > I strongly suspect this is a bug in Apple's installer; Under 10.3, their > documentation claimed that packages wouldn't change the permissions of > existing directories, but this is exactly what happened with the > Appscript Installer 1.0 (10.4 appears to fix this). > Where did that package come from anyway? I certainly didn't build it. It came with Python23Compat, which you claim to have built: http://bob.pythonmac.org/archives/2005/02/02/python23compat/ Nick From erictexier at sbcglobal.net Sat Jun 4 17:05:05 2005 From: erictexier at sbcglobal.net (Eric Texier) Date: Sat, 04 Jun 2005 08:05:05 -0700 Subject: [Pythonmac-SIG] Tkinter problem in a forked Message-ID: <42A1C321.9060905@sbcglobal.net> Hi, I am having trouble with running tk in a child process. the code worked on linux. It crashed with the following message: creating window in receptionist Tcl_FinalizeNotifier: notifier pipe not initialized Abort Any idea if it's a bug or something extra that I need to do of macox. Thanks, Eric import os, sys from Tkinter import * class receiver: def __init__(self, pipeFromParent): try: print "creating window in receptionist" Tk(className='foork',screenName = None,baseName = None) print "creating window in receptionist DONE" except: sys.exit(1) tkinter.createfilehandler(pipeFromParent,tkinter.READABLE,self.msgFromParent) self.Frame = Frame() self.Frame.master.protocol("WM_DELETE_WINDOW", self.quit) self.Frame.mainloop() def quit(self): print "in quit" def msgFromParent(self,file=None,mask=None): print "in msgFromParent file: ",file," mask: ",mask sys.exit(0) def startReceiver(): pipeReceiver = os.pipe() pid = os.fork() if pid == 0: # child process os.close(pipeReceiver[1]) receiver(pipeReceiver[0]) sys.exit(0) # parent process os.close(pipeReceiver[0]) return pipeReceiver[1] pipeReceiver = startReceiver() win = Tk(className = "main") win.mainloop() From bob at redivi.com Sat Jun 4 19:56:18 2005 From: bob at redivi.com (Bob Ippolito) Date: Sat, 4 Jun 2005 10:56:18 -0700 Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> Message-ID: On Jun 4, 2005, at 7:05 AM, Nick Matsakis wrote: > > On Sat, 4 Jun 2005, Bob Ippolito wrote: > > >> Where did that package come from anyway? I certainly didn't build >> it. >> > > It came with Python23Compat, which you claim to have built: > http://bob.pythonmac.org/archives/2005/02/02/python23compat/ My mistake, I didn't remember that I made the constituent packages of that easily separable. -bob From bob at redivi.com Sat Jun 4 19:59:27 2005 From: bob at redivi.com (Bob Ippolito) Date: Sat, 4 Jun 2005 10:59:27 -0700 Subject: [Pythonmac-SIG] Tkinter problem in a forked In-Reply-To: <42A1C321.9060905@sbcglobal.net> References: <42A1C321.9060905@sbcglobal.net> Message-ID: On Jun 4, 2005, at 8:05 AM, Eric Texier wrote: > I am having trouble with running tk in a child process. the code > worked > on linux. > It crashed with the following message: > > creating window in receptionist > Tcl_FinalizeNotifier: notifier pipe not initialized > Abort > > Any idea if it's a bug or something extra that I need to do of macox. On Mac OS X, you almost always need to fork/exec if you're using GUI stuff. There's too much shared state with fork alone, which can cause strange behavior as you've noticed. -bob From mitchchapman at earthlink.net Sun Jun 5 19:49:48 2005 From: mitchchapman at earthlink.net (Mitch Chapman) Date: Sun, 5 Jun 2005 11:49:48 -0600 Subject: [Pythonmac-SIG] frameworkinstall and non-default --prefix/--enable-framework In-Reply-To: References: <371118146c14eb0ce48694c09d35debd@earthlink.net> Message-ID: <744504bdc8ac186c647217ad3a7dce73@earthlink.net> On Jun 1, 2005, at 6:01 PM, Bob Ippolito wrote: > On Jun 1, 2005, at 4:43 PM, Mitch Chapman wrote: > >> I've been trying to do a framework install of Python 2.4.1 to a >> non-standard location, on Mac OS X 10.3.8. >> >> $ ./configure --prefix= >> --enable-framework=/Frameworks >> $ make >> $ make frameworkinstall >> >> The last step has been failing. The cause appears to be line 20 of >> Mac/OSX/Makefile: >> >> bindir=/usr/local/bin >> >> I changed it to >> >> bindir=$(prefix)/bin >> >> Now the frameworkinstall seems to work. Not sure what I was smoking when I wrote this... Mac/OSX/Makefile is hardwired to use /usr/local/bin, but changing just this line does not make it possible to 'make frameworkinstall' to an arbitrary location. >> >> Is there a reason why bindir needs to be hardwired to /usr/local/bin? > > No > >> Apologies if this has already been discussed. I have searched my >> Python-Mac mailbox, the Python sourceforge bugtracker and Google, but >> have found nothing relevant. > > File a bug please Will do. Thanks. -- Mitch From ronaldoussoren at mac.com Sun Jun 5 17:24:51 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 5 Jun 2005 08:24:51 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: Message-ID: <1F5163CC-2463-44DF-AF6E-A6978A66A635@mac.com> On 3-jun-2005, at 15:22, Nick Matsakis wrote: > > On Fri, 3 Jun 2005, Ronald Oussoren wrote: > > >> I don't think that's worth the effort. Someone who goes through the >> effort of downloading a python 2.4.1 can also download a seperate >> installer for appscript-for-python2.4 (and every other package >> they like >> to use with python 2.4). >> > > That's the same as saying "someone who does some work can do more > work". > Why should this person do more work when they don't have to? Why > don't we > just take the half-cent worth of disk space and install the 2.4 > binaries > while we're there? One reason is that I might want to use different versions of packags in Python 2.3 and 2.4. Another reason is that noone else does this and you will therefore confuse some people by having a single installer that supports python 2.3 and 2.4. > > It's great that Python ships on Macs now, but the python "add-on" > experience is really weak. If someone wants to run the latest > python on > their Mac they have to sort through py23Compat, TigerPython23Compat, > TigerPython24Fix, PantherPythonFix, MacPythonPantherAddons and > figure out > which apply to their system. If we're taking the time to build an > installer package, then we shouldn't we spend the effort to make > sure our > users don't have to? To install bdist_mkpg on 10.4 I had to download > *three* different packages. Why is this necessary? It's necessary because nobody has bothered to build a batteries- included installer and PackMan is basically dead. Something like PackMan would be useful to have. There seem to be at least two attempts to build a python package manager at the moment, with some luck we'll just have to slap a nice GUI on top of one of them. Ronald From ronaldoussoren at mac.com Sun Jun 5 23:37:55 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 5 Jun 2005 14:37:55 -0700 Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: References: Message-ID: <0F8F9697-0EBE-40DA-B240-1A91373790AE@mac.com> On 3-jun-2005, at 23:24, Nick Matsakis wrote: > > 3. What's the deal with PackageManager? What is a "repository", > exactly, > and what format are the packages in a repository? If you don't know you don't wanna know :-). The idea of PackageManager was that a trusted platform maintainer would maintain a repository of Python packages that have been build *and tested* on OSX, basically Fink or Darwinports for Python packages. This would also include a nice GUI to make it easier for novices to install additional tested packages. The downside is that the actual implementation has major issues, or "development opportunities". Most of those have been rehashed on this list in past. Sadly enough Jack doesn't seem to have much time to work on MacPython at the moment. Bob's collection of installer packages is another implementation of that idea (but without the package selection GUI). He used to have a PackMan repository as well, but stopped maintaining that because of the issues with PackMan. Ronald From ronaldoussoren at mac.com Sun Jun 5 23:40:38 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 5 Jun 2005 14:40:38 -0700 Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> Message-ID: On 3-jun-2005, at 23:33, Bob Ippolito wrote: >> >> artoo% bdist_mpkg -h >> Traceback (most recent call last): >> File "/usr/local/bin/bdist_mpkg", line 2, in ? >> from bdist_mpkg.scripts.script_bdist_mpkg import main >> ImportError: No module named bdist_mpkg.scripts.script_bdist_mpkg >> > > Did you have some old installation of py2app or PyObjC? It was > organized differently many versions ago and can cause stuff like > this. Clean out any of /Library/Python/2.3 that is also in /Library/ > Python/2.3/py2app (i.e. bdist_mpkg, macholib, etc.). You might as > well rip out the py2app folder in there too and reinstall, just in > case. Can bdist_mpkg be told to force the usage of the extra_dir option in distutils and then forcefully remove that directory in a preinstall/preupgrade script? That would remove most issues with restructuring of packages. Ronald From bob at redivi.com Mon Jun 6 01:40:09 2005 From: bob at redivi.com (Bob Ippolito) Date: Sun, 5 Jun 2005 16:40:09 -0700 Subject: [Pythonmac-SIG] bdist_mpkg questions In-Reply-To: References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> Message-ID: <090B44E5-EE78-4718-A961-BBB3A2C07922@redivi.com> On Jun 5, 2005, at 2:40 PM, Ronald Oussoren wrote: > > On 3-jun-2005, at 23:33, Bob Ippolito wrote: > >>> >>> artoo% bdist_mpkg -h >>> Traceback (most recent call last): >>> File "/usr/local/bin/bdist_mpkg", line 2, in ? >>> from bdist_mpkg.scripts.script_bdist_mpkg import main >>> ImportError: No module named bdist_mpkg.scripts.script_bdist_mpkg >>> >>> >> >> Did you have some old installation of py2app or PyObjC? It was >> organized differently many versions ago and can cause stuff like >> this. Clean out any of /Library/Python/2.3 that is also in /Library/ >> Python/2.3/py2app (i.e. bdist_mpkg, macholib, etc.). You might as >> well rip out the py2app folder in there too and reinstall, just in >> case. >> > > Can bdist_mpkg be told to force the usage of the extra_dir option in > distutils > and then forcefully remove that directory in a preinstall/preupgrade > script? That > would remove most issues with restructuring of packages. Well in the case of py2app, the problem is that I moved from not using extra_path, to using extra_path... If I added the functionality now, it wouldn't help. -bob From lee_cullens at mac.com Mon Jun 6 04:09:10 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Sun, 5 Jun 2005 22:09:10 -0400 Subject: [Pythonmac-SIG] detecting aliases In-Reply-To: <090B44E5-EE78-4718-A961-BBB3A2C07922@redivi.com> References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> <090B44E5-EE78-4718-A961-BBB3A2C07922@redivi.com> Message-ID: <69C9D42D-05A6-4279-951B-8263C6900CD4@mac.com> One of my little utilities needs to know when it encounters links/ aliases. I can of course detect a Unix symbolic link with os.path.islink ('path') and determine what it points to with os.readlink('path'), but an Aqua alias only triggers os.isfile and it has a size of zero. The size is not a reliable indicator though and I was wondering how (in Python) to detect such and determine what it points to. Is this one of those OS unique things where I need to get into the dev tools to resolve? I've been putting such off till I get into ObjC, since Bob said I would understand the interfaces better then. I'm not asking you to solve my little problem, just keep me pointed in the right direction :~) Thanks, Lee C From bob at redivi.com Mon Jun 6 05:02:56 2005 From: bob at redivi.com (Bob Ippolito) Date: Sun, 5 Jun 2005 20:02:56 -0700 Subject: [Pythonmac-SIG] detecting aliases In-Reply-To: <69C9D42D-05A6-4279-951B-8263C6900CD4@mac.com> References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> <090B44E5-EE78-4718-A961-BBB3A2C07922@redivi.com> <69C9D42D-05A6-4279-951B-8263C6900CD4@mac.com> Message-ID: <12C89527-23E6-4699-8B3D-72C8E6D02AA1@redivi.com> On Jun 5, 2005, at 7:09 PM, Lee Cullens wrote: > One of my little utilities needs to know when it encounters links/ > aliases. > > I can of course detect a Unix symbolic link with os.path.islink > ('path') and determine what it points to with os.readlink('path'), > but an Aqua alias only triggers os.isfile and it has a size of zero. > The size is not a reliable indicator though and I was wondering how > (in Python) to detect such and determine what it points to. > > Is this one of those OS unique things where I need to get into the > dev tools to resolve? I've been putting such off till I get into > ObjC, since Bob said I would understand the interfaces better then. Aliases have nothing to do with Objective-C, they're only dealt with from Carbon. import os from Carbon.File import FSResolveAliasFile, FSRef def resolve_alias(path): # resolve an alias, if not an alias then it will just return the # given path. return FSResolveAliasFile(path, True)[0].as_pathname() def is_alias(path): # return 1 if an alias, 0 otherwise return FSRef(path)[0] -bob From matsakis at mit.edu Mon Jun 6 06:24:17 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Mon, 6 Jun 2005 00:24:17 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: <1F5163CC-2463-44DF-AF6E-A6978A66A635@mac.com> References: <1F5163CC-2463-44DF-AF6E-A6978A66A635@mac.com> Message-ID: On Sun, 5 Jun 2005, Ronald Oussoren wrote: > > That's the same as saying "someone who does some work can do more > > work". Why should this person do more work when they don't have to? > > Why don't we just take the half-cent worth of disk space and install > > the 2.4 binaries while we're there? > One reason is that I might want to use different versions of packags > in Python 2.3 and 2.4. Another reason is that noone else does this > and you will therefore confuse some people by having a single > installer that supports python 2.3 and 2.4. Well, in this case there's only one version of the packages (actually, there are a couple of extra features for 10.4 but that is irrelevant for 2.3 vs 2.4). As for your second point, I hardly think it's confusing to say, "This installer supports these versions of python". I also think this is more Mac-like. Software components typically have requirements that look like "10.3.1+" and so what is confusing is to say that something works with Python 2.3 but not Python 2.4. (It may be natural for a python developer, of course). Nick From erictexier at sbcglobal.net Mon Jun 6 06:28:46 2005 From: erictexier at sbcglobal.net (eric texier) Date: Sun, 5 Jun 2005 21:28:46 -0700 (PDT) Subject: [Pythonmac-SIG] Tkinter problem in a forked In-Reply-To: 6667 Message-ID: <20050606042846.54712.qmail@web81605.mail.yahoo.com> Thank you for you quick anwser. I am getting an error well documented: RuntimeError: _tkinter.createfilehandler not supported for threaded Tcl I am using the Aqua Batteries-Included and I was wondering if it was easy/recommended to rebuild the package with the single threaded option or will the x implementation be a better solution if I want to be sure that what ever I am doing can run on linux. Thanks Eric --- Bob Ippolito wrote: > > On Jun 4, 2005, at 8:05 AM, Eric Texier wrote: > > > I am having trouble with running tk in a child process. the code > > > worked > > on linux. > > It crashed with the following message: > > > > creating window in receptionist > > Tcl_FinalizeNotifier: notifier pipe not initialized > > Abort > > > > Any idea if it's a bug or something extra that I need to do of > macox. > > On Mac OS X, you almost always need to fork/exec if you're using > GUI > stuff. There's too much shared state with fork alone, which can > cause strange behavior as you've noticed. > > -bob > > From lee_cullens at mac.com Mon Jun 6 06:52:00 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Mon, 6 Jun 2005 00:52:00 -0400 Subject: [Pythonmac-SIG] detecting aliases In-Reply-To: <12C89527-23E6-4699-8B3D-72C8E6D02AA1@redivi.com> References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> <090B44E5-EE78-4718-A961-BBB3A2C07922@redivi.com> <69C9D42D-05A6-4279-951B-8263C6900CD4@mac.com> <12C89527-23E6-4699-8B3D-72C8E6D02AA1@redivi.com> Message-ID: Thanks for the reply Bob. I've been digging around in the Python Documentation Macintosh and more specifically Carbon.File. (All seems to be a bit of a secret society :~) with scant docs that are not up to date and no content in __doc__s so it's a little hard going) What you noted doesn't seem to work verbatim for me, but noting the following from the Python site googling: ResolveAliasFile(file) Resolve an alias file. Returns a 3-tuple (fsspec, isfolder, aliased) where fsspec is the resulting FSSpec object, isfolder is true if fsspec points to a folder and aliased is true if the file was an alias in the first place (otherwise the FSSpec object for the file itself is returned). and following your lead I got the following where ppath is an Aqua alias to a folder so I need to check for an Aqua alias to a file: >>> FSResolveAliasFile(ppath, 1) (, 1, 1) >>> FSResolveAliasFile(ppath, 1)[0].as_pathname() '/Library/Documentation' with the FSRef though I get the following >>> def is_alias(ppath): ... return FSRef(ppath)[0] ... >>> ppath = '/Users/Chinook/Documents/Personal/Sys Documentation alias 1' >>> is_alias(ppath) Traceback (most recent call last): File "/Applications/WingIDE-Professional-2.0.3/WingIDE.app/ Contents/MacOS/src/debug/server/_sandbox.py", line 1, in ? # Used internally for debug sandbox under external interpreter File "/Applications/WingIDE-Professional-2.0.3/WingIDE.app/ Contents/MacOS/src/debug/server/_sandbox.py", line 2, in is_alias if __name__ == '__main__': TypeError: unsubscriptable object Or from the Terminal: Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> from Carbon.File import FSResolveAliasFile, FSRef >>> FSRef('/Users/Chinook/Documents/Personal/Sys Documentation alias 1') >>> def is_alias(ppath): ... return FSRef(ppath)[0] ... >>> ppath = '/Users/Chinook/Documents/Personal/Sys Documentation alias 1' >>> is_alias(ppath) Traceback (most recent call last): File "", line 1, in ? File "", line 2, in is_alias TypeError: unsubscriptable object >>> Guess I'll have to do some more googling, but it (tentatively) looks like I'm getting back a file ref object as if .data is a default and I have to look at what other methods are available. Thanks again, Lee C On Jun 5, 2005, at 11:02 PM, Bob Ippolito wrote: > > On Jun 5, 2005, at 7:09 PM, Lee Cullens wrote: > > >> One of my little utilities needs to know when it encounters links/ >> aliases. >> >> I can of course detect a Unix symbolic link with os.path.islink >> ('path') and determine what it points to with os.readlink('path'), >> but an Aqua alias only triggers os.isfile and it has a size of zero. >> The size is not a reliable indicator though and I was wondering how >> (in Python) to detect such and determine what it points to. >> >> Is this one of those OS unique things where I need to get into the >> dev tools to resolve? I've been putting such off till I get into >> ObjC, since Bob said I would understand the interfaces better then. >> > > Aliases have nothing to do with Objective-C, they're only dealt > with from Carbon. > > import os > from Carbon.File import FSResolveAliasFile, FSRef > > def resolve_alias(path): > # resolve an alias, if not an alias then it will just return the > # given path. > return FSResolveAliasFile(path, True)[0].as_pathname() > > def is_alias(path): > # return 1 if an alias, 0 otherwise > return FSRef(path)[0] > > -bob > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050606/d5684f57/attachment.html From bob at redivi.com Mon Jun 6 06:53:39 2005 From: bob at redivi.com (Bob Ippolito) Date: Sun, 5 Jun 2005 21:53:39 -0700 Subject: [Pythonmac-SIG] Appscript Installer 1.1a1 In-Reply-To: References: <1F5163CC-2463-44DF-AF6E-A6978A66A635@mac.com> Message-ID: <63FABBF6-9A03-4C1B-8E0B-5256183DEE64@redivi.com> On Jun 5, 2005, at 9:24 PM, Nick Matsakis wrote: > > On Sun, 5 Jun 2005, Ronald Oussoren wrote: > > >>> That's the same as saying "someone who does some work can do more >>> work". Why should this person do more work when they don't have to? >>> Why don't we just take the half-cent worth of disk space and install >>> the 2.4 binaries while we're there? >>> > > >> One reason is that I might want to use different versions of packags >> in Python 2.3 and 2.4. Another reason is that noone else does this >> and you will therefore confuse some people by having a single >> installer that supports python 2.3 and 2.4. >> > > Well, in this case there's only one version of the packages (actually, > there are a couple of extra features for 10.4 but that is > irrelevant for > 2.3 vs 2.4). As for your second point, I hardly think it's > confusing to > say, "This installer supports these versions of python". > > I also think this is more Mac-like. Software components typically > have > requirements that look like "10.3.1+" and so what is confusing is > to say > that something works with Python 2.3 but not Python 2.4. (It may be > natural for a python developer, of course). Python 2.3 and Python 2.4 are different products, that live in different places, and aren't really compatible (at the bytecode/ extension level). It's natural for extensions to them to have separate installers. Python packages are for Python developers, not for the general community of Mac users. When distributing something for more general users, you should distribute applications that contain everything they need (including Python, etc.). In order to do this, you need to be well aware of what you're using so that you can ensure that it's going to be compatible with the target audience. -bob From bob at redivi.com Mon Jun 6 06:59:30 2005 From: bob at redivi.com (Bob Ippolito) Date: Sun, 5 Jun 2005 21:59:30 -0700 Subject: [Pythonmac-SIG] Tkinter problem in a forked In-Reply-To: <20050606042846.54712.qmail@web81605.mail.yahoo.com> References: <20050606042846.54712.qmail@web81605.mail.yahoo.com> Message-ID: <59579E03-CCBE-4A8B-BCD7-BA7EEBBC3CA3@redivi.com> On Jun 5, 2005, at 9:28 PM, eric texier wrote: > --- Bob Ippolito wrote: > >> >> On Jun 4, 2005, at 8:05 AM, Eric Texier wrote: >> >> >>> I am having trouble with running tk in a child process. the code >>> >> >> >>> worked >>> on linux. >>> It crashed with the following message: >>> >>> creating window in receptionist >>> Tcl_FinalizeNotifier: notifier pipe not initialized >>> Abort >>> >>> Any idea if it's a bug or something extra that I need to do of >>> >> macox. >> >> On Mac OS X, you almost always need to fork/exec if you're using >> GUI >> stuff. There's too much shared state with fork alone, which can >> cause strange behavior as you've noticed. >> > Thank you for you quick anwser. > I am getting an error well documented: > RuntimeError: _tkinter.createfilehandler not supported for threaded > Tcl > I am using the Aqua Batteries-Included and I was wondering if it was > easy/recommended to rebuild the package with the single threaded > option or will the x implementation be a better solution if I want to > be sure that what ever I am doing can run on linux. Don't do that. Just use a separate thread to monitor the file handle on select() or something. Twisted could do this for you with the threadedselectreactor (in svn) . Similar things could be done by hand. -bob From bob at redivi.com Mon Jun 6 07:08:47 2005 From: bob at redivi.com (Bob Ippolito) Date: Sun, 5 Jun 2005 22:08:47 -0700 Subject: [Pythonmac-SIG] detecting aliases In-Reply-To: References: <8150983B-0262-404F-A123-FC9FE5056F28@redivi.com> <090B44E5-EE78-4718-A961-BBB3A2C07922@redivi.com> <69C9D42D-05A6-4279-951B-8263C6900CD4@mac.com> <12C89527-23E6-4699-8B3D-72C8E6D02AA1@redivi.com> Message-ID: <8FE5D200-09E4-4A6F-90DB-56A412F2404C@redivi.com> On Jun 5, 2005, at 9:52 PM, Lee Cullens wrote: > Thanks for the reply Bob. I've been digging around in the Python > Documentation Macintosh and more specifically Carbon.File. > (All seems to be a bit of a secret society :~) with scant docs that > are not up to date and no content in __doc__s so it's a little hard > going) It's basically the C APIs, slightly pythonized by a tool called bgen (and a bunch of Jack's effort customizing the process). It's not a secret society, just look in Apple's C documentation at , and guess how it would be translated into Python. -bob From joachimm at etek.chalmers.se Sun Jun 5 20:56:21 2005 From: joachimm at etek.chalmers.se (=?ISO-8859-1?Q?Joachim_M=E5rtensson?=) Date: Sun, 05 Jun 2005 20:56:21 +0200 Subject: [Pythonmac-SIG] Safe way to launch command-line app from python? Message-ID: <42A34AD5.7020502@etek.chalmers.se> Hello I want to launch emacs/vi from within python (Pyobjc to be more specific), and I want the editor to open a file. however I do not have complete control over which file will be launched (the user chooses from a tableview), since filenames can contain all kinds of charachters I am a little worried over how to accomplish this in a safe way. Any suggestions? Thanks in Advance. Joachim M?rtensson From rowen at cesmail.net Mon Jun 6 19:18:34 2005 From: rowen at cesmail.net (Russell E. Owen) Date: Mon, 06 Jun 2005 10:18:34 -0700 Subject: [Pythonmac-SIG] Tkinter problem in a forked References: <20050606042846.54712.qmail@web81605.mail.yahoo.com> <59579E03-CCBE-4A8B-BCD7-BA7EEBBC3CA3@redivi.com> Message-ID: In article <59579E03-CCBE-4A8B-BCD7-BA7EEBBC3CA3 at redivi.com>, Bob Ippolito wrote: > eric texier wrote: > > Thank you for you quick anwser. > > I am getting an error well documented: > > RuntimeError: _tkinter.createfilehandler not supported for threaded > > Tcl > > I am using the Aqua Batteries-Included and I was wondering if it was > > easy/recommended to rebuild the package with the single threaded > > option or will the x implementation be a better solution if I want to > > be sure that what ever I am doing can run on linux. > > Don't do that. Just use a separate thread to monitor the file handle > on select() or something. Twisted could do this for you with the > threadedselectreactor (in svn) 2005/04/17/twisted-and-foreign-event-loops/>. Similar things could > be done by hand. I agree (I've never used twisted framework myself, but it has a good reputation). Another option (which I use) is tcl sockets. See, for instance . -- Russell From rowen at cesmail.net Mon Jun 6 19:44:18 2005 From: rowen at cesmail.net (Russell E. Owen) Date: Mon, 06 Jun 2005 10:44:18 -0700 Subject: [Pythonmac-SIG] Tkinter X11 question Message-ID: The next version of Tcl/Tk will support making a framework build that displays using X11 (and I believe that option will be included in the binary installer). I'm wondering if that could be used to allow the user to somehow switch python to using Aqua or X11 for Tkinter display (without having to install two separate versions of python)? It can be handy to see one's app running both ways to get an idea what unix users will see. -- Russell From jbarden at wilcoxd.com Mon Jun 6 20:40:45 2005 From: jbarden at wilcoxd.com (Jared Barden) Date: Mon, 6 Jun 2005 14:40:45 -0400 Subject: [Pythonmac-SIG] NSMovieView problems Message-ID: <44F7DC6F-3B5C-4CB6-8518-83EDE627B276@wilcoxd.com> Hello All, I'm developing a Cocoa-Python application that uses a NSMovieView to play audio files. However, every time I do self.myView.setMovie_ (theMovie), the NSMovieView will appear in my window, and the program will crash almost instantaneously with a signal 10 (sigbus) error. Any thoughts on the matter are greatly appreciated. Jared Barden Wilcox Development Solutions http://www.wilcoxd.com From matsakis at mit.edu Mon Jun 6 22:10:40 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Mon, 6 Jun 2005 16:10:40 -0400 (EDT) Subject: [Pythonmac-SIG] bdist_mpkg Package Names Message-ID: In building packages, bdist_mpkg must pick a name and bundle identifier for the package, e.g. building appscript results in: name: appscript-purelib-0.12.0-py2.3-macosx10.3 bundleIdentifier: org.pythonmac.appscript-purelib-py2.3-macosx10.3 These are used by the installer to determine whether to do an upgrade or clean installation. As I understand it, by putting all those version numbers in the name, it becomes difficult to force an "update" rather than a clean install. As I understand it, 10.3 uses the package name to determine whether to install or update, while 10.4 uses some combination of the name and bundle identifier. See list post referenced at the end for more details. Suppose you have a package "package" of a certain version number and you install it on your system with bdist. Then, suppose you have a new version "package upgrade" which may or may not have been built on the same OS version as your original package. Then I see the following possibilities: 10.3 -> package -> package upgrade (built on same OS as before) won't update, because name contains package version number 10.3 -> package -> package upgrade (built on different OS as before) won't update, because name contains package version number 10.3 -> package -> 10.4 upgrade -> package upgrade (same OS as before) won't update, because identifier contains OS version number 10.3 -> package -> 10.4 upgrade -> package upgrade (different OS as before) won't update, because identifier contains OS version number 10.4 -> package -> package upgrade (built on same OS as before) *will* update, because identifier _doesn't_ contain package version number 10.4 -> package -> package upgrade (built on different OS) won't update, because identifier contains OS version number In general, not doing an update isn't so bad. It will still install the files. However, it could cause problems if files move around or the presence of files will cause different behaviors. It seems to me that bdist_mkpkg should just include the python version number and that's it (no version number for the additions or OS). Nick Matsakis For further reference on how 10.4's installer works, see: http://lists.apple.com/archives/installer-dev/2005/May/msg00013.html From bob at redivi.com Mon Jun 6 22:21:39 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 6 Jun 2005 13:21:39 -0700 Subject: [Pythonmac-SIG] NSMovieView problems In-Reply-To: <44F7DC6F-3B5C-4CB6-8518-83EDE627B276@wilcoxd.com> References: <44F7DC6F-3B5C-4CB6-8518-83EDE627B276@wilcoxd.com> Message-ID: <195CBAB5-A6DF-4FE8-9B54-037A6A04FEF2@redivi.com> On Jun 6, 2005, at 11:40 AM, Jared Barden wrote: > I'm developing a Cocoa-Python application that uses a NSMovieView to > play audio files. However, every time I do self.myView.setMovie_ > (theMovie), the NSMovieView will appear in my window, and the program > will crash almost instantaneously with a signal 10 (sigbus) error. > Put together a minimal example demonstrating the behavior and I'll look at it. Chances are, there's something else wrong. -bob From bob at redivi.com Mon Jun 6 23:39:18 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 6 Jun 2005 14:39:18 -0700 Subject: [Pythonmac-SIG] NSMovieView problems In-Reply-To: <195CBAB5-A6DF-4FE8-9B54-037A6A04FEF2@redivi.com> References: <44F7DC6F-3B5C-4CB6-8518-83EDE627B276@wilcoxd.com> <195CBAB5-A6DF-4FE8-9B54-037A6A04FEF2@redivi.com> Message-ID: <8C7CA2E6-2B7B-4255-80EA-4508746973ED@redivi.com> On Jun 6, 2005, at 1:21 PM, Bob Ippolito wrote: > > On Jun 6, 2005, at 11:40 AM, Jared Barden wrote: > > > >> I'm developing a Cocoa-Python application that uses a NSMovieView to >> play audio files. However, every time I do self.myView.setMovie_ >> (theMovie), the NSMovieView will appear in my window, and the program >> will crash almost instantaneously with a signal 10 (sigbus) error. >> >> > > Put together a minimal example demonstrating the behavior and I'll > look at it. Chances are, there's something else wrong. > My guess was right, something else is wrong. You're initializing an NSMovieView with a Carbon.Qt movie. That's very dangerous, when the Carbon.Qt movie gets deallocated, it destroys it, and the NSMovieView will be very unhappy about that. The general rule is to avoid Carbon.* or anything that depends on it unless you absolutely positively have to, and you know what you're doing. Basically, Don't do that. Don't use EasyDialogs either. To allow the user to select a file, use NSOpenPanel. To initialize a movie, use NSMovie's initWithURL:byReference:. With those two changes, the app should be less code (well, maybe about the same, depending on how you write it), will behave more natively, and it won't crash. -bob From enrike at altern.org Tue Jun 7 00:14:04 2005 From: enrike at altern.org (altern) Date: Tue, 07 Jun 2005 00:14:04 +0200 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? Message-ID: <42A4CAAC.2000103@altern.org> hi I just read about plans of apple to switch to intel processors in less than two years. I was wondering what this means for macpython. Maybe not much, they claim that it is pretty easy to port applications but it would be nice to hear some comments from someone in the list with experience on theses issues. thanks! -- enrike From charles.hartman at conncoll.edu Tue Jun 7 00:45:17 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Mon, 6 Jun 2005 18:45:17 -0400 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: <42A4CAAC.2000103@altern.org> References: <42A4CAAC.2000103@altern.org> Message-ID: <7A7715C8-DF6F-43CB-A65E-DEA14D99C46F@conncoll.edu> The story seems to be that Apple's had an Intel version of OSX ready, and kept up to date, for five years. Which makes it *sound* as though the transition will be painless (for developers as well as users). I'll believe that when I see it. Charles Hartman On Jun 6, 2005, at 6:14 PM, altern wrote: > hi > > I just read about plans of apple to switch to intel processors in less > than two years. I was wondering what this means for macpython. > Maybe not > much, they claim that it is pretty easy to port applications but it > would be nice to hear some comments from someone in the list with > experience on theses issues. > > thanks! > > -- > enrike > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From bob at redivi.com Tue Jun 7 00:52:58 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 6 Jun 2005 15:52:58 -0700 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: <42A4CAAC.2000103@altern.org> References: <42A4CAAC.2000103@altern.org> Message-ID: <01033C1C-DB19-4044-85BD-B7EDF0E16D93@redivi.com> On Jun 6, 2005, at 3:14 PM, altern wrote: > I just read about plans of apple to switch to intel processors in less > than two years. I was wondering what this means for macpython. > Maybe not > much, they claim that it is pretty easy to port applications but it > would be nice to hear some comments from someone in the list with > experience on theses issues. I just wrote a bit about this: -bob From lee_cullens at mac.com Tue Jun 7 00:55:14 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Mon, 6 Jun 2005 18:55:14 -0400 Subject: [Pythonmac-SIG] EasyInstall??? Message-ID: <4603C456-153A-413B-B4BF-C35433B5A61F@mac.com> Bob, Not something I was thinking of using any time soon, but since I ran across it I wondered what your take might be? http://peak.telecommunity.com/DevCenter/EasyInstall Thanks, Lee C From Zsolt.Putnoky at alcatel.fr Tue Jun 7 01:01:34 2005 From: Zsolt.Putnoky at alcatel.fr (Zsolt.Putnoky@alcatel.fr) Date: Tue, 7 Jun 2005 01:01:34 +0200 Subject: [Pythonmac-SIG] Zsolt PUTNOKY is out of the office Message-ID: I will be out of the office starting 06/06/2005 and will not return until 08/08/2005. I am not able to read any mails on this address. If the matter is urgent, please send a mail to zsolt_putnoky at yahoo.com From bob at redivi.com Tue Jun 7 01:03:27 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 6 Jun 2005 16:03:27 -0700 Subject: [Pythonmac-SIG] EasyInstall??? In-Reply-To: <4603C456-153A-413B-B4BF-C35433B5A61F@mac.com> References: <4603C456-153A-413B-B4BF-C35433B5A61F@mac.com> Message-ID: On Jun 6, 2005, at 3:55 PM, Lee Cullens wrote: > Not something I was thinking of using any time soon, but since I ran > across it I wondered what your take might be? > > http://peak.telecommunity.com/DevCenter/EasyInstall I'm keeping up with it, but I have not had time to experiment with it or read the source. It sounds like a good idea, and PJE writes good code, but it will probably take some time before it's distilled into something nice. Unfortunately I don't have a lot of Python time over the next few months to spend on cool new things like this. Mac considerations for EasyInstall and PythonEggs are pretty high on my TODO list, though. -bob From jack at gu.st Tue Jun 7 01:59:06 2005 From: jack at gu.st (jack) Date: Mon, 6 Jun 2005 16:59:06 -0700 Subject: [Pythonmac-SIG] 10.4, py2app, wxPython Message-ID: <53959173-3C11-49DD-A4FF-8A5B29B75A33@gu.st> Hello, I need to build a standalone wxPython app that will also run on 10.3. I am trying to use py2app to achieve this. I'm a bit fuzzy on what arguments I need to pass to make this possible. Currently I am using: python setup.py py2app -p wx,wxPython This works for me on 10.4, but when giving it out, my friend gets this error: ImportError: Failure linking new module: /usr/lib/libwx_macud-2.5.3.dylib: dyld: /Users/admin/Desktop/Test.app/Contents/MacOS/Test can't open library: /usr/lib/libwx_macud-2.5.3.dylib (No such file or directory, errno = 2) Trying to include this framework with the -f flag seems to do nothing (nothing is copied into the /Framework directory). And since this dylib is in a system path, it is not copied by default. Does anyone have any experience with this? I'm using py2app 0.2.1 and python 2.3.5 (stock Tiger). Thanks in advance, jack. From mathbymath at aol.com Mon Jun 6 14:10:32 2005 From: mathbymath at aol.com (Matthew S-H) Date: Mon, 6 Jun 2005 08:10:32 -0400 Subject: [Pythonmac-SIG] MacPython addons and Tiger In-Reply-To: <890F5E48-CAE1-4FE9-9290-9E96F1C9B998@redivi.com> References: <890F5E48-CAE1-4FE9-9290-9E96F1C9B998@redivi.com> Message-ID: On Jun 3, 2005, at 11:40 AM, Bob Ippolito wrote: > On Jun 3, 2005, at 5:00 AM, Jon Rosebaugh wrote: >> On 6/2/05, Bob Ippolito wrote: >>> The older ones probably work if you also install TigerPython23Compat >>> -- however, you're better off just using Python 2.4.1. Forget about >>> Python 2.3. > > you'll have to pick up TigerPython24Compat > > plenty of information on my blog: . > > Currently the information in my blog and the archives of this list > are authoritative I'm sorry. I'm a bit of a newb and am a bit confused by the instructions you guys gave. Could someone possibly give a list of the steps I would need to take to get from a virgin installation of X.4.1 to using IDLE and having it work properly? I am just a high school student who needs IDLE for his Comp Sci class. I will be getting serious about Python as soon as I finish my current project of learning bash scripting and a little bit of perl. Anyway, if anyone could give a step-by-step on how to get IDLE working (including URLs for downloads) without breaking anything, I'd appreciate it: 1. 2. 3. Thanks in advance, ~Matt. From bob at redivi.com Tue Jun 7 02:29:39 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 6 Jun 2005 17:29:39 -0700 Subject: [Pythonmac-SIG] 10.4, py2app, wxPython In-Reply-To: <53959173-3C11-49DD-A4FF-8A5B29B75A33@gu.st> References: <53959173-3C11-49DD-A4FF-8A5B29B75A33@gu.st> Message-ID: On Jun 6, 2005, at 4:59 PM, jack wrote: > Hello, > > I need to build a standalone wxPython app that will also run on > 10.3. I am trying to use py2app to achieve this. I'm a bit fuzzy on > what arguments I need to pass to make this possible. Currently I am > using: > python setup.py py2app -p wx,wxPython > > This works for me on 10.4, but when giving it out, my friend gets > this error: > ImportError: Failure linking new module: > /usr/lib/libwx_macud-2.5.3.dylib: dyld: > /Users/admin/Desktop/Test.app/Contents/MacOS/Test can't > open library: /usr/lib/libwx_macud-2.5.3.dylib (No such file or > directory, errno = 2) > > Trying to include this framework with the -f flag seems to do nothing > (nothing is copied into the /Framework directory). And since this > dylib is in a system path, it is not copied by default. > > Does anyone have any experience with this? > > I'm using py2app 0.2.1 and python 2.3.5 (stock Tiger). If you want to support 10.3, you need to build on 10.3, or ensure that ALL of your components were built on 10.3 (i.e. Python 2.4.1, wxPython from pythonmac.org/packages, etc.). No exceptions. Even if the Apple stuff was copied, it wouldn't work on 10.3. -bob From lee_cullens at mac.com Tue Jun 7 02:42:15 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Mon, 6 Jun 2005 20:42:15 -0400 Subject: [Pythonmac-SIG] MacPython addons and Tiger In-Reply-To: References: <890F5E48-CAE1-4FE9-9290-9E96F1C9B998@redivi.com> Message-ID: Matthew, I'm a little confused myself with your question. I assume your asking about a Mac OS X installation since you posted on the MacPython list, and I assume you're asking about Python 2.4.1. I can only tell you what I did, and that is explained on http:// undefined.org/python/ Having done so IDLE.app is in /Applications/MacPython-2.4/ HTH, Lee C On Jun 6, 2005, at 8:10 AM, Matthew S-H wrote: > > I'm sorry. I'm a bit of a newb and am a bit confused by the > instructions you guys gave. > > Could someone possibly give a list of the steps I would need to take > to get from a virgin installation of X.4.1 to using IDLE and having > it work properly? > I am just a high school student who needs IDLE for his Comp Sci > class. I will be getting serious about Python as soon as I finish my > current project of learning bash scripting and a little bit of perl. > > Anyway, if anyone could give a step-by-step on how to get IDLE > working (including URLs for downloads) without breaking anything, I'd > appreciate it: > 1. > 2. > 3. > > > > Thanks in advance, > ~Matt. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From lee_cullens at mac.com Tue Jun 7 02:48:02 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Mon, 6 Jun 2005 20:48:02 -0400 Subject: [Pythonmac-SIG] MacPython addons and Tiger In-Reply-To: References: <890F5E48-CAE1-4FE9-9290-9E96F1C9B998@redivi.com> Message-ID: Matthew, You might need to remone the line break from the URL - here it is again http://undefined.org/python/ HTH, Lee C From Chris.Barker at noaa.gov Tue Jun 7 06:48:19 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Mon, 06 Jun 2005 21:48:19 -0700 Subject: [Pythonmac-SIG] Python Help? In-Reply-To: <73BE5F8C-4559-4D0B-A060-28BAB3A5DC42@aol.com> References: <80F8A9D4-7353-4FF4-A301-5C8127698FED@aol.com> <8C1520BC-23E2-4F10-8651-701D1EE1B69B@conncoll.edu> <429F399B.1030801@noaa.gov> <73BE5F8C-4559-4D0B-A060-28BAB3A5DC42@aol.com> Message-ID: <42A52713.6080501@noaa.gov> > I would just like to say THANK YOU VERY MUCH!!! You're welcome. > I still > need to get IDLE installed on Tiger (which I just upgraded to). Why do you need to get IDLE working? It's really not the best option on OS-X anyway. I'd try PyOxide, or a plain old text editor and command line. If you search the archives of this list, you'll find a lot of discussion about the options. While there doesn't yet seem to be a truly robust, free, full featured, integrated IDE on OS-X, many of us manage to be quite productive anyway,. -Chris From mww at opendarwin.org Tue Jun 7 09:36:56 2005 From: mww at opendarwin.org (Markus Weissmann) Date: Tue, 7 Jun 2005 09:36:56 +0200 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: <42A4CAAC.2000103@altern.org> References: <42A4CAAC.2000103@altern.org> Message-ID: Hi Enrike, I think this won't be a big headache for the Python community - not even for the whole open source people; in fact - as darwin for x86 already is available for some time now - we've already tested some software on darwin/x86. You may find a list of RPMs I've built in end of 2004 for opendarwin for Intel here [1]. Just check for the py_* named packages and relax! :) cheers, -Markus [1] http://www.opendarwin.org/~mww/RPMS/i386/ On 07.06.2005, at 00:14, altern wrote: > hi > > I just read about plans of apple to switch to intel processors in less > than two years. I was wondering what this means for macpython. > Maybe not > much, they claim that it is pretty easy to port applications but it > would be nice to hear some comments from someone in the list with > experience on theses issues. > > thanks! > > -- > enrike > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > --- Markus W. Weissmann http://www.mweissmann.de/ http://www.opendarwin.org/~mww/ From fghorow.11707581 at bloglines.com Tue Jun 7 14:27:03 2005 From: fghorow.11707581 at bloglines.com (fghorow.11707581@bloglines.com) Date: 7 Jun 2005 12:27:03 -0000 Subject: [Pythonmac-SIG] matplotlib on Tiger? Message-ID: <1118147223.2817295715.19438.sendItem@bloglines.com> Hi all, What's the recommended way to install matplotlib on the 2.4.1 framework build? I've tried installing the py2.3-macosx.3 version, but that didn't seem to work. Do I need to use fink (and leave the nice "official unoffical" environment behind)? Compile from source? Dependency issues? Any hints for a pythonmac (and Tiger) newbie? TIA! Frank Horowitz From solipsis at pitrou.net Tue Jun 7 14:54:12 2005 From: solipsis at pitrou.net (Antoine Pitrou) Date: Tue, 07 Jun 2005 14:54:12 +0200 Subject: [Pythonmac-SIG] retrieving config values from the System Preferences Message-ID: <1118148852.25256.9.camel@p-dhcp-333-72.rd.francetelecom.fr> Hi, I'm porting an app to Mac OS X and I need to retrieve the configuration values entered in the System Preferences (specifically the HTTP proxy settings). I already know how to do that under Gnome and Windows, but I haven't found how to retrieve those values under Mac OS X (Panther, by the way). Is there a reliable way to do that ? Thank you, Regards Antoine. From doug at sonosphere.com Tue Jun 7 16:29:14 2005 From: doug at sonosphere.com (Doug Wyatt) Date: Tue, 7 Jun 2005 07:29:14 -0700 Subject: [Pythonmac-SIG] retrieving config values from the System Preferences In-Reply-To: <1118148852.25256.9.camel@p-dhcp-333-72.rd.francetelecom.fr> References: <1118148852.25256.9.camel@p-dhcp-333-72.rd.francetelecom.fr> Message-ID: <66EFA599-3D87-4271-A893-D54B16A77272@sonosphere.com> On Jun 7, 2005, at 5:54, Antoine Pitrou wrote: > Hi, > > I'm porting an app to Mac OS X and I need to retrieve the > configuration > values entered in the System Preferences (specifically the HTTP proxy > settings). I already know how to do that under Gnome and Windows, > but I > haven't found how to retrieve those values under Mac OS X (Panther, by > the way). Is there a reliable way to do that ? $ scutil > help [snip] > list [snip] subKey [48] = State:/Network/Global/Proxies [etc.] > show State:/Network/Global/Proxies { RTSPEnable : 0 ExcludeSimpleHostnames : 0 ProxyAutoDiscoveryEnable : 0 FTPPassive : 1 GopherEnable : 0 SOCKSEnable : 0 HTTPPort : 8080 AppleProxyConfigurationSelected : 2 HTTPProxy : localhost HTTPEnable : 1 } State:/Network/Global seems to correspond to the current network state (as opposed to saved configs which are under Setup:/Network/ Service). >>> p = os.popen('echo "show State:/Network/Global/Proxies" | scutil') >>> p.read() ' {\n RTSPEnable : 0\n ExcludeSimpleHostnames : 0\n ProxyAutoDiscoveryEnable : 0\n FTPPassive : 1\n GopherEnable : 0\n SOCKSEnable : 0\n HTTPPort : 8080\n AppleProxyConfigurationSelected : 2\n HTTPProxy : localhost\n HTTPEnable : 0\n}\n' >>> p.close() hth Doug From njriley at uiuc.edu Tue Jun 7 17:06:41 2005 From: njriley at uiuc.edu (Nicholas Riley) Date: Tue, 7 Jun 2005 10:06:41 -0500 Subject: [Pythonmac-SIG] retrieving config values from the System Preferences In-Reply-To: <1118148852.25256.9.camel@p-dhcp-333-72.rd.francetelecom.fr> References: <1118148852.25256.9.camel@p-dhcp-333-72.rd.francetelecom.fr> Message-ID: <20050607150641.GA77208@uiuc.edu> On Tue, Jun 07, 2005 at 02:54:12PM +0200, Antoine Pitrou wrote: > I'm porting an app to Mac OS X and I need to retrieve the configuration > values entered in the System Preferences (specifically the HTTP proxy > settings). I already know how to do that under Gnome and Windows, but I > haven't found how to retrieve those values under Mac OS X (Panther, by > the way). Is there a reliable way to do that ? Generic information is here: Bob Ippolito wrote a PyObjC-based wrapper for the SystemConfiguration framework, which makes this very simple to do in Python: >>> from SystemConfiguration import UNSystemConfigurationDynamicStore >>> store = UNSystemConfigurationDynamicStore.alloc().initWithName_('foo') >>> print store.proxies() { AppleProxyConfigurationSelected = 2; ExcludeSimpleHostnames = 0; FTPPassive = 1; ProxyAutoDiscoveryEnable = 0; } If I enable a proxy, I get: >>> print store.proxies() { AppleProxyConfigurationSelected = 2; ExcludeSimpleHostnames = 0; FTPPassive = 1; HTTPEnable = 1; HTTPPort = 80; HTTPProxy = "127.0.0.1"; ProxyAutoDiscoveryEnable = 0; } You can download the wrapper from: -- Nicholas Riley | From meesters at uni-mainz.de Tue Jun 7 17:17:07 2005 From: meesters at uni-mainz.de (Christian Meesters) Date: Tue, 7 Jun 2005 17:17:07 +0200 Subject: [Pythonmac-SIG] matplotlib on Tiger? In-Reply-To: <1118147223.2817295715.19438.sendItem@bloglines.com> References: <1118147223.2817295715.19438.sendItem@bloglines.com> Message-ID: <9279d8c11149b0ea6929f2d2968e1336@uni-mainz.de> Hi Frank, You might want to check this link: http://sda.iu.edu/projects.html It provides you with binary installers. The link was posted in the matplotlib mailing list. I suggested to announce it for the Pythonmac-SIG as well (hereby done *g*), but got no reply so far. Cheers, Christian On 7 Jun 2005, at 14:27, fghorow.11707581 at bloglines.com wrote: > Hi all, > > What's the recommended way to install matplotlib on the 2.4.1 framework > build? > > I've tried installing the py2.3-macosx.3 version, but that didn't > seem to work. > > Do I need to use fink (and leave the nice "official unoffical" > environment behind)? Compile from source? Dependency issues? > > Any hints > for a pythonmac (and Tiger) newbie? > > TIA! > > Frank Horowitz > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From Larry.A.Meyn at nasa.gov Tue Jun 7 17:29:25 2005 From: Larry.A.Meyn at nasa.gov (Larry Meyn) Date: Tue, 7 Jun 2005 08:29:25 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python Message-ID: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> There's a new kid in town and he doesn't play nice with MacPython (but he does ask first before kicking MacPython aside:) Any thoughts on how this affects the Python development ecosystem for OS X? (.. and right on the heels of the Intel announcements.) http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/ installnotes.html#osxpkg Larry Larry Meyn Aerospace Operations Modeling Branch M/S 210-10 NASA Ames Research Center Moffett Field, CA 94035-1000 E-mail: Larry.A.Meyn at nasa.gov Phone: (650) 604-5038 Fax: (650) 604-0222 E-Fax: (425) 944-5526 sent via e-mail From bob at redivi.com Tue Jun 7 19:59:28 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 10:59:28 -0700 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: References: <42A4CAAC.2000103@altern.org> Message-ID: <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> On Jun 7, 2005, at 12:36 AM, Markus Weissmann wrote: > I think this won't be a big headache for the Python community - not > even for > the whole open source people; in fact - as darwin for x86 already is > available > for some time now - we've already tested some software on darwin/x86. > You may find a list of RPMs I've built in end of 2004 for opendarwin > for Intel > here [1]. Just check for the py_* named packages and relax! :) That's totally not true, though. Basically, almost NONE of the Mac- specific Python stuff works correctly on Mac OS X for Intel, and the changes required to fix that are hard. -bob From bob at redivi.com Tue Jun 7 20:01:54 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 11:01:54 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> Message-ID: <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> On Jun 7, 2005, at 8:29 AM, Larry Meyn wrote: > There's a new kid in town and he doesn't play nice with MacPython (but > he does ask first before kicking MacPython aside:) > > Any thoughts on how this affects the Python development ecosystem for > OS X? (.. and right on the heels of the Intel announcements.) > > http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/ > installnotes.html#osxpkg It might be a couple days before I get around to playing with this. Since it's installed to the same place, and is the same version of Python, I'd expect the extensions to be interchangeable at least. -bob From petrilli at gmail.com Tue Jun 7 20:14:15 2005 From: petrilli at gmail.com (Christopher Petrilli) Date: Tue, 7 Jun 2005 14:14:15 -0400 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> References: <42A4CAAC.2000103@altern.org> <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> Message-ID: <59d991c4050607111427393f6f@mail.gmail.com> On 6/7/05, Bob Ippolito wrote: > That's totally not true, though. Basically, almost NONE of the Mac- > specific Python stuff works correctly on Mac OS X for Intel, and the > changes required to fix that are hard. I'm not that familiar with the specific changes, but from reading your blog, a lot of it "sounds" like it's working outside the defined APIs and frameworks. Given Apple's recent interests in Python, and the year lead-time before we have anything serious to worry about, it seems that a proposal to formalize the interface some, and add some stable APIs for what we need would be the best way to go. Note that it took a while for the APIs in the kernel to stabilize, but that's happened to a large extent with Tiger. If we were to approach them with a proposal, then I think we might have a decent chance. This wouldn't eliminate the problems, just simply fomalize them and make them recognized by Apple. That's what this whole 1 year's notice is about. Or am I just on crack today? Chris -- | Christopher Petrilli | petrilli at gmail.com From bob at redivi.com Tue Jun 7 20:30:33 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 11:30:33 -0700 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: <59d991c4050607111427393f6f@mail.gmail.com> References: <42A4CAAC.2000103@altern.org> <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> <59d991c4050607111427393f6f@mail.gmail.com> Message-ID: <99EE239B-7DD7-4EBD-8F65-DC301B4622AD@redivi.com> On Jun 7, 2005, at 11:14 AM, Christopher Petrilli wrote: > On 6/7/05, Bob Ippolito wrote: > >> That's totally not true, though. Basically, almost NONE of the Mac- >> specific Python stuff works correctly on Mac OS X for Intel, and the >> changes required to fix that are hard. >> > > I'm not that familiar with the specific changes, but from reading your > blog, a lot of it "sounds" like it's working outside the defined APIs > and frameworks. Given Apple's recent interests in Python, and the > year lead-time before we have anything serious to worry about, it > seems that a proposal to formalize the interface some, and add some > stable APIs for what we need would be the best way to go. Well, bgen is working with the published APIs, but it assumes four character codes are going to have a big endian representation.. which was true from when it was written many years ago until yesterday. libffi is part of the gcc project, which is really Apple's responsibility to take care of, but since it's not used in anything they've written it might not be fixed by them. Fortunately, it should already understand most of the calling convention for Mac OS X on Intel, but beating autoconf into making it do the right thing is non-trivial. Also, compiling libffi fat is going to be excruciating (since ALL of the code in there is platform specific, and it's done with autoconf). > Note that it took a while for the APIs in the kernel to stabilize, but > that's happened to a large extent with Tiger. If we were to approach > them with a proposal, then I think we might have a decent chance. > This wouldn't eliminate the problems, just simply fomalize them and > make them recognized by Apple. That's what this whole 1 year's notice > is about. > > Or am I just on crack today? I guess what you don't realize is that a lot of this work is going to end up on a few people outside of Apple (including myself), because nobody is going to fix the problem for us. Fortunately, you don't have that problem. -bob From trentm at ActiveState.com Tue Jun 7 20:54:31 2005 From: trentm at ActiveState.com (Trent Mick) Date: Tue, 7 Jun 2005 11:54:31 -0700 Subject: [Pythonmac-SIG] ANN: ActivePython 2.4.1 for Mac OS X is now available Message-ID: <20050607185431.GA7227@ActiveState.com> Today ActiveState is announcing support for Mac OS X. I'm happy to announce that ActivePython 2.4.1 for Mac OS X is now available for free download from: http://www.ActiveState.com/Products/ActivePython/ This brings the number of free ActivePython platforms to four -- with the existing Linux, Solaris and Windows free downloads. Meanwhile, some of you may be interested to know that we are busily working on bringing Komodo to Mac OS X. We expect to offer a beta in August and release later this year. To keep up-to-date with our Mac OS X progress, betas and announcements, we invite you to join our new mailing list: osx-announce at ActiveState.com You can join the OS X announce list on the ActiveState Programmer Network (ASPN): http://listserv.activestate.com/mailman/listinfo/osx-announce Current MacPython users may want to read this FAQ entry: Does ActivePython collide with other Python distributions on Mac OS X? http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/faq.html#mac_other_distros What is ActivePython? --------------------- ActivePython is ActiveState's quality-assured binary distribution of Python. Builds for Linux, Mac OS X, Solaris and Windows are made freely available. ActivePython includes the Python core and core extensions (zlib 1.2.1, bzip2 1.0.2, bsddb 4.2.52, Tk 8.4.9, and Tix 8.1.4) and is fully compatible with other Python distributions of the same version. ActivePython also includes a wealth of Python documentation, including: - the core Python docs; - Andrew Kuchling's "What's New in Python" series; - the Non-Programmer's Tutorial for Python; - Mark Pilgrim's excellent "Dive into Python"; and - a snapshot of the Python FAQs, HOWTOs and PEPs. Once installed on the Mac, you can find the ActivePython documentation here: /Library/Documentation/Help/ActivePython 2.4 Help/index.html An online version of the docs can be found here: http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/welcome.html Thanks, and enjoy! Trent, Python Tech Lead -- Trent Mick TrentM at ActiveState.com From cmoad at indiana.edu Tue Jun 7 22:01:51 2005 From: cmoad at indiana.edu (Charles Moad) Date: Tue, 07 Jun 2005 15:01:51 -0500 Subject: [Pythonmac-SIG] matplotlib on Tiger? In-Reply-To: <9279d8c11149b0ea6929f2d2968e1336@uni-mainz.de> References: <1118147223.2817295715.19438.sendItem@bloglines.com> <9279d8c11149b0ea6929f2d2968e1336@uni-mainz.de> Message-ID: <42A5FD2F.8070801@indiana.edu> I am posting a new 0.81 build with basemap-0.5 right now for Panther. The 0.80 misplaced the datafiles, which explains the .matplotlibrc error you got, Christian. I will make a Tiger build when I get home to my laptop tonight. The current tiger build should work fine though, only the panther one had issues. - Charlie Christian Meesters wrote: > Hi Frank, > > You might want to check this link: http://sda.iu.edu/projects.html It > provides you with binary installers. > > The link was posted in the matplotlib mailing list. I suggested to > announce it for the Pythonmac-SIG as well (hereby done *g*), but got no > reply so far. > > Cheers, > Christian > > > On 7 Jun 2005, at 14:27, fghorow.11707581 at bloglines.com wrote: > > >>Hi all, >> >>What's the recommended way to install matplotlib on the 2.4.1 framework >>build? >> >>I've tried installing the py2.3-macosx.3 version, but that didn't >>seem to work. >> >>Do I need to use fink (and leave the nice "official unoffical" >>environment behind)? Compile from source? Dependency issues? >> >>Any hints >>for a pythonmac (and Tiger) newbie? >> >>TIA! >> >> Frank Horowitz >>_______________________________________________ >>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 trentm at ActiveState.com Tue Jun 7 22:30:01 2005 From: trentm at ActiveState.com (Trent Mick) Date: Tue, 7 Jun 2005 13:30:01 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> Message-ID: <20050607203001.GA19565@ActiveState.com> > On Jun 7, 2005, at 8:29 AM, Larry Meyn wrote: > > There's a new kid in town and he doesn't play nice with MacPython (but > > he does ask first before kicking MacPython aside:) > > > > Any thoughts on how this affects the Python development ecosystem for > > OS X? (.. and right on the heels of the Intel announcements.) > > > > http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/ > > installnotes.html#osxpkg [Sorry, I was a little joining and announcing to this list.] Larry, Can you identify any specifics on where ActivePython doesn't play nicely? The "correct" place for ActivePython to install is the same place to which MacPython installs (so that things like builds with "-framework Python" work, etc.). The ActivePython installer *does* attempt to place nicely by moving MacPython cleanly out of the way. It leaves the MacPython command-line in a useable state. Specifically "moving MacPython aside" here means: - moving /Library/Frameworks/Python.framework/Versions/2.4 to /Library/Frameworks/Python.framework/Versions/MacPython2.4 - prefixing the /usr/local/bin stubs with "mac" so that you have: /usr/local/bin/macpython /usr/local/bin/macpythonw etc. ActivePython also includes a "pydistro.py" script whose intention is to eventually simplify managing these kinds of conflicts. Currently "pydistro.py" has a "macpython_restore" command to restore MacPython to its original state. Eventually I intend to have a separate download of pydistro.py available so that the following is easier, but for now, if you want to get your MacPython back here is what you need to run: cd SOME/TEMP/DIR cp /Lirary/Receipts/ActivePython-2.4.pkg/Contents/Resources/pydistro.py . cp /Lirary/Receipts/ActivePython-2.4.pkg/Contents/Resources/cmdln.py . sudo ./pydistro.py activepython_uninstall 2.4 sudo ./pydistro.py macpython_restore 2.4 I'd love to hear any details you might have on how ActivePython is misbehaving for you, if at all. [Bob wrote] > Since it's installed to the same place, and is the same version of > Python, I'd expect the extensions to be interchangeable at least. Yes. ActivePython should be fully binary compatible with MacPython (of the same .). If not, that is a bug. Sincerely, Trent -- Trent Mick TrentM at ActiveState.com From Larry.A.Meyn at nasa.gov Tue Jun 7 23:10:19 2005 From: Larry.A.Meyn at nasa.gov (Larry Meyn) Date: Tue, 7 Jun 2005 14:10:19 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <20050607203001.GA19565@ActiveState.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> Message-ID: Trent, Sorry for the wording, a failed attempt at humor. I just glanced at the announcement and noticed that your installer will move macpython aside, but failed to notice that it adds some symlinks to still access macpython and there is a mechanism to put it back. It's just that having two actively maintained binary framework distros for OS X is a new situation to me (my apologies to MacEnthon, but my impression was that it's still somewhat experimental and Jack has been to busy to maintain his repository lately.) Actually, another distro is probably a welcome addition as long as the extensions are compatible. I've always used and recommended the ActivePython distro for windows when circumstances require that less friendly OS. I guess my main question was how the entrance of ActiveState would play in the overall development of Python for OS X. More is good, but I hope there will be some productive cooperation with the current prime movers of Python for OS X. (Not me, I'm just a grateful user :) Again, sorry to get things started off on the wrong foot. Your participation is welcomed. Larry On Jun 7, 2005, at 1:30 PM, Trent Mick wrote: >> On Jun 7, 2005, at 8:29 AM, Larry Meyn wrote: >>> There's a new kid in town and he doesn't play nice with MacPython >>> (but >>> he does ask first before kicking MacPython aside:) >>> >>> Any thoughts on how this affects the Python development ecosystem for >>> OS X? (.. and right on the heels of the Intel announcements.) >>> >>> http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/ >>> installnotes.html#osxpkg > > [Sorry, I was a little joining and announcing to this list.] > > Larry, > Can you identify any specifics on where ActivePython doesn't play > nicely? The "correct" place for ActivePython to install is the same > place to which MacPython installs (so that things like builds with > "-framework Python" work, etc.). The ActivePython installer *does* > attempt to place nicely by moving MacPython cleanly out of the way. It > leaves the MacPython command-line in a useable state. Specifically > "moving MacPython aside" here means: > - moving /Library/Frameworks/Python.framework/Versions/2.4 > to /Library/Frameworks/Python.framework/Versions/MacPython2.4 > - prefixing the /usr/local/bin stubs with "mac" so that you have: > /usr/local/bin/macpython > /usr/local/bin/macpythonw > etc. > > ActivePython also includes a "pydistro.py" script whose intention is to > eventually simplify managing these kinds of conflicts. Currently > "pydistro.py" has a "macpython_restore" command to restore MacPython to > its original state. Eventually I intend to have a separate download of > pydistro.py available so that the following is easier, but for now, if > you want to get your MacPython back here is what you need to run: > > cd SOME/TEMP/DIR > cp > /Lirary/Receipts/ActivePython-2.4.pkg/Contents/Resources/pydistro.py . > cp > /Lirary/Receipts/ActivePython-2.4.pkg/Contents/Resources/cmdln.py . > sudo ./pydistro.py activepython_uninstall 2.4 > sudo ./pydistro.py macpython_restore 2.4 > > I'd love to hear any details you might have on how ActivePython is > misbehaving for you, if at all. > > [Bob wrote] >> Since it's installed to the same place, and is the same version of >> Python, I'd expect the extensions to be interchangeable at least. > > Yes. ActivePython should be fully binary compatible with MacPython (of > the same .). If not, that is a bug. > > > Sincerely, > Trent > > -- > Trent Mick > TrentM at ActiveState.com > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > Larry Meyn Aerospace Operations Modeling Branch M/S 210-10 NASA Ames Research Center Moffett Field, CA 94035-1000 E-mail: Larry.A.Meyn at nasa.gov Phone: (650) 604-5038 Fax: (650) 604-0222 E-Fax: (425) 944-5526 sent via e-mail From Chris.Barker at noaa.gov Tue Jun 7 23:28:02 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Tue, 07 Jun 2005 14:28:02 -0700 Subject: [Pythonmac-SIG] matplotlib on Tiger? In-Reply-To: <42A5FD2F.8070801@indiana.edu> References: <1118147223.2817295715.19438.sendItem@bloglines.com> <9279d8c11149b0ea6929f2d2968e1336@uni-mainz.de> <42A5FD2F.8070801@indiana.edu> Message-ID: <42A61162.8040905@noaa.gov> Charles Moad wrote: > I am posting a new 0.81 build with basemap-0.5 right now for Panther. But does this use python 2.4 ? That wasn't' clear to me from the download page. - Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 andrea.valle at unito.it Tue Jun 7 23:53:09 2005 From: andrea.valle at unito.it (andrea valle) Date: Tue, 7 Jun 2005 23:53:09 +0200 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <20050607203001.GA19565@ActiveState.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> Message-ID: Hi and thanks for the porting. I'm sorry if I'm asking obvious things but I'm just a sort of programmer. Let's suppose I install ActivePython. How do I install other modules? for example NumPy or PIL. Is there a particular mechanism doing the dirty job (a job in which I tipically don't succeed without package manager...)? Thanks a lot -a- On 7 Jun 2005, at 22:30, Trent Mick wrote: >> On Jun 7, 2005, at 8:29 AM, Larry Meyn wrote: >>> There's a new kid in town and he doesn't play nice with MacPython >>> (but >>> he does ask first before kicking MacPython aside:) >>> >>> Any thoughts on how this affects the Python development ecosystem for >>> OS X? (.. and right on the heels of the Intel announcements.) >>> >>> http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/ >>> installnotes.html#osxpkg > > [Sorry, I was a little joining and announcing to this list.] > > Larry, > Can you identify any specifics on where ActivePython doesn't play > nicely? The "correct" place for ActivePython to install is the same > place to which MacPython installs (so that things like builds with > "-framework Python" work, etc.). The ActivePython installer *does* > attempt to place nicely by moving MacPython cleanly out of the way. It > leaves the MacPython command-line in a useable state. Specifically > "moving MacPython aside" here means: > - moving /Library/Frameworks/Python.framework/Versions/2.4 > to /Library/Frameworks/Python.framework/Versions/MacPython2.4 > - prefixing the /usr/local/bin stubs with "mac" so that you have: > /usr/local/bin/macpython > /usr/local/bin/macpythonw > etc. > > ActivePython also includes a "pydistro.py" script whose intention is to > eventually simplify managing these kinds of conflicts. Currently > "pydistro.py" has a "macpython_restore" command to restore MacPython to > its original state. Eventually I intend to have a separate download of > pydistro.py available so that the following is easier, but for now, if > you want to get your MacPython back here is what you need to run: > > cd SOME/TEMP/DIR > cp > /Lirary/Receipts/ActivePython-2.4.pkg/Contents/Resources/pydistro.py . > cp > /Lirary/Receipts/ActivePython-2.4.pkg/Contents/Resources/cmdln.py . > sudo ./pydistro.py activepython_uninstall 2.4 > sudo ./pydistro.py macpython_restore 2.4 > > I'd love to hear any details you might have on how ActivePython is > misbehaving for you, if at all. > > [Bob wrote] >> Since it's installed to the same place, and is the same version of >> Python, I'd expect the extensions to be interchangeable at least. > > Yes. ActivePython should be fully binary compatible with MacPython (of > the same .). If not, that is a bug. > > > Sincerely, > Trent > > -- > Trent Mick > TrentM at ActiveState.com > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > Andrea Valle Laboratorio multimediale "G. Quazza" Facolt? di Scienze della Formazione Universit? degli Studi di Torino andrea.valle at unito.it From cmoad at indiana.edu Tue Jun 7 23:57:54 2005 From: cmoad at indiana.edu (Charles Moad) Date: Tue, 7 Jun 2005 16:57:54 -0500 Subject: [Pythonmac-SIG] [Matplotlib-users] Re: matplotlib on Tiger? In-Reply-To: <42A61162.8040905@noaa.gov> References: <1118147223.2817295715.19438.sendItem@bloglines.com> <9279d8c11149b0ea6929f2d2968e1336@uni-mainz.de> <42A5FD2F.8070801@indiana.edu> <42A61162.8040905@noaa.gov> Message-ID: <93C71C58-3B5F-4770-9BF2-34FED588B632@indiana.edu> All the binaries I provide depend on the system installed python (i.e. python2.3.x). These binaries are meant for people who want a one click installer for matplotlib in OSX that includes all needed dependencies. I would expect more seasoned python users to install the packages from pythonmac.org. I will add a note on the site. For the record, if anyone wants the Xcode project files for the freetype and libpng frameworks I provide, just ask. - Charlie On Jun 7, 2005, at 4:28 PM, Chris Barker wrote: > > > Charles Moad wrote: > >> I am posting a new 0.81 build with basemap-0.5 right now for >> Panther. >> > > But does this use python 2.4 ? That wasn't' clear to me from the > download page. > > - Chris > -- > Christopher Barker, Ph.D. > Oceanographer > > NOAA/OR&R/HAZMAT (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 > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can > you shotput > a projector? How fast can you ride your desk chair down the office > luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > From arthur at iaaa.nl Wed Jun 8 01:23:16 2005 From: arthur at iaaa.nl (Arthur Elsenaar) Date: Wed, 8 Jun 2005 01:23:16 +0200 Subject: [Pythonmac-SIG] PythonCard on OS X 10.4 Message-ID: Hi, trying to install PythonCard on OS X 10.4, but running into an import problem. I installed python2.4.1, wxPython2.6, TigerPython24Fix and TigerPython23Compat from Bob's packages page and added /usr/local/bin to my path. Python2.4 runs fine and I can import wx fine, but not pythoncard.. anyone know what can be wrong? Thanks, Arthur. From bob at redivi.com Wed Jun 8 01:35:31 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 16:35:31 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <20050607203001.GA19565@ActiveState.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> Message-ID: On Jun 7, 2005, at 1:30 PM, Trent Mick wrote: >> On Jun 7, 2005, at 8:29 AM, Larry Meyn wrote: >> >>> There's a new kid in town and he doesn't play nice with MacPython >>> (but >>> he does ask first before kicking MacPython aside:) >>> >>> Any thoughts on how this affects the Python development ecosystem >>> for >>> OS X? (.. and right on the heels of the Intel announcements.) >>> >>> http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/ >>> installnotes.html#osxpkg >>> > > Can you identify any specifics on where ActivePython doesn't play > nicely? The "correct" place for ActivePython to install is the same > place to which MacPython installs (so that things like builds with > "-framework Python" work, etc.). The ActivePython installer *does* > attempt to place nicely by moving MacPython cleanly out of the way. It > leaves the MacPython command-line in a useable state. Specifically > "moving MacPython aside" here means: > - moving /Library/Frameworks/Python.framework/Versions/2.4 > to /Library/Frameworks/Python.framework/Versions/MacPython2.4 > - prefixing the /usr/local/bin stubs with "mac" so that you have: > /usr/local/bin/macpython > /usr/local/bin/macpythonw > etc. It'd probably be better off just moving it to /Library/Frameworks/ Backup/Python.framework or something, for at least these reasons: If a developer is going to naively embed ActivePython in their application, they'll probably just add a copy files phase to their Xcode project and bring in the whole framework, which if they had installed MacPython it would mean they'd bring in two Pythons. /usr/local/bin/macpython will still be linking against ActivePython, because that's where the Mach-O load command points. % otool -L `which python` /usr/local/bin/python: /Library/Frameworks/Python.framework/Versions/2.4/Python (compatibility version 2.4.0, current version 2.4.0) -bob From fghorow.11707581 at bloglines.com Wed Jun 8 01:56:45 2005 From: fghorow.11707581 at bloglines.com (fghorow.11707581@bloglines.com) Date: 7 Jun 2005 23:56:45 -0000 Subject: [Pythonmac-SIG] [Matplotlib-users] Re: matplotlib on Tiger? Message-ID: <1118188605.305941645.15799.sendItem@bloglines.com> Thanks to everybody for the informative replies! I'm now trying to decide my best course of action. The way I see the current situation, there is Charlie's standalone installer from IU, but that does not integrate with the pythonmac.org installation (which currently affects me greatly, because I'm running Tiger and the pythonmac.org 2.4.1 "framework"). Then there is the pythonmac installer, which puts stuff into the Apple installation of 2.3.... I've tried a few obvious things (like soft-linking the pythonmac 2.3 matplotlib directory under its site-packages to the 2.4.1 pythonmac.org's site-packages), but nothing has worked yet. IIRC, Charlie(?) said in an earlier post that he was going to build against 2.4.1 and post the results (to the IU website?) once he got home to a machine with 2.4.1 on it. It seems to me that this should solve my problem, but I might be missing something, and hence need to compile from source. Not a big deal at all for the python stuff (hooray for setup.py! ;-) but I would then need to fight 'dependency hell' for all of the missing libraries from my installations. I was kind of hoping to find that someone else had already won that battle! ;-) Should it come down to that, I'd be happy to post any sucess stories from my ham-fisted attempts to build the .dmg anywhere that it useful to the wider community. To recap: for pythonmac.org 2.4.1 users there does not seem to exist a usable installer for matplotlib. --- Charles Moad All the binaries I provide depend on the system installed python > (i.e. python2.3.x). These binaries are meant for people who want a > one click installer for matplotlib in OSX that includes all needed > dependencies. I would expect more seasoned python users to install > the packages from pythonmac.org. I will add a note on the site. > For the record, if anyone wants the Xcode project files for the > freetype and libpng frameworks I provide, just ask. > > - Charlie > > On Jun 7, 2005, at 4:28 PM, Chris Barker wrote: > > > > > > > Charles Moad wrote: > > > >> I am posting a new 0.81 build with basemap-0.5 right now for > >> Panther. > >> > > > > But does this use python 2.4 ? That wasn't' clear to me from the > > download page. > > > > - Chris > > -- > > Christopher Barker, Ph.D. > > Oceanographer > > > > NOAA/OR&R/HAZMAT (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 > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can > > you shotput > > a projector? How fast can you ride your desk chair down the office > > luge track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From bob at redivi.com Wed Jun 8 02:05:46 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 17:05:46 -0700 Subject: [Pythonmac-SIG] bdist_mpkg Package Names In-Reply-To: References: Message-ID: On Jun 6, 2005, at 1:10 PM, Nick Matsakis wrote: > In building packages, bdist_mpkg must pick a name and bundle > identifier > for the package, e.g. building appscript results in: > > name: appscript-purelib-0.12.0-py2.3-macosx10.3 > bundleIdentifier: org.pythonmac.appscript-purelib-py2.3-macosx10.3 > > These are used by the installer to determine whether to do an > upgrade or > clean installation. As I understand it, by putting all those version > numbers in the name, it becomes difficult to force an "update" > rather than > a clean install. As I understand it, 10.3 uses the package name to > determine whether to install or update, while 10.4 uses some > combination > of the name and bundle identifier. See list post referenced at the > end for > more details. The OS version number is to specify on which version of Mac OS X the package was built. This matters, because packages will only run on versions of Mac OS X >= this version unless it contains no extensions. It also determines where it will get installed to (at least with stock 2.3 on Panther vs Tiger). I'll remove the package version number from the name when I get a chance. I'm pretty sure that the 10.3-era documentation said the CFBundleIdentifier was going to be used, but I guess that's not true. -bob From trentm at ActiveState.com Wed Jun 8 02:15:06 2005 From: trentm at ActiveState.com (Trent Mick) Date: Tue, 7 Jun 2005 17:15:06 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> Message-ID: <20050608001506.GA27030@ActiveState.com> [andrea valle wrote] > Let's suppose I install ActivePython. > How do I install other modules? for example NumPy or PIL. > Is there a particular mechanism doing the dirty job (a job in which I > tipically don't succeed without package manager...)? The standard way for 3rd-party modules to do this is to provide a downloadable package that includes a "setup.py" script that you can run to install the module: python setup.py install The GUI-part of"Package Manager" with MacPython is not included in ActivePython, but the commmand line version (pimp.py) is still there: python -m pimp -h python -m pimp -l python -m pimp -i PIL Cheers, Trent -- Trent Mick TrentM at ActiveState.com From trentm at ActiveState.com Wed Jun 8 02:23:04 2005 From: trentm at ActiveState.com (Trent Mick) Date: Tue, 7 Jun 2005 17:23:04 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> Message-ID: <20050608002304.GB27030@ActiveState.com> [Bob Ippolito wrote] > It'd probably be better off just moving it to /Library/Frameworks/ > Backup/Python.framework or something, for at least these reasons: > > If a developer is going to naively embed ActivePython in their > application, they'll probably just add a copy files phase to their > Xcode project and bring in the whole framework, which if they had > installed MacPython it would mean they'd bring in two Pythons. That is a good reason. Do you have any idea of if that is at all common? I'll look into updating pydistro.py (and hence the ActivePython installer to do this). > /usr/local/bin/macpython will still be linking against ActivePython, > because that's where the Mach-O load command points. > % otool -L `which python` > /usr/local/bin/python: > /Library/Frameworks/Python.framework/Versions/2.4/Python > (compatibility version 2.4.0, current version 2.4.0) Okay. This would require doing some binary patching of the MacPython binaries (and the ActivePython binaries in the opposite case: moving ActivePython aside). That is probably quite do-able: the ActivePython installer has to do this on some of the other Unix platforms. Thanks, Trent -- Trent Mick TrentM at ActiveState.com From trentm at ActiveState.com Wed Jun 8 02:25:18 2005 From: trentm at ActiveState.com (Trent Mick) Date: Tue, 7 Jun 2005 17:25:18 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> Message-ID: <20050608002518.GC27030@ActiveState.com> [Larry Meyn wrote] > Sorry for the wording, a failed attempt at humor. No worries. Just making sure that ActivePython wasn't doing anything stupid. My successful attempt at paranoia. :) Cheers, Trent -- Trent Mick TrentM at ActiveState.com From cmoad at indiana.edu Wed Jun 8 02:43:33 2005 From: cmoad at indiana.edu (Charles Moad) Date: Tue, 07 Jun 2005 19:43:33 -0500 Subject: [Pythonmac-SIG] [Matplotlib-users] Re: matplotlib on Tiger? In-Reply-To: <1118188605.305941645.15799.sendItem@bloglines.com> References: <1118188605.305941645.15799.sendItem@bloglines.com> Message-ID: <42A63F35.6050306@indiana.edu> I believe I said I would make a pkg for OS 10.4, not python 2.4.1. Sorry if I said the later. I am waiting a little while now, since it seems 0.81 is having tex issues and there may be a version bump here soon. I could help you through the install you mentioned. Installing each dependency would probably be just as easy as trying to use components from my installer. There is nothing stopping you from choosing a customized install from the tiger installer to install just freetype and libpng. You have to make a few small edits to setup.py to make it work with those. - Charlie fghorow.11707581 at bloglines.com wrote: > Thanks to everybody for the informative replies! > > I'm now trying to decide > my best course of action. The way I see the current situation, there is Charlie's > standalone installer from IU, but that does not integrate with the pythonmac.org > installation (which currently affects me greatly, because I'm running Tiger > and the pythonmac.org 2.4.1 "framework"). Then there is the pythonmac installer, > which puts stuff into the Apple installation of 2.3.... > > I've tried a few > obvious things (like soft-linking the pythonmac 2.3 matplotlib directory under > its site-packages to the 2.4.1 pythonmac.org's site-packages), but nothing > has worked yet. > > IIRC, Charlie(?) said in an earlier post that he was going > to build against 2.4.1 and post the results (to the IU website?) once he got > home to a machine with 2.4.1 on it. It seems to me that this should solve > my problem, but I might be missing something, and hence need to compile from > source. Not a big deal at all for the python stuff (hooray for setup.py! ;-) > but I would then need to fight 'dependency hell' for all of the missing libraries > from my installations. I was kind of hoping to find that someone else had > already won that battle! ;-) > > Should it come down to that, I'd be happy > to post any sucess stories from my ham-fisted attempts to build the .dmg anywhere > that it useful to the wider community. > > To recap: for pythonmac.org 2.4.1 > users there does not seem to exist a usable installer for matplotlib. > > > > --- Charles Moad >> All the binaries I provide > > depend on the system installed python > >>(i.e. python2.3.x). These binaries > > are meant for people who want a > >>one click installer for matplotlib in > > OSX that includes all needed > >>dependencies. I would expect more seasoned > > python users to install > >>the packages from pythonmac.org. I will add > > a note on the site. > >> For the record, if anyone wants the Xcode project > > files for the > >>freetype and libpng frameworks I provide, just ask. >> > > >>- Charlie >> >>On Jun 7, 2005, at 4:28 PM, Chris Barker wrote: >> >> >>> >>>Charles Moad wrote: >>> >>> >>>> I am posting a new 0.81 build > > with basemap-0.5 right now for > >>>>Panther. >>>> >>> >>>But does this > > use python 2.4 ? That wasn't' clear to me from the > >>>download page. >>> >>>- Chris >>>-- >>>Christopher Barker, Ph.D. >>>Oceanographer > > >>>NOAA/OR&R/HAZMAT (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 >>> >>> >>>------------------------------------------------------- > > >>>This SF.Net email is sponsored by: NEC IT Guy Games. How far can >>>you shotput >>>a projector? How fast can you ride your desk chair down > > the office > >>>luge track? >>>If you want to score the big prize, get > > to know the little guy. > >>>Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > >>>_______________________________________________ >>>Matplotlib-users > > mailing list > >>>Matplotlib-users at lists.sourceforge.net >>>https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > >>_______________________________________________ >>Pythonmac-SIG > > maillist - Pythonmac-SIG at python.org > >>http://mail.python.org/mailman/listinfo/pythonmac-sig > > From bob at redivi.com Wed Jun 8 02:58:52 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 17:58:52 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <20050608002304.GB27030@ActiveState.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> <20050608002304.GB27030@ActiveState.com> Message-ID: On Jun 7, 2005, at 5:23 PM, Trent Mick wrote: > [Bob Ippolito wrote] > >> It'd probably be better off just moving it to /Library/Frameworks/ >> Backup/Python.framework or something, for at least these reasons: >> >> If a developer is going to naively embed ActivePython in their >> application, they'll probably just add a copy files phase to their >> Xcode project and bring in the whole framework, which if they had >> installed MacPython it would mean they'd bring in two Pythons. >> > > That is a good reason. Do you have any idea of if that is at all > common? > I'll look into updating pydistro.py (and hence the ActivePython > installer to do this). I doubt it's very common, but it's possible. >> /usr/local/bin/macpython will still be linking against ActivePython, >> because that's where the Mach-O load command points. >> % otool -L `which python` >> /usr/local/bin/python: >> /Library/Frameworks/Python.framework/Versions/2.4/Python >> (compatibility version 2.4.0, current version 2.4.0) >> > > Okay. This would require doing some binary patching of the MacPython > binaries (and the ActivePython binaries in the opposite case: moving > ActivePython aside). That is probably quite do-able: the ActivePython > installer has to do this on some of the other Unix platforms. Well, sure, but there are diminishing returns. Why bother? They / should/ be fully compatible anyway. I can't think of a good reason why somebody would want both ActivePython and MacPython active and working at the same time, anyway. One tool that would be nice is something that will migrate site- packages from one to the other when you're switching. -bob From bob at redivi.com Wed Jun 8 03:17:30 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 18:17:30 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <20050608002518.GC27030@ActiveState.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> <20050608002518.GC27030@ActiveState.com> Message-ID: <55F242F3-A3F1-4DB3-9739-305C5333F663@redivi.com> On Jun 7, 2005, at 5:25 PM, Trent Mick wrote: > [Larry Meyn wrote] > >> Sorry for the wording, a failed attempt at humor. >> > > No worries. Just making sure that ActivePython wasn't doing anything > stupid. My successful attempt at paranoia. :) Well, there is the license: "You may make and give away verbatim copies of this Package for personal use, or for use within your organization, provided that you duplicate all of the original copyright notices and associated disclaimers. You may not distribute copies of this Package, or copies of packages derived from this Package, to others outside your organization without specific prior written permission from ActiveState (although you are encouraged to direct them to sources from which they may obtain it for themselves)." I read this as: You can't use py2app (cx_Freeze, py2exe, ...) without written permission. -bob From jschull at softlock.com Tue Jun 7 05:59:32 2005 From: jschull at softlock.com (Jon Schull) Date: Mon, 6 Jun 2005 23:59:32 -0400 Subject: [Pythonmac-SIG] avoid dueling pythons on tiger In-Reply-To: References: Message-ID: Please forgive the cross-post. I think this is a cross group issue. I've newly installed Tiger and would like to avoid the dueling pythons problem that plagued me with 0SX 10.3. It would be nice to be running just one python, but I suppose that would be asking too much? I installed Bob's MacPython 2.4.1 from http://undefined.org/python/ Double clicking the apps works fine. But when I type "python" from terminal I get python Apple's python 2.3.5. I'm sure this is obvious to many, but I'm also sure I'm not the only person who starts getting uneasy at this point. So before I go too deep, I thought I'd ask.... Is there a "right" way to be using just one (or just two) pythons and avoid conflicts? I want to be able to program from the command line with ipython And I want to be able to program from the 2.4.1 gui. And I want to be able to run vpython (requires X11 alas). I should add that configuring things drives me crazy but I can't live without these things, and did eventually have them all working under panther. (Unfortunately a hard drive failure forces me to build my programming environment anew.) Any wise and concise counsel will be greatly appreciated. Wise OR concise, too. ;-> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Jon Schull, Ph.D. Associate Professor Information Technology Rochester Institute of Technology 102 Lomb Memorial Drive Rochester, New York 14623 schull at digitalgoods.com 585-738-6696 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050606/92069b89/attachment.htm From bob at redivi.com Wed Jun 8 03:53:00 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 18:53:00 -0700 Subject: [Pythonmac-SIG] avoid dueling pythons on tiger In-Reply-To: References: Message-ID: <7B0D1615-F0AF-4A84-9572-93F795F6B7D5@redivi.com> On Jun 6, 2005, at 8:59 PM, Jon Schull wrote: > Please forgive the cross-post. I think this is a cross group issue. > > I've newly installed Tiger and would like to avoid the dueling > pythons problem that plagued me with 0SX 10.3. It would be nice to > be running just one python, but I suppose that would be asking too > much? > > I installed Bob's MacPython 2.4.1 from http://undefined.org/python/ > Double clicking the apps works fine. But when I type "python" from > terminal I get python Apple's python 2.3.5. I'm sure this is > obvious to many, but I'm also sure I'm not the only person who > starts getting uneasy at this point. So before I go too deep, I > thought I'd ask.... > > Is there a "right" way to be using just one (or just two) pythons > and avoid conflicts? Put /usr/local/bin before /usr/bin on your PATH. The default PATH includes ONLY Apple-installed components. This is an "issue" with any third party software that has a command-line interface, as they all (should be, anyway) install to /usr/local/bin. -bob From matsakis at mit.edu Wed Jun 8 04:27:13 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Tue, 7 Jun 2005 22:27:13 -0400 (EDT) Subject: [Pythonmac-SIG] bdist_mpkg Package Names In-Reply-To: References: Message-ID: On Tue, 7 Jun 2005, Bob Ippolito wrote: > The OS version number is to specify on which version of Mac OS X the > package was built. This matters, because packages will only run on > versions of Mac OS X >= this version unless it contains no > extensions. The BundleIdentifier isn't the place for this information. This should be done with installation requirements: http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_spec_install_req.html Otherwise, you prevent the scenario where a package built on 10.3 is upgraded by a package built on 10.4. I realize that adding installation requirements as a feature is probably asking too much, but by removing the OS version number from the name, or even just allowing the option to remove it, you put more control into the hands of the person building the package. Until such day as bdist_mkpg automatically sets version requirements, I think the right behavior would be to default to putting the OS version in the name but have a flag that allows for it not to be there. Nick From bob at redivi.com Wed Jun 8 04:38:26 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 19:38:26 -0700 Subject: [Pythonmac-SIG] bdist_mpkg Package Names In-Reply-To: References: Message-ID: <5502C196-5D0F-4E53-AA4F-0957543D48D9@redivi.com> On Jun 7, 2005, at 7:27 PM, Nick Matsakis wrote: > > On Tue, 7 Jun 2005, Bob Ippolito wrote: > > >> The OS version number is to specify on which version of Mac OS X the >> package was built. This matters, because packages will only run on >> versions of Mac OS X >= this version unless it contains no >> extensions. >> > > The BundleIdentifier isn't the place for this information. This > should be > done with installation requirements: > > http://developer.apple.com/documentation/DeveloperTools/Conceptual/ > SoftwareDistribution/Concepts/sd_spec_install_req.html > > Otherwise, you prevent the scenario where a package built on 10.3 is > upgraded by a package built on 10.4. I realize that adding > installation > requirements as a feature is probably asking too much, but by > removing the > OS version number from the name, or even just allowing the option to > remove it, you put more control into the hands of the person > building the > package. That doesn't fix the installation location issue, though. -bob From ronaldoussoren at mac.com Wed Jun 8 03:50:01 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 7 Jun 2005 18:50:01 -0700 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> References: <42A4CAAC.2000103@altern.org> <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> Message-ID: <5D66CA63-1037-4AA6-B951-F45C41E0F0AC@mac.com> On 7-jun-2005, at 10:59, Bob Ippolito wrote: > > On Jun 7, 2005, at 12:36 AM, Markus Weissmann wrote: > > > >> I think this won't be a big headache for the Python community - not >> even for >> the whole open source people; in fact - as darwin for x86 already is >> available >> for some time now - we've already tested some software on darwin/x86. >> You may find a list of RPMs I've built in end of 2004 for opendarwin >> for Intel >> here [1]. Just check for the py_* named packages and relax! :) >> >> > > That's totally not true, though. Basically, almost NONE of the Mac- > specific Python stuff works correctly on Mac OS X for Intel, and the > changes required to fix that are hard. > Maybe, maybe not. I've quite optimistic about PyObjC (except the inject part, but that's because I'm not interested in that feature). The hard part will be the creation of fat binaries. Ronald From bob at redivi.com Wed Jun 8 07:45:10 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 7 Jun 2005 22:45:10 -0700 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: <5D66CA63-1037-4AA6-B951-F45C41E0F0AC@mac.com> References: <42A4CAAC.2000103@altern.org> <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> <5D66CA63-1037-4AA6-B951-F45C41E0F0AC@mac.com> Message-ID: On Jun 7, 2005, at 6:50 PM, Ronald Oussoren wrote: > > On 7-jun-2005, at 10:59, Bob Ippolito wrote: > > > >> >> On Jun 7, 2005, at 12:36 AM, Markus Weissmann wrote: >> >> >> >> >>> I think this won't be a big headache for the Python community - not >>> even for >>> the whole open source people; in fact - as darwin for x86 already is >>> available >>> for some time now - we've already tested some software on darwin/ >>> x86. >>> You may find a list of RPMs I've built in end of 2004 for opendarwin >>> for Intel >>> here [1]. Just check for the py_* named packages and relax! :) >>> >>> >>> >> >> That's totally not true, though. Basically, almost NONE of the Mac- >> specific Python stuff works correctly on Mac OS X for Intel, and the >> changes required to fix that are hard. >> >> > > Maybe, maybe not. I've quite optimistic about PyObjC (except the > inject part, > but that's because I'm not interested in that feature). It's still a considerable amount of work to beat libffi into using the sysv ABI with the exception or two that Apple has made, and then get it to configure and compile BOTH ways at the same time. Fixing mach_inject (in the homogenous architecture case) is MUCH less work. and it should probably even be possible to make it work for both PPC and Intel even if the injector and injectee architecture differ... though that would be a fair amount of additional work. > The hard part will be the creation of fat binaries. Yeah. BTW: Nearly all bundlebuilder apps are broken on Mac OS X for Intel, and all py2app apps work (via Rosetta, anyway). -bob From keithn at 2xtreme.net Wed Jun 8 09:14:26 2005 From: keithn at 2xtreme.net (Keith Nemitz) Date: Wed, 8 Jun 2005 00:14:26 -0700 Subject: [Pythonmac-SIG] Py2App on Mactel with pygame? In-Reply-To: References: Message-ID: On Jun 7, 2005, at 10:45 PM, pythonmac-sig-request at python.org wrote: > > BTW: Nearly all bundlebuilder apps are broken on Mac OS X for Intel, > and all py2app apps work (via Rosetta, anyway). > > -bob > Bob, Will the altivec enhancements made to pygame 1.7 work in a py2app app? Keith Nemitz From bob at redivi.com Wed Jun 8 09:31:17 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 8 Jun 2005 00:31:17 -0700 Subject: [Pythonmac-SIG] Py2App on Mactel with pygame? In-Reply-To: References: Message-ID: <00940956-98B6-4C10-AA5B-A6A8E96CC66E@redivi.com> On Jun 8, 2005, at 12:14 AM, Keith Nemitz wrote: > > On Jun 7, 2005, at 10:45 PM, pythonmac-sig-request at python.org wrote: > > >> >> BTW: Nearly all bundlebuilder apps are broken on Mac OS X for Intel, >> and all py2app apps work (via Rosetta, anyway). > > Will the altivec enhancements made to pygame 1.7 work in a py2app app? I don't quite understand the point of this question? Why would py2app have anything to do with AltiVec? If you're asking "do applications built using the AltiVec-enabled SDL work on Mac OS X for Intel" then the answer is yes, but Rosetta doesn't support AltiVec so the code path will be the same as that of the G3. I haven't tested any pygame apps specifically, but Frozen Bubble (SDL, Perl) worked fine (under Rosetta) and several PyObjC applications I've tested also work fine. -bob From trentm at ActiveState.com Wed Jun 8 09:30:49 2005 From: trentm at ActiveState.com (Trent Mick) Date: Wed, 8 Jun 2005 00:30:49 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> <20050608002304.GB27030@ActiveState.com> Message-ID: <20050608073049.GD6494@ActiveState.com> [Bob Ippolito wrote] > One tool that would be nice is something that will migrate site- > packages from one to the other when you're switching. What do you think if Apple's (somewhat schizo, mind you) usage of /Library/Python/X.Y/[site-packages/] ? This would solve that issue. Trent -- Trent Mick TrentM at ActiveState.com From solipsis at pitrou.net Wed Jun 8 13:39:38 2005 From: solipsis at pitrou.net (Antoine Pitrou) Date: Wed, 08 Jun 2005 13:39:38 +0200 Subject: [Pythonmac-SIG] retrieving config values from the System Preferences In-Reply-To: <20050607150641.GA77208@uiuc.edu> References: <1118148852.25256.9.camel@p-dhcp-333-72.rd.francetelecom.fr> <20050607150641.GA77208@uiuc.edu> Message-ID: <1118230778.7083.0.camel@p-dhcp-333-72.rd.francetelecom.fr> Hi, Thanks Nicholas and Doug for your answers. I will try both methods and choose the most appropriate ;) Regards Antoine. Le mardi 07 juin 2005 ? 10:06 -0500, Nicholas Riley a ?crit : > On Tue, Jun 07, 2005 at 02:54:12PM +0200, Antoine Pitrou wrote: > > I'm porting an app to Mac OS X and I need to retrieve the configuration > > values entered in the System Preferences (specifically the HTTP proxy > > settings). I already know how to do that under Gnome and Windows, but I > > haven't found how to retrieve those values under Mac OS X (Panther, by > > the way). Is there a reliable way to do that ? > > Generic information is here: > > > From bob at redivi.com Wed Jun 8 16:02:39 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 8 Jun 2005 07:02:39 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <20050608073049.GD6494@ActiveState.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> <20050608002304.GB27030@ActiveState.com> <20050608073049.GD6494@ActiveState.com> Message-ID: <0069F376-6D48-4256-A8C6-930C05E3B883@redivi.com> On Jun 8, 2005, at 12:30 AM, Trent Mick wrote: > [Bob Ippolito wrote] > >> One tool that would be nice is something that will migrate site- >> packages from one to the other when you're switching. >> > > What do you think if Apple's (somewhat schizo, mind you) usage of > /Library/Python/X.Y/[site-packages/] > ? This would solve that issue. and probably cause others.. I'd rather leave that location to Apple. If it turns out that it's really a good idea to put something there, then we can change it for 2.5. -bob From trentm at ActiveState.com Wed Jun 8 16:26:40 2005 From: trentm at ActiveState.com (Trent Mick) Date: Wed, 8 Jun 2005 07:26:40 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <0069F376-6D48-4256-A8C6-930C05E3B883@redivi.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> <20050608002304.GB27030@ActiveState.com> <20050608073049.GD6494@ActiveState.com> <0069F376-6D48-4256-A8C6-930C05E3B883@redivi.com> Message-ID: <20050608142640.GA23951@ActiveState.com> > >>One tool that would be nice is something that will migrate site- > >>packages from one to the other when you're switching. > >> > > > >What do you think if Apple's (somewhat schizo, mind you) usage of > > /Library/Python/X.Y/[site-packages/] > >? This would solve that issue. > > and probably cause others.. I'd rather leave that location to Apple. > If it turns out that it's really a good idea to put something there, > then we can change it for 2.5. Cool. After I sent that I realized it could cause confusion for the "naive user copying the whole framework" that you mentioned. Trent -- Trent Mick TrentM at ActiveState.com From ronaldoussoren at mac.com Wed Jun 8 15:50:30 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 8 Jun 2005 06:50:30 -0700 Subject: [Pythonmac-SIG] avoid dueling pythons on tiger In-Reply-To: References: Message-ID: <06CE5CDB-CF14-4FD8-A711-5DBBB50FC891@mac.com> On 6-jun-2005, at 20:59, Jon Schull wrote: > Please forgive the cross-post. I think this is a cross group issue. > > I've newly installed Tiger and would like to avoid the dueling > pythons problem that plagued me with 0SX 10.3. It would be nice to > be running just one python, but I suppose that would be asking too > much? > > I installed Bob's MacPython 2.4.1 from http://undefined.org/python/ > Double clicking the apps works fine. But when I type "python" from > terminal I get python Apple's python 2.3.5. I'm sure this is > obvious to many, but I'm also sure I'm not the only person who > starts getting uneasy at this point. So before I go too deep, I > thought I'd ask.... You should add /usr/local/bin to the start of the search path of you're shell. If you're using bash (the default on Panther and Tiger) you can add these lines to .profile or .bash_profile in your home directory: export PATH PATH="/usr/local/bin:${PATH}" export MANPATH MANPATH="/usr/local/man:${MANPATH}" This way the python in /usr/local/bin is seen before the system one. Ronald From ronaldoussoren at mac.com Wed Jun 8 16:58:53 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 8 Jun 2005 07:58:53 -0700 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: References: <42A4CAAC.2000103@altern.org> <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> <5D66CA63-1037-4AA6-B951-F45C41E0F0AC@mac.com> Message-ID: On 7-jun-2005, at 22:45, Bob Ippolito wrote: > > On Jun 7, 2005, at 6:50 PM, Ronald Oussoren wrote: > > >> >> On 7-jun-2005, at 10:59, Bob Ippolito wrote: >> >> >> >> >>> >>> On Jun 7, 2005, at 12:36 AM, Markus Weissmann wrote: >>> >>> >>> >>> >>> >>>> I think this won't be a big headache for the Python community - not >>>> even for >>>> the whole open source people; in fact - as darwin for x86 >>>> already is >>>> available >>>> for some time now - we've already tested some software on darwin/ >>>> x86. >>>> You may find a list of RPMs I've built in end of 2004 for >>>> opendarwin >>>> for Intel >>>> here [1]. Just check for the py_* named packages and relax! :) >>>> >>>> >>>> >>>> >>> >>> That's totally not true, though. Basically, almost NONE of the Mac- >>> specific Python stuff works correctly on Mac OS X for Intel, and the >>> changes required to fix that are hard. >>> >>> >>> >> >> Maybe, maybe not. I've quite optimistic about PyObjC (except the >> inject part, >> but that's because I'm not interested in that feature). >> > > It's still a considerable amount of work to beat libffi into using > the sysv ABI with the exception or two that Apple has made, and > then get it to configure and compile BOTH ways at the same time. Getting libffi to work on Intel was easy enough, the hard part was understanding the libffi code. Getting it to build a fat library will be harder. I'm thinking of ripping the entire autoconf layer out, and might in the long term even convert libffi to something that's more pyobjc specific. We're currently converting python arguments to libffi argument arrays and those are then converted to stack frames. The smells like an inefficient code path. > > Fixing mach_inject (in the homogenous architecture case) is MUCH > less work. and it should probably even be possible to make it work > for both PPC and Intel even if the injector and injectee > architecture differ... though that would be a fair amount of > additional work. I looked at the mach_inject code in the hotel. It contained a lot less architecture-specific code than I had expected. I might even attempt a port to Intel this week. Cross-platform injection makes my head hurt :-) > > >> The hard part will be the creation of fat binaries. >> > > Yeah. It shouldn't be too hard, libffi will probably be the hardest part. It should be possible to split the configure script into two parts: one that tests cpu features (sizeof(int), byte order, ...) and one that tests API features (do we have sockets, ...). The cpu-features part can be converted to something that uses feature macros instead of detection, e.g. #if defined __i386__ #define LITTLE_ENDIAN ... #elif defined __ppc__ #define BIG_ENDIAN ... #elif ... ... API features should be the same across architectures. > > BTW: Nearly all bundlebuilder apps are broken on Mac OS X for > Intel, and all py2app apps work (via Rosetta, anyway). Only the standalone ones work, --semi-standalone apps that use / System/Library/Frameworks/Python.framework will most likely not work (pyobjc for ppc in a python with an intel image). Ronald From Chris.Barker at noaa.gov Wed Jun 8 20:47:45 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Wed, 08 Jun 2005 11:47:45 -0700 Subject: [Pythonmac-SIG] matplotlib on Tiger---and Panther, with Py2.3 and Py2.4... In-Reply-To: <87hdg9fuzu.fsf@peds-pc311.bsd.uchicago.edu> References: <1118188605.305941645.15799.sendItem@bloglines.com> <42A63F35.6050306@indiana.edu> <87hdg9fuzu.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <42A73D51.3080005@noaa.gov> John Hunter wrote: > If either of you have a diff against setup*.py that will make mpl src > builds on these systems work better, I'll fold them into the main > line. I had intended to do this, but before I do, I think theres a need for a little discussion. Charles and I have taken two different approaches to dealing with the dependencies not included in stock OS-X: libpng libfreetype (as noted by Charles, libfreetype does seem to exist, in some form with Apple's X11 implementation, but neither of us could get it to work) The way I handled these libs was to build them as static libs, install them inside the matplotlib build tree, then alter the setup.py so that it would use the statically linked versions. This resulted in a simple stand-alone binary, that is easy to install. However, you do need to put those static libs in the right place before you can build, so I wasn't sure we'd want to hard-code that into the stock setup.py. You do need to resolve the dependencies in some way in any case, so maybe it's not a bad idea. My understanding is that Charles took an alternative approach: providing libpng and libfreetype as OS-X Frameworks, and building matplotlib against those. This is really the way it "should" be done on OS-X. However, it seems a little harder to set up to me (unless the libs in question work with a --framework flag to make. I spend a lot more time on Linux, so all this is a bit of a mystery to me.) It also strikes me as a little harder to make a package out of, as you've got multiple things to install and bdist_mpkg won't just do it for you. What are other's thoughts about the best way to do this? It would be nice to have a standard approach built into the matplotlib setup.py. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 bob at redivi.com Wed Jun 8 21:22:04 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 8 Jun 2005 12:22:04 -0700 Subject: [Pythonmac-SIG] Python on Mac OS X (WWDC2005 Session 613) Message-ID: <3F449AF1-B86F-4A57-80F8-E24F14092ADE@redivi.com> The web presence for the Python on Mac OS X session at WWDC2005 is now up: http://pythonmac.org/wwdc2005/ The CodeImporter example and slides will be available as soon as I've made sure that it's OK to post them. -bob From rsfinn at gmail.com Wed Jun 8 21:28:33 2005 From: rsfinn at gmail.com (Russell Finn) Date: Wed, 8 Jun 2005 15:28:33 -0400 Subject: [Pythonmac-SIG] macpython on future apple's intel processors? In-Reply-To: References: <42A4CAAC.2000103@altern.org> <7A0E58B2-084C-4336-A4FF-46B9A7161694@redivi.com> <5D66CA63-1037-4AA6-B951-F45C41E0F0AC@mac.com> Message-ID: On 6/8/05, Ronald Oussoren wrote: > It should be possible to split the configure script into two parts: > one that tests cpu features (sizeof(int), byte order, ...) and one > that tests API features (do we have sockets, ...). The cpu-features > part can be converted to something that uses feature macros instead > of detection, e.g. > > #if defined __i386__ > #define LITTLE_ENDIAN > ... > #elif defined __ppc__ > #define BIG_ENDIAN > ... > #elif ... > ... It looks like Apple has anticipated you here : "If you are compiling a project that uses autoconf and trying to build it for both the PowerPC and x86 architectures, you need to make sure that when the project configures itself, it doesn't use autoconf macros to determine the endian type of the runtime system. For example, if your project uses the autoconf AC_C_BIGENDIAN macro, the program won't work correctly when it is run on the opposite architecture from the one you are targeting when you configure the project. To correctly build for both PowerPC and x86 architectures, use the compiler-defined __BIG_ENDIAN__ and __LITTLE_ENDIAN__ macros in your code." Apparently these symbols are already defined for you by gcc. (I'm still trying to find exactly where it says so in the Apple documentation.) -- Russell Finn From jschull at softlock.com Wed Jun 8 04:16:35 2005 From: jschull at softlock.com (Jon Schull) Date: Tue, 7 Jun 2005 22:16:35 -0400 Subject: [Pythonmac-SIG] [Visualpython-users] Re: avoid dueling pythons on tiger In-Reply-To: <7B0D1615-F0AF-4A84-9572-93F795F6B7D5@redivi.com> References: <7B0D1615-F0AF-4A84-9572-93F795F6B7D5@redivi.com> Message-ID: Thanks I have done that (by adding " set path = (/usr/local/bin $path)" to .tcshrc) and all is well. Now, as momentary liaison between the pythonmac and vpython lists I'll mention that VPython (a truly beautiful thing) could be made independent of X11 if someone from this group knew how to liberate it... > On Jun 7, 2005, at 10:16 AM, Bruce Sherwood [who maintains VPython] > wrote: > > Maybe a Mac expert will step forward and make a version of Visual > that can be driven by the native Mac Python? After all, OpenGL > doesn't need X11, it's just that lacking Mac-specific expertise the > only way we could get VPython running on Mac OSX was to piggyback > off the Linux/Unix version. What is needed is really just one file, > equivalent to wgl.cpp which handles Windows aspects (creating the > graphics window, handling keyset and moust inputs, etc.). Is there > anyone in the VPython commmunity who could write macgl.cpp? > > On Tue, 2005-06-07 at 11:54 -0400, Jon Schull wrote: > >> That would be a very big step forward in lots of ways.... >> Is it clear that this requires understanding of VPython internals? >> > > Only somewhat. The platform-specific parts of VPython are fairly > limited; the hardest part is probably learning the OSX GUI APIs. > > You would need to write implementations of glContext and glFont > (declared in glcontext.h). You will probably also need to write a > platmac.{cpp,h} files that contains all of the functionality > present in > plat{linux,win}.{cpp,h}. You should be able to get a considerable > amount of reuse from the platlinux.{h,cpp} files. If there is any > ambiguity about the responsibilities of these classes, I'll be > happy to > help out anyone who would be doing this work. > > I would recommend using the Carbon or Core Platform C interfaces > rather > than Cocoa via Objective-C++. > > -Jonathan =-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Jon Schull, Ph.D. Associate Professor Information Technology Rochester Institute of Technology 102 Lomb Memorial Drive Rochester, New York 14623 schull at digitalgoods.com 585-738-6696 On Jun 7, 2005, at 9:53 PM, Bob Ippolito wrote: > > On Jun 6, 2005, at 8:59 PM, Jon Schull wrote: > > >> Please forgive the cross-post. I think this is a cross group issue. >> >> I've newly installed Tiger and would like to avoid the dueling >> pythons problem that plagued me with 0SX 10.3. It would be nice >> to be running just one python, but I suppose that would be asking >> too much? >> >> I installed Bob's MacPython 2.4.1 from http://undefined.org/python/ >> Double clicking the apps works fine. But when I type "python" >> from terminal I get python Apple's python 2.3.5. I'm sure this >> is obvious to many, but I'm also sure I'm not the only person who >> starts getting uneasy at this point. So before I go too deep, I >> thought I'd ask.... >> >> Is there a "right" way to be using just one (or just two) pythons >> and avoid conflicts? >> > > Put /usr/local/bin before /usr/bin on your PATH. The default PATH > includes ONLY Apple-installed components. This is an "issue" with > any third party software that has a command-line interface, as they > all (should be, anyway) install to /usr/local/bin. > > -bob > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can > you shotput > a projector? How fast can you ride your desk chair down the office > luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Visualpython-users mailing list > Visualpython-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050607/3f5d5504/attachment-0001.htm From delza at livingcode.org Wed Jun 8 22:41:13 2005 From: delza at livingcode.org (Dethe Elza) Date: Wed, 8 Jun 2005 13:41:13 -0700 Subject: [Pythonmac-SIG] [Visualpython-users] Re: avoid dueling pythons on tiger In-Reply-To: References: <7B0D1615-F0AF-4A84-9572-93F795F6B7D5@redivi.com> Message-ID: On 7-Jun-05, at 7:16 PM, Jon Schull wrote: > Thanks I have done that (by adding " set path = (/usr/local/bin > $path)" to .tcshrc) and all is well. > > Now, as momentary liaison between the pythonmac and vpython lists > I'll mention that VPython (a truly beautiful thing) could be made > independent of X11 if someone from this group knew how to liberate > it... > I took a stab at it once, before VPython was refactored into C++, but I was still pretty new to OS X programming at the time, and it defeated me. I haven't yet taken a look at the C++ version, it's on my todo list, but not a high priority right now. I'd love to see VPython on OS X properly, but my hobby coding time is pretty limited right now. --Dethe "Well I've wrestled with reality for thirty-five years now, doctor, and I'm happy to state I've finally won out over it." -- Elwood P. Dowd, Harvey From Chris.Barker at noaa.gov Thu Jun 9 00:24:28 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Wed, 08 Jun 2005 15:24:28 -0700 Subject: [Pythonmac-SIG] [Matplotlib-users] Re: matplotlib on Tiger? In-Reply-To: <42A63F35.6050306@indiana.edu> References: <1118188605.305941645.15799.sendItem@bloglines.com> <42A63F35.6050306@indiana.edu> Message-ID: <42A7701C.2020905@noaa.gov> Charles Moad wrote: > Installing each > dependency would probably be just as easy as trying to use components > from my installer. I put instructions for how to do this in my package for OS-X-10.3, py2.3.0. Here they are. If you do all this, you can donate the package to Bob's repository on pythonmac.org. There is a related thread about defining a standard way to do this for matplotlib, so it will build out of the box. They should work just fine for newer versions of OS, matplotlib, and python. Sorry they are a bit wordy: Installing matplotlib on OS-X (10.3.7) Here are my notes as to what it took to get matplotlib (0.71) installed and working on OS-X. I have so far kept a fink-free system, so that's what I've done here as well. I use it with the AGG back end for generating images for a web site, and hopefully with the wx backend for interactive use and embedding in wx Applications. I've also quickly got it working with TK. Note that this is kind of a running commentary, not well edited. I'd read the whole thing before starting. 1) Requirements: ------------------------------------------- According to the matplotlib install docs (http://matplotlib.sourceforge.net/installing.html), you need the following: freetype (>= 2.1.7) libpng zlib Personally, I've been avoiding Fink, as it doesn't seem to play well with the rest of OS-X, including the Apple supplied Python, so I've looked elsewhere for these libs. a) Freetype: I seem to have it in: /usr/X11R6/include/freetype2 I don't think I installed it myself, so it probably came with Apple's X11, Which I did install. However, I seemed to be having problems with that version, so I looked, and it seems to be: libfreetype.6.3.dylib Given that freetype2 is currently at version 2.1.9, I have no idea what to make of that! So off to sourceforge to get a new freetype: http://freetype.sourceforge.net/index2.html where I got: freetype-2.1.9.tar.gz Following the instructions in docs/INSTALL.UNX: $ ./configure $ make $ sudo make install That puts it in /usr/local/..., which is a good place for it. NOTE: The above will build freetype as a shared library, which is fine if you are building ot run on the same system you are building on. However, if you want to buuild a re-distributable package, you'll need a static library, which you can get by doing: $ ./configure --disable-shared --enable static $ make $ sudo make install Hmm. that made the static libs (*.a) , but also the dynamic ones. Make sure to do: $ make clean if you had already built it. You may also have to remove the shared libs, so that they won't be found (*.dyld). I had to remove them from /usr/local/lib. b) zlib: I have: /usr/include/zlib.h I don't know where I might have gotten it, but there it is. NOTE: I checked on another system in my office, and it doesn't have zlib. It does, however have libz, which I am told is the same thing, to you shouldn't need this. c) libpng: This, I didn't have on my system, except inside the wxWidgets source tree, so I went looking for it. Note that you need zlib to compile libpng, so make sure you have that first. I did a google search for "libpng OS-X". I found: http://www.libpng.org/pub/png/pngcode.html Which led me to the libpng sourceforge site. From there I downloaded: libpng-1.2.8.tar.gz unpacked it, and opened a terminal in the libpng-1.2.8 directory, and did: $ cp scripts/makefile.darwin ./makefile (note that according to the INSTALL, there is supposed to be a makefile.macosx, but it wasn't there) I took a look in the makefile, and found: ZLIBLIB=/usr/local/lib ZLIBINC=/usr/local/include Which is not where zlib is on my system. However, while I can find zlib.h, I couldn't fine the actual lib, so I tried make without changing anything. $ make Which seemed to work fine. zlib must be installed in a standard location, and gcc found it. $ sudo make install to install the lib into /usr/local/ (this was specified in the makefile, and it's a good place for it) $ make test and $ ./pngtest pngnow.png Which both seemed to pass. If you want to build a re-distributable version of matplotlib, you need the static version of libpng, instead of the dynamic one. It doesn't use ./configure, so instead, I did a: sudo make install-static and that installed the *.a files in /usr/local/lib. d) Numeric or numarray: I already have Numeric installed, from Bob Ippolito's PIMP (MacPython Package Manager) repostitory. (www.undefined.org/python) 2) Building matplotlib --------------------------------------------------------- First, I took a look at the matplotlib setup.py. It had "auto" for the back-end flags, so I thought I would give it a try that way: $python setup.py build If you have only the static version of libpng and libfreetype (*.a, and not *.dylib) in /usr/local/lib (or anywhere else on your lib search path), then it should link those statically. That worked! $ sudo python setup.py install 4) And now to test! $python >>> import pylab Could not open font file /Library/Fonts/NISC18030.ttf No module named pygtk PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends This turns out to be because the matlabrc file sets the GTKAgg back end as the default. You have two choices. 1) you can set the back end before importing pylab. >>> import matplotlib >>> matplotlib.use('Agg') >>> import pylab This works fine 2) Edit the matplotlibrc file. I found it in: /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/.matplotlibrc Change the line: backend : GTKAgg # the default backend to backend : Agg # the default backend And you're all set to make images for the web, etc. I'm going to leave getting it to work with wxPython for another day. 3) Building a matplotlib Binary Package for OS-X: First you need to make sure you've got libpng and libfreetype staticaly linked. I did this by copying the headers and *.a files for them into a directory I created called "StaticLibs", in the main matplot lib directory (the one setup,py is in). You could just as easily put in links, rather than copies, probably a better idea, actually. Then I edited setupext.py, so that distutils would only look there: basedir = { 'win32' : ['win32_static',], 'linux2' : ['/usr/local', '/usr',], 'linux' : ['/usr/local', '/usr',], # 'darwin' : ['/usr/local', '/usr', '/sw', '/usr/X11R6'], 'darwin' : ['StaticLibs'], 'freebsd4' : ['/usr/local', '/usr'], 'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',], } I'm talking to John Hunter about having a conditional Static setup in the official setup.py to support this. This seemed to so the job. To test, you can run: $ otool -L *.so in the matplotlib directory that is buried in the build directory. it will tell you what libs the matplotlib extensions are linked to. They should not be linked to libfreetype or libpng. libz is OK, it's included with the stock OS-X. Once you've got that built right, you can make an installer package with Py2App. This is a note from Bob Ippolito on the macPython mailing list: """use bdist_mpkg from py2app to make a redistributable .pkg installer for it. After installing py2app, you should have a tool in /usr/local/bin called "bdist_mpkg" that will Just Do It without any setup.py modifications to the target lib... so go into the matplotlib directory, type bdist_mpkg, and cross your fingers that a dist/matplotlib-xx.pkg """ Here's exactly what I tried: In the matplotlib directory (the same place as setup.py) $ bdist_mpkg and it worked! Note: there are occasionally troubles with installing a newer matplotlib over an older one. You may want to remove an older version before installing, if you have one. To do this, delete: /Library/Python/2.3/matplotlib/ Then click the mpkg. to install. Building with tcl/TK: I downloaded the BI (Batteries Included) installer for tcl/Tk Aqua. It's got a lot of stuff I don't need, but it's only disk space. I then used the MacPython PackageManager and the standard package list, and installed Tkinter from there. It seemed to work. Now back to the build cycle...Yeah it works! -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 Chris.Barker at noaa.gov Thu Jun 9 00:39:00 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Wed, 08 Jun 2005 15:39:00 -0700 Subject: [Pythonmac-SIG] [Matplotlib-users] Re: matplotlib on Tiger? In-Reply-To: <42A63F35.6050306@indiana.edu> References: <1118188605.305941645.15799.sendItem@bloglines.com> <42A63F35.6050306@indiana.edu> Message-ID: <42A77384.8040007@noaa.gov> Charles Moad wrote: > Installing each > dependency would probably be just as easy as trying to use components > from my installer. I put instructions for how to do this in my package for OS-X-10.3, py2.3.0. Here they are. If you do all this, you can donate the package to Bob's repository on pythonmac.org. There is a related thread about defining a standard way to do this for matplotlib, so it will build out of the box. They should work just fine for newer versions of OS, matplotlib, and python. Sorry they are a bit wordy: Installing matplotlib on OS-X (10.3.7) Here are my notes as to what it took to get matplotlib (0.71) installed and working on OS-X. I have so far kept a fink-free system, so that's what I've done here as well. I use it with the AGG back end for generating images for a web site, and hopefully with the wx backend for interactive use and embedding in wx Applications. I've also quickly got it working with TK. Note that this is kind of a running commentary, not well edited. I'd read the whole thing before starting. 1) Requirements: ------------------------------------------- According to the matplotlib install docs (http://matplotlib.sourceforge.net/installing.html), you need the following: freetype (>= 2.1.7) libpng zlib Personally, I've been avoiding Fink, as it doesn't seem to play well with the rest of OS-X, including the Apple supplied Python, so I've looked elsewhere for these libs. a) Freetype: I seem to have it in: /usr/X11R6/include/freetype2 I don't think I installed it myself, so it probably came with Apple's X11, Which I did install. However, I seemed to be having problems with that version, so I looked, and it seems to be: libfreetype.6.3.dylib Given that freetype2 is currently at version 2.1.9, I have no idea what to make of that! So off to sourceforge to get a new freetype: http://freetype.sourceforge.net/index2.html where I got: freetype-2.1.9.tar.gz Following the instructions in docs/INSTALL.UNX: $ ./configure $ make $ sudo make install That puts it in /usr/local/..., which is a good place for it. NOTE: The above will build freetype as a shared library, which is fine if you are building ot run on the same system you are building on. However, if you want to buuild a re-distributable package, you'll need a static library, which you can get by doing: $ ./configure --disable-shared --enable static $ make $ sudo make install Hmm. that made the static libs (*.a) , but also the dynamic ones. Make sure to do: $ make clean if you had already built it. You may also have to remove the shared libs, so that they won't be found (*.dyld). I had to remove them from /usr/local/lib. b) zlib: I have: /usr/include/zlib.h I don't know where I might have gotten it, but there it is. NOTE: I checked on another system in my office, and it doesn't have zlib. It does, however have libz, which I am told is the same thing, to you shouldn't need this. c) libpng: This, I didn't have on my system, except inside the wxWidgets source tree, so I went looking for it. Note that you need zlib to compile libpng, so make sure you have that first. I did a google search for "libpng OS-X". I found: http://www.libpng.org/pub/png/pngcode.html Which led me to the libpng sourceforge site. From there I downloaded: libpng-1.2.8.tar.gz unpacked it, and opened a terminal in the libpng-1.2.8 directory, and did: $ cp scripts/makefile.darwin ./makefile (note that according to the INSTALL, there is supposed to be a makefile.macosx, but it wasn't there) I took a look in the makefile, and found: ZLIBLIB=/usr/local/lib ZLIBINC=/usr/local/include Which is not where zlib is on my system. However, while I can find zlib.h, I couldn't fine the actual lib, so I tried make without changing anything. $ make Which seemed to work fine. zlib must be installed in a standard location, and gcc found it. $ sudo make install to install the lib into /usr/local/ (this was specified in the makefile, and it's a good place for it) $ make test and $ ./pngtest pngnow.png Which both seemed to pass. If you want to build a re-distributable version of matplotlib, you need the static version of libpng, instead of the dynamic one. It doesn't use ./configure, so instead, I did a: sudo make install-static and that installed the *.a files in /usr/local/lib. d) Numeric or numarray: I already have Numeric installed, from Bob Ippolito's PIMP (MacPython Package Manager) repostitory. (www.undefined.org/python) 2) Building matplotlib --------------------------------------------------------- First, I took a look at the matplotlib setup.py. It had "auto" for the back-end flags, so I thought I would give it a try that way: $python setup.py build If you have only the static version of libpng and libfreetype (*.a, and not *.dylib) in /usr/local/lib (or anywhere else on your lib search path), then it should link those statically. That worked! $ sudo python setup.py install 4) And now to test! $python >>> import pylab Could not open font file /Library/Fonts/NISC18030.ttf No module named pygtk PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends This turns out to be because the matlabrc file sets the GTKAgg back end as the default. You have two choices. 1) you can set the back end before importing pylab. >>> import matplotlib >>> matplotlib.use('Agg') >>> import pylab This works fine 2) Edit the matplotlibrc file. I found it in: /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/.matplotlibrc Change the line: backend : GTKAgg # the default backend to backend : Agg # the default backend And you're all set to make images for the web, etc. I'm going to leave getting it to work with wxPython for another day. 3) Building a matplotlib Binary Package for OS-X: First you need to make sure you've got libpng and libfreetype staticaly linked. I did this by copying the headers and *.a files for them into a directory I created called "StaticLibs", in the main matplot lib directory (the one setup,py is in). You could just as easily put in links, rather than copies, probably a better idea, actually. Then I edited setupext.py, so that distutils would only look there: basedir = { 'win32' : ['win32_static',], 'linux2' : ['/usr/local', '/usr',], 'linux' : ['/usr/local', '/usr',], # 'darwin' : ['/usr/local', '/usr', '/sw', '/usr/X11R6'], 'darwin' : ['StaticLibs'], 'freebsd4' : ['/usr/local', '/usr'], 'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',], } I'm talking to John Hunter about having a conditional Static setup in the official setup.py to support this. This seemed to so the job. To test, you can run: $ otool -L *.so in the matplotlib directory that is buried in the build directory. it will tell you what libs the matplotlib extensions are linked to. They should not be linked to libfreetype or libpng. libz is OK, it's included with the stock OS-X. Once you've got that built right, you can make an installer package with Py2App. This is a note from Bob Ippolito on the macPython mailing list: """use bdist_mpkg from py2app to make a redistributable .pkg installer for it. After installing py2app, you should have a tool in /usr/local/bin called "bdist_mpkg" that will Just Do It without any setup.py modifications to the target lib... so go into the matplotlib directory, type bdist_mpkg, and cross your fingers that a dist/matplotlib-xx.pkg """ Here's exactly what I tried: In the matplotlib directory (the same place as setup.py) $ bdist_mpkg and it worked! Note: there are occasionally troubles with installing a newer matplotlib over an older one. You may want to remove an older version before installing, if you have one. To do this, delete: /Library/Python/2.3/matplotlib/ Then click the mpkg. to install. Building with tcl/TK: I downloaded the BI (Batteries Included) installer for tcl/Tk Aqua. It's got a lot of stuff I don't need, but it's only disk space. I then used the MacPython PackageManager and the standard package list, and installed Tkinter from there. It seemed to work. Now back to the build cycle...Yeah it works! -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 matsakis at mit.edu Thu Jun 9 04:56:13 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Wed, 8 Jun 2005 22:56:13 -0400 (EDT) Subject: [Pythonmac-SIG] ActiveState's OS X Python Message-ID: >> What do you think if Apple's (somewhat schizo, mind you) usage of >> /Library/Python/X.Y/[site-packages/] ? This would solve that issue. > and probably cause others.. I'd rather leave that location to Apple. > If it turns out that it's really a good idea to put something there, > then we can change it for 2.5. That locations _isn't_ for Apple---it's for third-party additions. If it is possible to build extensions that will work with Apple's Python, ActivePython, and MacPython (with the same major version), then /Library would be a great place to put such extensions. (same with ~/Library). It certainly seems possible for MacPython 2.3 and Apple Python. Nick From drcairns at gmail.com Thu Jun 9 05:52:19 2005 From: drcairns at gmail.com (David Cairns) Date: Wed, 8 Jun 2005 20:52:19 -0700 Subject: [Pythonmac-SIG] hello and a first question for everyone... Message-ID: hi all... at WWDC and i decided to join the SIG. also, i was wondering if anyone has gotten PyOpenGL and/or OpenGLContext to work in tiger (albeit under X11). if not, then what is the best way to go about establishing a context to associate with python ? thanks in advance! -- david From ronaldoussoren at mac.com Thu Jun 9 17:29:51 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 9 Jun 2005 08:29:51 -0700 Subject: [Pythonmac-SIG] hello and a first question for everyone... In-Reply-To: References: Message-ID: <116CBEC4-5DA0-4E40-8B9D-F72264FCBB94@mac.com> On 8-jun-2005, at 20:52, David Cairns wrote: > hi all... at WWDC and i decided to join the SIG. > > also, i was wondering if anyone has gotten PyOpenGL and/or > OpenGLContext to work in tiger (albeit under X11). if not, then what > is the best way to go about establishing a context to associate with > python ? Use PyOpenGL and PyObjC? Ronald From B.P.S.Thurin at city.ac.uk Thu Jun 9 18:27:01 2005 From: B.P.S.Thurin at city.ac.uk (Brice Thurin) Date: Thu, 9 Jun 2005 17:27:01 +0100 Subject: [Pythonmac-SIG] Build PyOxide Message-ID: <2d7ea9aaf214ed78616e38db6e5759c4@city.ac.uk> Hello, I have been trying to install PyOxide but without success. First I tried the installation package but how I installed macpython2.4, it can't install it apparentely the installation package is looking for the 2.3 version. So I decided to build it. The build of IDEKit went well but then when I tried to build PyOxide I got the following error: Building target ?PyOXIDE? with build style ?Development? (optimization:level ?0?, debug-symbols:on) ? (3 errors) Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/PythonBrowser.nib Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/PythonBrowserModel.py Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/PythonBrowser.py on top of the error message I have got the following: /Developer/Private/jam -d1 -j1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=3.3 BUILD_STYLE=Development CPP_HEADERMAP_FILE=/Users/bricethurin/Desktop/PyOXIDE/build/ PyOXIDE.build/ExternalPython.build/ExternalPython.hmap SRCROOT=/Users/bricethurin/Desktop/PyOXIDE OBJROOT=/Users/bricethurin/Desktop/PyOXIDE/build SYMROOT=/Users/bricethurin/Desktop/PyOXIDE/build DSTROOT=/tmp/PyOXIDE.dst What I found quite suprising it is that I installed PyObjC 1.3.6 and is looking for 1.0b1 Could you tell me what I am doing wrong? Many Thanks Brice Brice Thurin Department of Optometry and Visual Science City University, Northampton Square London, EC1V 0HB, UK. http://www.city.ac.uk/optometry/Luis/myresearch/Research/ scatteringproper.html http://www.sharpeye.org/ Tel: +44 (0)20 7040 4157 Fax: +44(0)20 7040 8355 e-mail: B.P.S.Thurin at city.ac.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2295 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050609/10255506/attachment.bin From matsakis at mit.edu Thu Jun 9 18:51:29 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Thu, 9 Jun 2005 12:51:29 -0400 (EDT) Subject: [Pythonmac-SIG] Appscript Installer 1.1rc1 Message-ID: http://appscript.ai.mit.edu/appscript-1.1rc1.dmg This is the latest version of the appscript installer. This installer is for the built-in python on Mac OS X 10.3 and 10.4 (A similar installer for Python 2.4 will come later). It's a release candidate, so we're getting ready to announce this to a wider audience (Macintouch, etc.) so now would be a great time to test it if you use appscript. Changes since the alpha release include a number of tweaks to the documentation, a change to the installed location of AppscriptTerminologyServer (now in /Utilities/appscript/), a couple of bug fixes and a refactoring of osaterminology. This should upgrade the alpha version (and the 1.0.x version) of the installer just fine. After investigating bdist_mpkg, I've decided not to use it for this release, both because of the permissions issues on 10.3 (Apple's fault) and because I was having problems creating a metapackage that did what I wanted (also Apple's fault). Because of the way upgrades work, I see no problems with eventually migrating to a bdist_mpkg-based version in the future, since it will be possible to leave a skeleton package for backwards compatibility that will remove old versions of files, even if it doesn't install anything itself. Nick From gandreas at visi.com Thu Jun 9 20:01:13 2005 From: gandreas at visi.com (gandreas) Date: Thu, 9 Jun 2005 11:01:13 -0700 Subject: [Pythonmac-SIG] Build PyOxide In-Reply-To: <2d7ea9aaf214ed78616e38db6e5759c4@city.ac.uk> References: <2d7ea9aaf214ed78616e38db6e5759c4@city.ac.uk> Message-ID: <5B2D3465-7BA9-4772-91B9-30F6DDFE52C6@visi.com> On Jun 9, 2005, at 9:27 AM, Brice Thurin wrote: > Hello, > > I have been trying to install PyOxide but without success. First I > tried the installation package but how I installed macpython2.4, it > can't install it apparentely the installation package is looking > for the 2.3 version. So I decided to build it. The build of IDEKit > went well but then when I tried to build PyOxide I got the > following error: > > Building target ?PyOXIDE? with build style > ?Development? (optimization:level ?0?, debug-symbols:on) ? (3 errors) > Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/ > PythonBrowser.nib > Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/ > PythonBrowserModel.py > Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/ > PythonBrowser.py > > > on top of the error message I have got the following: > > /Developer/Private/jam -d1 -j1 JAMBASE=/Developer/Makefiles/ > pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build > _DEFAULT_GCC_VERSION=3.3 BUILD_STYLE=Development > CPP_HEADERMAP_FILE=/Users/bricethurin/Desktop/PyOXIDE/build/ > PyOXIDE.build/ExternalPython.build/ExternalPython.hmap SRCROOT=/ > Users/bricethurin/Desktop/PyOXIDE OBJROOT=/Users/bricethurin/ > Desktop/PyOXIDE/build SYMROOT=/Users/bricethurin/Desktop/PyOXIDE/ > build DSTROOT=/tmp/PyOXIDE.dst > > What I found quite suprising it is that I installed PyObjC 1.3.6 > and is looking for 1.0b1 > > Could you tell me what I am doing wrong? Using source that isn't on my machine? Seriously, I've made a bunch of changes (some small bug fixes, other build issues), and I've got a version that compiles and runs (mostly) for Python 2.4.1/PyObjC 1.3.6. I don't have the sources handy (I'm at WWDC) but I can get you a built version if you want. Otherwise, you should be able to go into the various project/item settings and adjust the paths accordingly to get it built (this won't get you some of the bug fixes, but I think it should otherwise work with 2.4.1) On the other hand, if you're needs aren't pressing, wait for the next version, which will have a significant reorg (built via the PyObjC XCode templates and py2app). I will release the interim source some time after I get back from WWDC, but this will be a purely stop gap version until I can get the reorg done. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050609/88f9fddd/attachment.html From lee_cullens at mac.com Thu Jun 9 20:13:56 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Thu, 9 Jun 2005 14:13:56 -0400 Subject: [Pythonmac-SIG] Newsreader list name? Message-ID: <1BAAB1D8-438E-4891-B19F-780E36221EC6@mac.com> I'm switching over from email digests to a newsreader and I can't find a reference for this pyrhonmac-sig list. For example, I have the lists comp.lang.python and comp.lang.python.announce setup, but can't find something like comp.lang.python.pythonmac? There must be others on this list using a newsreader and I would appreciate the list name used. Thanks, Lee C From rowen at cesmail.net Thu Jun 9 20:47:48 2005 From: rowen at cesmail.net (Russell E. Owen) Date: Thu, 09 Jun 2005 11:47:48 -0700 Subject: [Pythonmac-SIG] Newsreader list name? References: <1BAAB1D8-438E-4891-B19F-780E36221EC6@mac.com> Message-ID: In article <1BAAB1D8-438E-4891-B19F-780E36221EC6 at mac.com>, Lee Cullens wrote: > I'm switching over from email digests to a newsreader and I can't > find a reference for this pyrhonmac-sig list. > > For example, I have the lists comp.lang.python and > comp.lang.python.announce setup, but can't find something like > comp.lang.python.pythonmac? > > There must be others on this list using a newsreader and I would > appreciate the list name used. There is no equivalent newsgroup per-se, but you can read mailing many useful mailing lists as news using gmane by using news server news.gmane.org. This mailing list there as: gmane.comp.python.apple See http://gmane.org for more info about gmane. -- Russell From B.P.S.Thurin at city.ac.uk Thu Jun 9 18:05:51 2005 From: B.P.S.Thurin at city.ac.uk (Brice Thurin) Date: Thu, 9 Jun 2005 17:05:51 +0100 Subject: [Pythonmac-SIG] Build PyOxide Message-ID: Hello, I have been trying to install PyOxide but without success. First I tried the installation package but how I installed macpython2.4, it can't install it apparentely the installation package is looking for the 2.3 version. So I decided to build it. The build of IDEKit went well but then when I tried to build PyOxide I got the following error: Building target ?PyOXIDE? with build style ?Development? (optimization:level ?0?, debug-symbols:on) ? (3 errors) Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/PythonBrowser.nib Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/PythonBrowserModel.py Missing file or directory: pyobjc-1.0b1/Examples/PythonBrowser/PythonBrowser.py on top of the error message I have got the following: /Developer/Private/jam -d1 -j1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=3.3 BUILD_STYLE=Development CPP_HEADERMAP_FILE=/Users/bricethurin/Desktop/PyOXIDE/build/ PyOXIDE.build/ExternalPython.build/ExternalPython.hmap SRCROOT=/Users/bricethurin/Desktop/PyOXIDE OBJROOT=/Users/bricethurin/Desktop/PyOXIDE/build SYMROOT=/Users/bricethurin/Desktop/PyOXIDE/build DSTROOT=/tmp/PyOXIDE.dst What I found quite suprising it is that I installed PyObjC 1.3.6 and is looking for 1.0b1 Could you tell me what I am doing wrong? Many Thanks Brice -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1984 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050609/aa118a17/attachment-0001.bin From lists at mostrom.pp.se Thu Jun 9 22:30:31 2005 From: lists at mostrom.pp.se (Jan Erik =?iso-8859-1?Q?Mostr=F6m?=) Date: Thu, 9 Jun 2005 22:30:31 +0200 Subject: [Pythonmac-SIG] MySQL Message-ID: First I have admit: I'm a complete newbie when it comes to installing/using non-standard modules so please be kind. My problem is that I've been asked to write an application that uses MySQL, I looked around trying to find a some binary distribution of the MySQL module but didn't succeed. But I failed and downloaded MySQL Python 1.2. When I read the docs it looks like I need to download a developer version of MySQL instead of the standard version I have installed. So my question: have I missed some version of MySQL that doesn't require me to install the development version of the MySQL module (or have I misunderstood something completely)? jem -- Jan Erik Mostr?m, www.mostrom.pp.se From bob at redivi.com Fri Jun 10 00:11:14 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 9 Jun 2005 15:11:14 -0700 Subject: [Pythonmac-SIG] MySQL In-Reply-To: References: Message-ID: <09155E06-74FF-4FA3-94ED-D25FA348BCA1@redivi.com> On Jun 9, 2005, at 1:30 PM, Jan Erik Mostr?m wrote: > First I have admit: I'm a complete newbie when it comes to > installing/using > non-standard modules so please be kind. > > My problem is that I've been asked to write an application that > uses MySQL, I > looked around trying to find a some binary distribution of the > MySQL module > but didn't succeed. But I failed and downloaded MySQL Python 1.2. You can download a MySQL-python 1.2 installer from: http://pythonmac.org/packages/ -bob From kenneth.m.mcdonald at gmail.com Fri Jun 10 01:07:41 2005 From: kenneth.m.mcdonald at gmail.com (Kenneth McDonald) Date: Thu, 9 Jun 2005 18:07:41 -0500 Subject: [Pythonmac-SIG] Correct combo of darwinports sqlite/pysqlite on Mac? Message-ID: I'm about to install sqlite and pysqlite on 10.4. Darwinports gives me the following options: sqlite databases/sqlite 2.8.15 an embedded SQL database engine sqlite3 databases/sqlite3 3.2.1 an embedded SQL database engine py-sqlite python/py-sqlite 2.0.3 python database extension for sqlite py-sqlite2 python/py-sqlite2 1.0.1 python database extension for sqlite2 Would I be correct in thinking that the correct combination for the most recent versions is sqlite3 and py-sqlite? Thanks, Ken From bob at redivi.com Fri Jun 10 01:15:25 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 9 Jun 2005 16:15:25 -0700 Subject: [Pythonmac-SIG] Correct combo of darwinports sqlite/pysqlite on Mac? In-Reply-To: References: Message-ID: On Jun 9, 2005, at 4:07 PM, Kenneth McDonald wrote: > I'm about to install sqlite and pysqlite on 10.4. Darwinports gives me > the following options: > > sqlite databases/sqlite 2.8.15 an embedded > SQL database engine > sqlite3 databases/sqlite3 3.2.1 an embedded > SQL database engine > py-sqlite python/py-sqlite 2.0.3 python > database extension for sqlite > py-sqlite2 python/py-sqlite2 1.0.1 python > database extension for sqlite2 > > Would I be correct in thinking that the correct combination for the > most recent versions is sqlite3 and py-sqlite? You almost certainly want sqlite3, however, the API is somewhat different between py-sqlite and py-sqlite2, so it depends on what you want. py-sqlite2 is newer than py-sqlite. -bob From lee_cullens at mac.com Fri Jun 10 01:25:55 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Thu, 9 Jun 2005 19:25:55 -0400 Subject: [Pythonmac-SIG] Newsreader list name? In-Reply-To: References: <1BAAB1D8-438E-4891-B19F-780E36221EC6@mac.com> Message-ID: <687218AB-1711-424F-B440-58BA20E5E57D@mac.com> Thanks for the reply Russel You hit on another problem. I have looked through the Gmane site a couple times (carefully) in the last couple days. I downloaded a copy of Hogwasher to try and using my ISPs news server found the two lists I mentioned, but after repeated tries of nntp://news.gmane.org and appended groupings (e.g. + gmane.comp.python.tutor) directly and separately, and just groupings through my ISP server, could not get anything "Gmane" to work. I even sent them (Gmane) an email asking what I was doing wrong or if they are still alive, and have received no answer yet. Are you using Gmane successfully and if so how? Thanks, Lee C On Jun 9, 2005, at 2:47 PM, Russell E. Owen wrote: > In article <1BAAB1D8-438E-4891-B19F-780E36221EC6 at mac.com>, > Lee Cullens wrote: > > >> I'm switching over from email digests to a newsreader and I can't >> find a reference for this pyrhonmac-sig list. >> >> For example, I have the lists comp.lang.python and >> comp.lang.python.announce setup, but can't find something like >> comp.lang.python.pythonmac? >> >> There must be others on this list using a newsreader and I would >> appreciate the list name used. >> > > There is no equivalent newsgroup per-se, but you can read mailing many > useful mailing lists as news using gmane by using news server > news.gmane.org. This mailing list there as: > > gmane.comp.python.apple > > See http://gmane.org for more info about gmane. > > -- Russell > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From lee_cullens at mac.com Fri Jun 10 03:50:58 2005 From: lee_cullens at mac.com (Lee Cullens) Date: Thu, 9 Jun 2005 21:50:58 -0400 Subject: [Pythonmac-SIG] Newsreader list name? In-Reply-To: References: <1BAAB1D8-438E-4891-B19F-780E36221EC6@mac.com> <687218AB-1711-424F-B440-58BA20E5E57D@mac.com> Message-ID: Whack %) Good thing I'm on SS because I'm getting to dumb to fool around with this technical stuff :<)) I put my ISPs server in without the nntp://, but not Gmane's, and didn't notice the inconsistency of my ways. Thanks for the whack up side the head Russell, Lee C (studying quantum theory, but can't do arithmetic) On Jun 9, 2005, at 7:38 PM, Russell E Owen wrote: > At 7:25 PM -0400 2005-06-09, Lee Cullens wrote: > >> Thanks for the reply Russel >> >> You hit on another problem. I have looked through the Gmane site >> a couple times (carefully) in the last couple days. I downloaded >> a copy of Hogwasher to try and using my ISPs news server found the >> two lists I mentioned, but after repeated tries of nntp:// >> news.gmane.org and appended groupings (e.g. + >> gmane.comp.python.tutor) directly and separately, and just >> groupings through my ISP server, could not get anything "Gmane" to >> work. I even sent them (Gmane) an email asking what I was doing >> wrong or if they are still alive, and have received no answer yet. >> >> Are you using Gmane successfully and if so how? >> > > I use it every day, using server address news.gmane.org. Sorry, but > I have no idea why it's not working for you. I happen to use MT > Newswatcher, but don't see why HogWasher would have any problem > with it -- unless it wants just plain news.gmane.org (without the > leading nntp://) or if you misspelled something in the address. > > -- Russell > > From kenneth.m.mcdonald at gmail.com Fri Jun 10 04:42:18 2005 From: kenneth.m.mcdonald at gmail.com (Kenneth McDonald) Date: Thu, 9 Jun 2005 21:42:18 -0500 Subject: [Pythonmac-SIG] Sigh, difficulties getting py-sqlite2 to install. Message-ID: I used darwinports to install sqlite3 without difficulty, but when I tried to install py-sqlite2, I got the following: g4:~ ken$ sudo port install py-sqlite2 Password: ---> Fetching XFree86 ---> Attempting to fetch XFree86-4.5.0-src-1.tgz from http://distfiles-od.opendarwin.org/ ---> Attempting to fetch XFree86-4.5.0-src-2.tgz from http://distfiles-od.opendarwin.org/ ---> Attempting to fetch XFree86-4.5.0-src-3.tgz from http://distfiles-od.opendarwin.org/ ---> Attempting to fetch XFree86-4.5.0-src-4.tgz from http://distfiles-od.opendarwin.org/ ---> Attempting to fetch XFree86-4.5.0-src-5.tgz from http://distfiles-od.opendarwin.org/ ---> Verifying checksum(s) for XFree86 ---> Extracting XFree86 ---> Applying patches to XFree86 ---> Configuring XFree86 ---> Building XFree86 with target World ---> Staging XFree86 into destroot ---> Packaging tgz archive for XFree86 4.5.0_2 ---> Installing XFree86 4.5.0_2 ---> Activating XFree86 4.5.0_2 Error: Target com.apple.activate returned: Image error: /usr/X11R6/include/DPS/ColorSB.h already exists and does not belong to a registered port. Unable to activate port XFree86. Error: The following dependencies failed to build: python24 tk XFree86 tcl sqlite I have to admit, I was rather surprised in the first place that installing py-sqlite2 would attempt to install XFree, but thought that perhaps there was some db viewer app included that requires XFree. In any case, this problem is quite outside my circle of competence, and I was wondering if anyone knew what was going on. Thanks, Ken From bob at redivi.com Fri Jun 10 04:49:05 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 9 Jun 2005 19:49:05 -0700 Subject: [Pythonmac-SIG] Sigh, difficulties getting py-sqlite2 to install. In-Reply-To: References: Message-ID: On Jun 9, 2005, at 7:42 PM, Kenneth McDonald wrote: > I used darwinports to install sqlite3 without difficulty, but when I > tried to install py-sqlite2, I got the following: --- > I have to admit, I was rather surprised in the first place that > installing py-sqlite2 would attempt to install XFree, but thought that > perhaps there was some db viewer app included that requires XFree. In > any case, this problem is quite outside my circle of competence, and I > was wondering if anyone knew what was going on. This looks like a darwinports problem, you should ask on their list and/or file a bug. -bob From rowen at u.washington.edu Fri Jun 10 01:38:35 2005 From: rowen at u.washington.edu (Russell E Owen) Date: Thu, 9 Jun 2005 16:38:35 -0700 Subject: [Pythonmac-SIG] Newsreader list name? In-Reply-To: <687218AB-1711-424F-B440-58BA20E5E57D@mac.com> References: <1BAAB1D8-438E-4891-B19F-780E36221EC6@mac.com> <687218AB-1711-424F-B440-58BA20E5E57D@mac.com> Message-ID: At 7:25 PM -0400 2005-06-09, Lee Cullens wrote: >Thanks for the reply Russel > >You hit on another problem. I have looked through the Gmane site a >couple times (carefully) in the last couple days. I downloaded a >copy of Hogwasher to try and using my ISPs news server found the two >lists I mentioned, but after repeated tries of nntp://news.gmane.org >and appended groupings (e.g. + gmane.comp.python.tutor) directly and >separately, and just groupings through my ISP server, could not get >anything "Gmane" to work. I even sent them (Gmane) an email asking >what I was doing wrong or if they are still alive, and have received >no answer yet. > >Are you using Gmane successfully and if so how? I use it every day, using server address news.gmane.org. Sorry, but I have no idea why it's not working for you. I happen to use MT Newswatcher, but don't see why HogWasher would have any problem with it -- unless it wants just plain news.gmane.org (without the leading nntp://) or if you misspelled something in the address. -- Russell From jbarden at wilcoxd.com Fri Jun 10 20:30:18 2005 From: jbarden at wilcoxd.com (Jared Barden) Date: Fri, 10 Jun 2005 14:30:18 -0400 Subject: [Pythonmac-SIG] Appscript and iTunes track deleting Message-ID: <4D3EAA1C-D15C-4089-878C-A7436C0A96B2@wilcoxd.com> If I'm using appscript to delete a track from a user_playlist (which is where I need to start from), what is the best way to delete that same track from the library playlist as well? Deleting from the playlist only removes it there, obviously, and that's not what I'm looking for. Any help is greatly appreciated. Jared Barden Wilcox Development Solutions http://www.wilcoxd.com From hengist.podd at virgin.net Sat Jun 11 12:09:31 2005 From: hengist.podd at virgin.net (has) Date: Sat, 11 Jun 2005 11:09:31 +0100 Subject: [Pythonmac-SIG] Appscript and iTunes track deleting Message-ID: Jared Barden wrote: >If I'm using appscript to delete a track from a user_playlist (which >is where I need to start from), what is the best way to delete that >same track from the library playlist as well? Deleting from the >playlist only removes it there, obviously, and that's not what I'm >looking for. iTunes scripting implementation is pretty skanky. You have to use the track's database_ID: from appscript import * itunes = app('iTunes') tracktodelete = itunes.playlists['test list'].tracks['test track'] itunes.playlists['library'].tracks.filter(its.database_ID == tracktodelete.database_ID.get()).delete() If you're deleting multiple tracks, you'll have to iterate over a list of database IDs and delete the tracks one at a time. HTH has -- http://freespace.virgin.net/hamish.sanderson/ From sw at wordtech-software.com Sun Jun 12 23:33:13 2005 From: sw at wordtech-software.com (sw) Date: Sun, 12 Jun 2005 17:33:13 -0400 Subject: [Pythonmac-SIG] Seeking maintaines for wxPython and PyQt packages on OS X Message-ID: <42ACAA19.3010104@wordtech-software.com> I have decided to significantly cut back on the open-source projects I am involved with, which means that the Python developer tools I package for Mac OS X are in need of new maintainers. I am seeking maintainers for the following packages: * Spe, a wxPython-based IDE. Spe also bundles Kiki, wxGlade, and XRCed. Spe and wxGlade are undergoing continuous development, and so I periodically update these when new milestone releases are reached. I have also contributed some code to each of these programs that help optimize them for Mac OS X. * Boa Constructor, which is another wxPython-based IDE. Boa Constructor also is undergoing heavy development. I have not yet released a package of this program, though the version I have been working on is reasonably stable, and I will probably release it in the next week or so. * The PyQt-Mac binary distribution, which includes a binary installer of all the PyQt libraries and also a package of Eric3, a PyQt-based IDE. All of these programs can already be installed from source on the Mac; what I've done for each is add code to help optimize them for OS X (as far as my modest Python skills allow me to do, at any rate), and I've also bundled them so that they can be launched as standard Mac application packages. All of these programs have had issues with stability and reliability in the past, but the work I've done recently--focused particularly on moving the programs to the latest versions of their supporting libraries, i.e. Python 2.4.1, wxPython 2.6.1, and PyQt 3.14.1, has improved their stability a great deal. If you are interested, please contact me off-list to discuss the particulars. Some of these packages have a Sourceforge infrastructure already in place, which I will gladly turn over to you. Others may need new server space, as I will eventually be removing these from my server. If no one is able to take over a particular package, then active Mac-based development on that package will probably cease (unless the original program author is able to take on that task). I am going to be concentrating mainly on application development instead of package maintenance, specificially my DarwinPorts GUI project, the Aquamacs version of Emacs on which I'm a co-developer, and another project or two that are in the very early stages. Thanks to everyone who has contributed feedback, bug reports, etc. on these packages. I hope a few people who find these tools useful are able to step forward and take over the maintenance of them. Regards, Kevin Walzer From brownr at ucalgary.ca Mon Jun 13 22:02:39 2005 From: brownr at ucalgary.ca (Robert Brown) Date: Mon, 13 Jun 2005 14:02:39 -0600 Subject: [Pythonmac-SIG] PyInterpreterView Message-ID: <10130D43-F784-4B80-ACE2-26E76B8A1107@ucalgary.ca> I've been thinking about writing a nice interpreter view that can be easily embedded as a debugging console in applications for a while... thanks for doing it for me! How do I get references to my objects though? I'd specifically like to get a reference to a controller object. Through NSApp() I can get the windows and GUI objects, but the models and controllers seem to be out of reach. I tried making a global variable in my Python program but it doesn't get imported into the PyInterpreterView. Thanks, Robb --------------------------------------------------- Robb Brown Seaman Family MR Research Centre Calgary, Alberta, Canada -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050613/a4a11fa7/attachment.htm From bob at redivi.com Mon Jun 13 22:41:45 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 13 Jun 2005 16:41:45 -0400 Subject: [Pythonmac-SIG] PyInterpreterView In-Reply-To: <10130D43-F784-4B80-ACE2-26E76B8A1107@ucalgary.ca> References: <10130D43-F784-4B80-ACE2-26E76B8A1107@ucalgary.ca> Message-ID: <3D563CB0-2098-4B54-BCD6-8D31BBC76FBC@redivi.com> On Jun 13, 2005, at 4:02 PM, Robert Brown wrote: > I've been thinking about writing a nice interpreter view that can > be easily embedded as a debugging console in applications for a > while... thanks for doing it for me! How do I get references to my > objects though? I'd specifically like to get a reference to a > controller object. Through NSApp() I can get the windows and GUI > objects, but the models and controllers seem to be out of reach. I > tried making a global variable in my Python program but it doesn't > get imported into the PyInterpreterView. Subclass it and add the behavior you want, or define some Objective-C visible class that can see what you want access to. PyInterpreter has been a relatively easy to embed example in PyObjC for a very long time, it just wasn't an IB palette until recently. -bob From brad.allen at omsdal.com Mon Jun 13 22:49:36 2005 From: brad.allen at omsdal.com (brad.allen@omsdal.com) Date: Mon, 13 Jun 2005 15:49:36 -0500 Subject: [Pythonmac-SIG] [Pythoncard-users] PythonCard on OS X 10.4 In-Reply-To: Message-ID: I can't speak with any authority on this, but I don't think that PythonCard .81/.82 has been tested against Python 2.4.x. I ran into lots of problems with this and no one on the PythonCard list was able to help me with it, so I ended up continuing to use Python 2.3.5 for PythonCard .81 and .82. I was able to run PythonCard apps under 2.4.1, but got lots of exceptions and tracebacks in the terminal output, and as I recall Resource Editor was almost unuseable under Python 2.4.1. Of course, PythonCard is open source, so anybody with time to debug under Python 2.4.1 could do so to get to the bottom of the problem... My PythonCard app seems to work ok under Mac OS 10.4.1 and Python 2.3.5, along with wxPython 2.3.5 ansi (not Unicode). I doubt if 10.4 is the problem here. Arthur Elsenaar wrote on 06/07/2005 06:23:16 PM: > > Hi, > > trying to install PythonCard on OS X 10.4, but running into an import > problem. > > I installed python2.4.1, wxPython2.6, TigerPython24Fix and > TigerPython23Compat from Bob's packages page and added /usr/local/bin > to my path. Python2.4 runs fine and I can import wx fine, but not > pythoncard.. anyone know what can be wrong? > > Thanks, Arthur. > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Pythoncard-users mailing list > Pythoncard-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pythoncard-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050613/0c0ff14f/attachment.html From Benjamin.Schollnick at xerox.com Tue Jun 14 18:09:38 2005 From: Benjamin.Schollnick at xerox.com (Schollnick, Benjamin) Date: Tue, 14 Jun 2005 12:09:38 -0400 Subject: [Pythonmac-SIG] Tricky question? Message-ID: <266589E1B9392B4C9195CC25A07C73B90183CE5B@usa0300ms04.na.xerox.net> Folks, I'm considering porting a windows python package over to the Macintosh.... But one problem comes up.... Is there any way to gather a list of applications that have been installed on the Macintosh.... With the windows registry, we just look at the uninstall tree.... It's not perfect, but that get's 95+% of the packages.... I can't think of any way to do this on the mac... Except.... 1) Os.path.Walk & check for .APP bundles.... Anyone have a better suggestion? This would have to address all the connected hard drives.... Also, anyway to tell what the current screen saver settings are? (ie. Screen Saver is set to turn on at XX minutes, and is password protected?) - Benjamin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050614/bb0747d0/attachment.htm From trentm at ActiveState.com Tue Jun 14 18:25:21 2005 From: trentm at ActiveState.com (Trent Mick) Date: Tue, 14 Jun 2005 09:25:21 -0700 Subject: [Pythonmac-SIG] Tricky question? In-Reply-To: <266589E1B9392B4C9195CC25A07C73B90183CE5B@usa0300ms04.na.xerox.net> References: <266589E1B9392B4C9195CC25A07C73B90183CE5B@usa0300ms04.na.xerox.net> Message-ID: <20050614162521.GA22604@ActiveState.com> [Schollnick, Benjamin wrote] > Folks, > > I'm considering porting a windows python package over to the > Macintosh.... > > But one problem comes up.... > > Is there any way to gather a list of applications that have been > installed on > the Macintosh.... > > With the windows registry, we just look at the uninstall tree.... > It's not perfect, but that get's 95+% of the packages.... > > I can't think of any way to do this on the mac... Except.... > > 1) Os.path.Walk & check for .APP bundles.... > > Anyone have a better suggestion? This would have to address all the > connected > hard drives.... Anything installed using Apple .pkg/.mpkg bundles will leave a receipt in /Library/Receipts. (Maybe ~/Library/Receipts too? I don't know.) However, most GUI apps won't install this way though. They will just have been dragged from a disk image or something to whereever the user wanted to install it. Typically this is somewhere under /Applications, but could also be anywhere else. Trent -- Trent Mick TrentM at ActiveState.com From Benjamin.Schollnick at xerox.com Tue Jun 14 18:43:05 2005 From: Benjamin.Schollnick at xerox.com (Schollnick, Benjamin) Date: Tue, 14 Jun 2005 12:43:05 -0400 Subject: [Pythonmac-SIG] Tricky question? Message-ID: <266589E1B9392B4C9195CC25A07C73B90183CE5C@usa0300ms04.na.xerox.net> > > Is there any way to gather a list of applications that > have been > > installed on the Macintosh.... > > > > With the windows registry, we just look at the > uninstall tree.... It's not perfect, but that get's 95+% of the packages.... > > > > I can't think of any way to do this on the mac... Except.... > > > > 1) Os.path.Walk & check for .APP bundles.... > > > > Anyone have a better suggestion? This would have to > address all the connected hard drives.... > > Anything installed using Apple .pkg/.mpkg bundles will leave > a receipt in /Library/Receipts. (Maybe ~/Library/Receipts > too? I don't know.) I forgot about that.... But that's quite true.... > However, most GUI apps won't install this way though. They > will just have been dragged from a disk image or something to > whereever the user wanted to install it. Typically this is > somewhere under /Applications, but could also be anywhere else. I know.... I prefer this install method myself... But it doesn't leave any easy way to discover the install.... - Benjamin From bob at redivi.com Tue Jun 14 19:06:33 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 14 Jun 2005 13:06:33 -0400 Subject: [Pythonmac-SIG] Tricky question? In-Reply-To: <20050614162521.GA22604@ActiveState.com> References: <266589E1B9392B4C9195CC25A07C73B90183CE5B@usa0300ms04.na.xerox.net> <20050614162521.GA22604@ActiveState.com> Message-ID: <73ECA1F1-20F5-4DF3-8179-EB2A437964D8@redivi.com> On Jun 14, 2005, at 12:25 PM, Trent Mick wrote: > [Schollnick, Benjamin wrote] > >> Folks, >> >> I'm considering porting a windows python package over to the >> Macintosh.... >> >> But one problem comes up.... >> >> Is there any way to gather a list of applications that have been >> installed on >> the Macintosh.... >> >> With the windows registry, we just look at the uninstall tree.... >> It's not perfect, but that get's 95+% of the packages.... >> >> I can't think of any way to do this on the mac... Except.... >> >> 1) Os.path.Walk & check for .APP bundles.... >> >> Anyone have a better suggestion? This would have to address all >> the >> connected >> hard drives.... >> > > Anything installed using Apple .pkg/.mpkg bundles will leave a receipt > in /Library/Receipts. (Maybe ~/Library/Receipts too? I don't know.) > > However, most GUI apps won't install this way though. They will just > have been dragged from a disk image or something to whereever the user > wanted to install it. Typically this is somewhere under /Applications, > but could also be anywhere else. The first question is of course, why do you want to do this? It's almost always the wrong thing to do in the Mac universe. -bob From njriley at uiuc.edu Tue Jun 14 19:09:09 2005 From: njriley at uiuc.edu (Nicholas Riley) Date: Tue, 14 Jun 2005 12:09:09 -0500 Subject: [Pythonmac-SIG] Tricky question? In-Reply-To: <266589E1B9392B4C9195CC25A07C73B90183CE5B@usa0300ms04.na.xerox.net> References: <266589E1B9392B4C9195CC25A07C73B90183CE5B@usa0300ms04.na.xerox.net> Message-ID: <20050614170909.GA90399@uiuc.edu> On Tue, Jun 14, 2005 at 12:09:38PM -0400, Schollnick, Benjamin wrote: > Is there any way to gather a list of applications that have been > installed on > the Macintosh.... This information is available, but there is no public API for accessing it. So you have a few choices - use a SPI, parse the output of lsregister, or collect the information yourself. The SPI is _LSCopyAllApplicationURLs() in LaunchServices.framework, which works back several OS versions, but may be removed at any point. /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump also gives you what you want, though the format of the output is likely to change. No matter what you do, please file a bug (bugreport.apple.com) and ask for this to be made a public API in future. > Also, anyway to tell what the current screen saver settings are? > (ie. Screen Saver is set to turn on at XX minutes, and is password > protected?) Again, you're on your own here - no supported API. Have fun... As much as you can, it may help both here and in your bug reports to describe why you need the above information; there may be another way to do what you want. -- Nicholas Riley | From Benjamin.Schollnick at xerox.com Tue Jun 14 19:19:15 2005 From: Benjamin.Schollnick at xerox.com (Schollnick, Benjamin) Date: Tue, 14 Jun 2005 13:19:15 -0400 Subject: [Pythonmac-SIG] Tricky question? Message-ID: <266589E1B9392B4C9195CC25A07C73B90183CE60@usa0300ms04.na.xerox.net> > As much as you can, it may help both here and in your bug > reports to describe why you need the above information; there > may be another way to do what you want. It's really simple.... I accidentally ended up volunteering as the "Computer Security & License Audit" victim... I mean person.... So I used Python & Win32all (I forget the new name), to create an Audit tool that the user runs, and it emails me the data back... Both in an Email & File Attached XML file... It's been incredibly helpful on the windows side.... But I personally am a Macintosh person, and our group has a few macs.... It would be nice to be able to do the same thing on the Macintosh.... As I mentioned the two big ones, are the Installed Programs, and Screen Saver settings.... (I figure I can find the plist that the screen saver uses.....) - Benjamin From bob at redivi.com Tue Jun 14 19:32:42 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 14 Jun 2005 13:32:42 -0400 Subject: [Pythonmac-SIG] Tricky question? In-Reply-To: <266589E1B9392B4C9195CC25A07C73B90183CE60@usa0300ms04.na.xerox.net> References: <266589E1B9392B4C9195CC25A07C73B90183CE60@usa0300ms04.na.xerox.net> Message-ID: <34971605-A953-4CDB-9D5A-BEE0FE7DB962@redivi.com> On Jun 14, 2005, at 1:19 PM, Schollnick, Benjamin wrote: > > >> As much as you can, it may help both here and in your bug >> reports to describe why you need the above information; there >> may be another way to do what you want. >> > > It's really simple.... > > I accidentally ended up volunteering as the "Computer Security & > License > Audit" victim... I mean person.... > > So I used Python & Win32all (I forget the new name), to create an > Audit tool that the user runs, and it emails me the data back... Both > in an Email & File Attached XML file... > > It's been incredibly helpful on the windows side.... But I personally > am a Macintosh person, and our group has a few macs.... It would be > nice > to be able to do the same thing on the Macintosh.... > > As I mentioned the two big ones, are the Installed Programs, and > Screen > Saver > settings.... > > (I figure I can find the plist that the screen saver uses.....) It might be worth taking a look at radmind . In addition to the LaunchServices SPI that njr mentioned, there's also System Profiler reports, which you can spit out as XML with /usr/ bin/system_profiler (there is a man page too). Not terribly fast to spit out a whole one, but that doesn't sound like a requirement. -bob From Larry.A.Meyn at nasa.gov Tue Jun 14 20:09:50 2005 From: Larry.A.Meyn at nasa.gov (Larry Meyn) Date: Tue, 14 Jun 2005 11:09:50 -0700 Subject: [Pythonmac-SIG] Tricky question? In-Reply-To: <266589E1B9392B4C9195CC25A07C73B90183CE60@usa0300ms04.na.xerox.net> References: <266589E1B9392B4C9195CC25A07C73B90183CE60@usa0300ms04.na.xerox.net> Message-ID: <142da583ce8ad0ddd58caaa4e88baaf4@nasa.gov> Benjamin, You may be missing a non-python solution. Apple's System Profiler will give you a list of all application on a machine in addition to a lot of other information. It's in the utilities folder and available under the Apple menu when you choose "About This Mac" and then "More Info...". If you want it more automated, System Profiler is scriptable, so one of the Python AppleScript interfaces could be used. Larry On Jun 14, 2005, at 10:19 AM, Schollnick, Benjamin wrote: > >> As much as you can, it may help both here and in your bug >> reports to describe why you need the above information; there >> may be another way to do what you want. > > It's really simple.... > > I accidentally ended up volunteering as the "Computer Security & > License > Audit" victim... I mean person.... > > So I used Python & Win32all (I forget the new name), to create an > Audit tool that the user runs, and it emails me the data back... Both > in an Email & File Attached XML file... > > It's been incredibly helpful on the windows side.... But I personally > am a Macintosh person, and our group has a few macs.... It would be > nice > to be able to do the same thing on the Macintosh.... > > As I mentioned the two big ones, are the Installed Programs, and Screen > Saver > settings.... > > (I figure I can find the plist that the screen saver uses.....) > > - Benjamin > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > Larry Meyn Aerospace Operations Modeling Branch M/S 210-10 NASA Ames Research Center Moffett Field, CA 94035-1000 E-mail: Larry.A.Meyn at nasa.gov Phone: (650) 604-5038 Fax: (650) 604-0222 E-Fax: (425) 944-5526 sent via e-mail From bob at redivi.com Tue Jun 14 20:18:24 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 14 Jun 2005 14:18:24 -0400 Subject: [Pythonmac-SIG] Tricky question? In-Reply-To: <142da583ce8ad0ddd58caaa4e88baaf4@nasa.gov> References: <266589E1B9392B4C9195CC25A07C73B90183CE60@usa0300ms04.na.xerox.net> <142da583ce8ad0ddd58caaa4e88baaf4@nasa.gov> Message-ID: <313813BC-E687-4BF7-B75F-4E931BDCDCEA@redivi.com> On Jun 14, 2005, at 2:09 PM, Larry Meyn wrote: > You may be missing a non-python solution. Apple's System Profiler > will > give you a list of all application on a machine in addition to a > lot of > other information. It's in the utilities folder and available under > the Apple menu when you choose "About This Mac" and then "More > Info...". > > If you want it more automated, System Profiler is scriptable, so > one of > the Python AppleScript interfaces could be used. I highly recommend that you forget that it has a scriptable interface, and just use the command-line app as I had suggested in my previous message.. less overhead and more likely to actually do what you want. -bob From sw at wordtech-software.com Wed Jun 15 00:18:20 2005 From: sw at wordtech-software.com (sw) Date: Tue, 14 Jun 2005 18:18:20 -0400 Subject: [Pythonmac-SIG] My packages: never mind, I'm keeping them Message-ID: <42AF57AC.8090108@wordtech-software.com> I've decided to continue maintaining my various Python packages after all. Sorry for any confusion. From lists at mostrom.pp.se Wed Jun 15 09:38:59 2005 From: lists at mostrom.pp.se (Jan Erik =?iso-8859-1?Q?Mostr=F6m?=) Date: Wed, 15 Jun 2005 09:38:59 +0200 Subject: [Pythonmac-SIG] PyObjC Message-ID: I'm currently looking around for what tools I should use for writing Mac applications with GUIs. I've previously done this using either Java (no fun and Swing based programs doesn't look good) or REALbasic, but would like to use something else. I've looked at Cocoa and Objective-C (haven't done any programming) but I don't really like the syntax of Objective-C. So I've been considering using Python instead, my previous experience of Python is "standard" shell scripts and CGI scripts. This might seem like a really stupid question but since I don't haven't used Cocoa/Objective-C or PyObCj/Python I would like to ask a question: if I decide to use Python are there limitations on what I can do? (for example not being able to use UI widget XXX) jem -- Jan Erik Mostr?m, www.mostrom.pp.se From mwh at python.net Wed Jun 15 10:35:06 2005 From: mwh at python.net (Michael Hudson) Date: Wed, 15 Jun 2005 09:35:06 +0100 Subject: [Pythonmac-SIG] PyObjC In-Reply-To: ( =?iso-8859-1?q?Jan_Erik_Mostr=F6m's_message_of?= "Wed, 15 Jun 2005 09:38:59 +0200") References: Message-ID: <2mbr68c91h.fsf@starship.python.net> Jan Erik Mostr?m writes: > I'm currently looking around for what tools I should use for writing Mac > applications with GUIs. I've previously done this using either Java (no fun > and Swing based programs doesn't look good) or REALbasic, but would like to > use something else. Use PyObjC. This is such an easy question! :) > I've looked at Cocoa and Objective-C (haven't done any programming) but I > don't really like the syntax of Objective-C. So I've been considering using > Python instead, my previous experience of Python is "standard" shell scripts > and CGI scripts. > > This might seem like a really stupid question but since I don't > haven't used Cocoa/Objective-C or PyObCj/Python I would like to ask > a question: if I decide to use Python are there limitations on what > I can do? (for example not being able to use UI widget XXX) Not that you'll notice. Cheers, mwh -- Lisp does badly because we refuse to lie. When people ask us if we can solve insoluble problems we say that we can't, and because they expect us to lie to them, they find some other language where the truth is less respected. -- Tim Bradshaw, comp.lang.lisp From lists at mostrom.pp.se Wed Jun 15 11:23:25 2005 From: lists at mostrom.pp.se (Jan Erik =?iso-8859-1?Q?Mostr=F6m?=) Date: Wed, 15 Jun 2005 11:23:25 +0200 Subject: [Pythonmac-SIG] PyObjC In-Reply-To: <2mbr68c91h.fsf@starship.python.net> Message-ID: Michael Hudson 2005-06-15 10:35: >Use PyObjC. This is such an easy question! :) I kind of expected that answer ;-) >> This might seem like a really stupid question but since I don't >> haven't used Cocoa/Objective-C or PyObCj/Python I would like to ask >> a question: if I decide to use Python are there limitations on what >> I can do? (for example not being able to use UI widget XXX) > >Not that you'll notice. Care to give some details? jem -- Jan Erik Mostr?m, www.mostrom.pp.se From mwh at python.net Wed Jun 15 11:37:03 2005 From: mwh at python.net (Michael Hudson) Date: Wed, 15 Jun 2005 10:37:03 +0100 Subject: [Pythonmac-SIG] PyObjC In-Reply-To: ( =?iso-8859-1?q?Jan_Erik_Mostr=F6m's_message_of?= "Wed, 15 Jun 2005 11:23:25 +0200") References: Message-ID: <2m4qc0c668.fsf@starship.python.net> Jan Erik Mostr?m writes: > Michael Hudson 2005-06-15 10:35: > >>Use PyObjC. This is such an easy question! :) > > I kind of expected that answer ;-) > >>> This might seem like a really stupid question but since I don't >>> haven't used Cocoa/Objective-C or PyObCj/Python I would like to ask >>> a question: if I decide to use Python are there limitations on what >>> I can do? (for example not being able to use UI widget XXX) >> >>Not that you'll notice. > > Care to give some details? Like what? AFAICT you can't fully use NSInvocation from PyObjC, but you don't want to. Stuff like that. Cheers, mwh -- > so python will fork if activestate starts polluting it? I find it more relevant to speculate on whether Python would fork if the merpeople start invading our cities riding on the backs of giant king crabs. -- Brian Quinlan, comp.lang.python From Benjamin.Schollnick at xerox.com Wed Jun 15 14:15:34 2005 From: Benjamin.Schollnick at xerox.com (Schollnick, Benjamin) Date: Wed, 15 Jun 2005 08:15:34 -0400 Subject: [Pythonmac-SIG] Tricky question? Message-ID: <266589E1B9392B4C9195CC25A07C73B90183CE64@usa0300ms04.na.xerox.net> > > If you want it more automated, System Profiler is scriptable, so > > one of > > the Python AppleScript interfaces could be used. > > I highly recommend that you forget that it has a scriptable > interface, and just use the command-line app as I had > suggested in my > previous message.. less overhead and more likely to actually do what > you want. How did I forget about this? I must be too highly trained.... And not have a Macintosh for development.... I'll explore the System Profiler, especially since it can output in XML. I already have code to import XML data files, so I could probably adopt that for use.... (Or just scrape the text data....) Thanks for the suggestions! - Benjamin From noboru.yamamoto at kek.jp Wed Jun 15 14:46:09 2005 From: noboru.yamamoto at kek.jp (Noboru Yamamoto) Date: Wed, 15 Jun 2005 21:46:09 +0900 Subject: [Pythonmac-SIG] macspeech for MacOSX Message-ID: <42B02311.9000500@kek.jp> Hi, Attached file, macspeechX.py, is a replacement for macspeech module which used to be included in the Mac-Python distribution. As name indicates, it works with MacOSX and has similar, if not same, interfaces found in the old macspeech module. It requires ctypes module newer than 0.9.6 and Mac OSX 10.{2,3.4}. Python interpreter come with MacOSX may not work, at least for me, so you might need to build and install python from the source code. Python 2.4.1 and ctypes 0.9.6 should work well. I hope someone will think it is useful. Thanks, Noboru Yamamoto Accelerator Lab. KEK, JAPAN -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: macspeechX.py Url: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050615/5656b00a/macspeechX.diff From python at bostonmacosx.dyndns.org Wed Jun 15 22:46:43 2005 From: python at bostonmacosx.dyndns.org (Robert Herbstzuber) Date: Wed, 15 Jun 2005 16:46:43 -0400 Subject: [Pythonmac-SIG] Newbie....(for now) Message-ID: <814A757D-A3F9-45B9-8214-96CC7123164F@bostonmacosx.dyndns.org> Hello to all.... I've been writing PHP web apps for about 3 years now and I took one JAVA course over that time. I'm looking to get into "real" programming and I've chosen Python as my intro to it. I"ve installed the framework build of 2.4.1 on my Tiger install and i've tried to read a lot of documentation. As with most help it is too advanced for where I am right now or it isn't OS X specific enough. So I'm going to try to turn here.... Question1: When you install something like SciPy.py how do you know if you have the dependents that you need. Is there a way to list installed packages? I looked at package manager and it just doesn't seem mature. Maybe I'm just using it wrong. Question2: Where are the packages installed? Question3: Are there a good example of Python programs on a site somewhere? Cheers and thanks. Robert -------- Robert Herbstzuber http://bostonmacosx.dyndns.org/ http://rjhcc.dyndns.biz/ --------- From charles.hartman at conncoll.edu Wed Jun 15 23:38:40 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Wed, 15 Jun 2005 17:38:40 -0400 Subject: [Pythonmac-SIG] what's the plural of "Emacs"? Message-ID: I'd like to reintroduce myself to Emacs, so I went looking for "the Mac version". There seem to be at least two, maybe more, even just from Apple. Can anyone give me the thumbnail version of why I should get one or another? Charles Hartman From bob at redivi.com Thu Jun 16 00:20:28 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 15 Jun 2005 18:20:28 -0400 Subject: [Pythonmac-SIG] what's the plural of "Emacs"? In-Reply-To: References: Message-ID: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> On Jun 15, 2005, at 5:38 PM, Charles Hartman wrote: > I'd like to reintroduce myself to Emacs, so I went looking for "the > Mac version". There seem to be at least two, maybe more, even just > from Apple. Can anyone give me the thumbnail version of why I should > get one or another? Emacsen? Apple only offers one emacs, the one that ships with Mac OS X, unless you're just talking about listings on ? I've heard that some people are happy with the Carbonized GNU Emacs (I think it can be compiled from CVS, but there are various binaries available), and Kevin Walzer is working on an AquaMacs distribution, which I've heard mixed things about. -bob From eichin at metacarta.com Thu Jun 16 00:50:36 2005 From: eichin at metacarta.com (eichin@metacarta.com) Date: 15 Jun 2005 18:50:36 -0400 Subject: [Pythonmac-SIG] what's the plural of "Emacs"? In-Reply-To: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> References: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> Message-ID: > Apple only offers one emacs, the one that ships with Mac OS X, unless Which was great until tiger - the tiger version has painful curses-related bugs, and since it only works inside a terminal (xterm, Terminal.app) this is a problem. > Emacsen? Yes. Debian uses the term specifically, in the "packaging that applies to multiple emacsen" (common byte-compiling hooks and such.) http://home.att.ne.jp/alpha/z123/emacs-mac-e.html is the one I've been using, also built pretty closely from CVS (it even thinks it is a 22.x emacs now :) and has cool things like do-applescript. There's also an emacs in fink, if you want one with terminal + X11 support instead of Carbon. From fghorow.11707581 at bloglines.com Thu Jun 16 03:08:43 2005 From: fghorow.11707581 at bloglines.com (fghorow.11707581@bloglines.com) Date: 16 Jun 2005 01:08:43 -0000 Subject: [Pythonmac-SIG] what's the plural of Message-ID: <1118884123.2710893669.3787.sendItem@bloglines.com> --- Charles Hartman Mac version". There seem to be at least two, maybe more, even just > from Apple. Can anyone give me the thumbnail version of why I should > get one or another? > > Charles Hartman > As others have opined, "emacsen" seems to be in common usage. Others have mentioned GNU emacs in various configurations (including one compiled for Carbon). I'd just like to point out that Andrew Choi (who did(?)/was involved in(?) the original port of GNU Emacs to Carbon has since retired from OSX GNU Emacs maintainance role, and is now completing a port of XEmacs to Carbon. In plain English, this means that XEmacs runs on OSX natively, without needing to run X11 (as in the fink version of XEmacs). N.B. You need to compile from source, but Andrew's instructions are excellent. Hope this helps someone else. (As to why you'd choose between GNU Emacs and XEmacs, that's a well known and aged fork. Google for JWZ's opinion on the subject. In other words, it's a religious war...) From charles.hartman at conncoll.edu Thu Jun 16 03:09:16 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Wed, 15 Jun 2005 21:09:16 -0400 Subject: [Pythonmac-SIG] what's the plural of "Emacs"? In-Reply-To: References: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> Message-ID: I was wondering about the ones in http://www.apple.com/downloads/macosx/ I see "Carbon Emacs", "Emacs on Aqua 8.0-rc3", "AquaMacs 0.9.1" . . . Charles Hartman On Jun 15, 2005, at 6:50 PM, eichin at metacarta.com wrote: >> Apple only offers one emacs, the one that ships with Mac OS X, unless >> > > Which was great until tiger - the tiger version has painful > curses-related bugs, and since it only works inside a terminal (xterm, > Terminal.app) this is a problem. > > >> Emacsen? >> > > Yes. Debian uses the term specifically, in the "packaging that > applies to multiple emacsen" (common byte-compiling hooks and such.) > > http://home.att.ne.jp/alpha/z123/emacs-mac-e.html > > is the one I've been using, also built pretty closely from CVS (it > even thinks it is a 22.x emacs now :) and has cool things like > do-applescript. > > There's also an emacs in fink, if you want one with terminal + X11 > support instead of Carbon. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From skip at pobox.com Thu Jun 16 03:40:36 2005 From: skip at pobox.com (Skip Montanaro) Date: Wed, 15 Jun 2005 20:40:36 -0500 Subject: [Pythonmac-SIG] what's the plural of "Emacs"? In-Reply-To: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> References: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> Message-ID: <17072.55444.933992.922126@montanaro.dyndns.org> Bob> I've heard that some people are happy with the Carbonized GNU Emacs Bob> (I think it can be compiled from CVS, but there are various Bob> binaries available), and Kevin Walzer is working on an AquaMacs Bob> distribution, Bob> which I've heard mixed things about. My understanding (completely second-hand, and from the XEmacs gang, no less) is that the guy that Carbonized (Carbonified?) GNU Emacs got disillusioned with the GNU folk. There are enough Mac/GNU Emacs people to keep that running though, so it should be a reasonable option. There is a Carbon patch for XEmacs (contributed by the same guy) that's available as a a branch on the XEmacs CVS repository. Skip From kquirk at solidworks.com Thu Jun 16 04:44:05 2005 From: kquirk at solidworks.com (Kent Quirk) Date: Wed, 15 Jun 2005 22:44:05 -0400 Subject: [Pythonmac-SIG] Newbie....(for now) Message-ID: The easiest way to know if you have a package is to try to import it. Don't forget that Python has a command-line interpreter. Just run it and type "import SciPy" and see if it works! If you want to learn idiomatic Python one of the best places to go is the Python Cookbook. I'd recommend buying the book (2nd edition), although the recipes are available online at: http://aspn.activestate.com/ASPN/Python/Cookbook/ By your comment about "not OS X specific" I'm guessing that you want to build Mac GUI apps. But if you've never done application programming before with a GUI API, you might have trouble getting into it from Python. There are several Python tools for building GUIs, there's no clear standard, and they all tend to assume you already know how to build GUIs. I'm not aware of a book that attempts to do much for people new to the concepts. For example, PyObjC will let you do pretty much anything you can do on a Mac in Cocoa, without writing a line of Objective C. But it's a "bridge" to ObjC -- you really have to be able to read and understand Objective C and Cocoa to use it. The standard Python GUI library is tkinter, but it's clunky, limited, and makes apps that look pretty much only like tkinter apps. Having not yet used wxPython, I'm not sure how "native" its apps look, but people seem to like its power. Good luck! Kent Robert H wrote: >I've been writing PHP web apps for about 3 years now and I took one >JAVA course over that time. >I'm looking to get into "real" programming and I've chosen Python as >my intro to it. >I"ve installed the framework build of 2.4.1 on my Tiger install and >i've tried to read a lot of documentation. >As with most help it is too advanced for where I am right now or it >isn't OS X specific enough. So I'm going to try to turn here.... >Question1: >When you install something like SciPy.py how do you know if you have >the dependents that you need. >Is there a way to list installed packages? I looked at package >manager and it just doesn't seem mature. Maybe I'm just using it wrong. >Question2: >Where are the packages installed? >Question3: >Are there a good example of Python programs on a site somewhere? From sw at wordtech-software.com Thu Jun 16 04:44:09 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Wed, 15 Jun 2005 22:44:09 -0400 Subject: [Pythonmac-SIG] Aquamacs Message-ID: <42B0E779.6030402@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Charles, There are indeed various versions of Emacs out there for OS X. You can't tell the players without a scorecard. Here's the rundown, based on what's available at http://www.apple.com/downloads/macosx/unix_open_source/ and elsewhere: Carbon Emacs Package June '05: As far as I can tell, a well-maintained build of Emacs from CVS, with the standard Emacs interface. It seems to be released fairly regularly. Emacs-on-Aqua: This is a Cocoa binding of Emacs, derived from the old NeXT port of Emacs. It has a nice Aqua look and feel (unlike standard Carbon Emacs). Its main drawback is that it's more than a full version behind current Emacs (20.x, not 22.x). Development on it has just begun again after being dormant for a couple of years (i.e. it was last released for Jaguar). Yaced (Yet Another Carbon Emacs Distribution, at http://yaced.sourceforge.net): Pretty similar to Carbon Emacs Package above, with some customizations geared to making it a good editing environment for LaTeX. The maintainer, Norm Gall, also packages AucTeX. Aquamacs, which I'm working on with David Reitter: This is a more radical revision of Emacs: it overrides a lot of the standard Emacs interface conventions, keyboard shortcuts, etc. and replaces them with standard Aqua keymappings. i.e., Apple-C is the preferred method to copy text. This is based on Carbon Emacs. I like the approach that Aquamacs uses because I no longer have to choose between Emacs' power and BBEdit/Textwrangler's ease of use. If you prefer standard Emacs, Aquamacs will probably drive you crazy. There are probably other builds that I'm not aware of, but these are the ones that seem to be most popular. Let me know if you have other questions. - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCsOQGJmdQs+6YVcoRAh6aAKCEpNAdyuJ/h9cjy+MhuLAVjrHWlQCdEAoH LrGOprXPdApArcDD6LTd5d4= =Lstc -----END PGP SIGNATURE----- From mwh at python.net Thu Jun 16 11:16:28 2005 From: mwh at python.net (Michael Hudson) Date: Thu, 16 Jun 2005 10:16:28 +0100 Subject: [Pythonmac-SIG] what's the plural of "Emacs"? In-Reply-To: (Charles Hartman's message of "Wed, 15 Jun 2005 21:09:16 -0400") References: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> Message-ID: <2m8y1abr0z.fsf@starship.python.net> Charles Hartman writes: > I was wondering about the ones in > http://www.apple.com/downloads/macosx/ > I see "Carbon Emacs", "Emacs on Aqua 8.0-rc3", "AquaMacs 0.9.1" . . . I think I use the Carbon Emacs from that selection. It works well, but needs tweaking on a non-Japanese system (very easy, just deleting a couple of files, but a bit scary if you didn't know this). Cheers, mwh -- Need to Know is usually an interesting UK digest of things that happened last week or might happen next week. [...] This week, nothing happened, and we don't care. -- NTK Now, 2000-12-29, http://www.ntk.net/ From moehl at akaflieg.extern.tu-berlin.de Thu Jun 16 11:22:25 2005 From: moehl at akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Thu, 16 Jun 2005 11:22:25 +0200 (CEST) Subject: [Pythonmac-SIG] what's the plural of "Emacs"? In-Reply-To: <2m8y1abr0z.fsf@starship.python.net> References: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> <2m8y1abr0z.fsf@starship.python.net> Message-ID: It could be that you just have to change the preferred order of languages for your system. I had a problem with Safari rendering some web pages in japanese until I added english to my system languages. Torsten On Thu, 16 Jun 2005, Michael Hudson wrote: > Charles Hartman writes: > > > I was wondering about the ones in > > http://www.apple.com/downloads/macosx/ > > I see "Carbon Emacs", "Emacs on Aqua 8.0-rc3", "AquaMacs 0.9.1" . . . > > I think I use the Carbon Emacs from that selection. It works well, > but needs tweaking on a non-Japanese system (very easy, just deleting > a couple of files, but a bit scary if you didn't know this). > > Cheers, > mwh > > -- > Need to Know is usually an interesting UK digest of things that > happened last week or might happen next week. [...] This week, > nothing happened, and we don't care. > -- NTK Now, 2000-12-29, http://www.ntk.net/ > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > From Henning.Ramm at mediapro-gmbh.de Thu Jun 16 12:17:05 2005 From: Henning.Ramm at mediapro-gmbh.de (Henning.Ramm@mediapro-gmbh.de) Date: Thu, 16 Jun 2005 12:17:05 +0200 Subject: [Pythonmac-SIG] Newbie....(for now) Message-ID: >Having not yet used wxPython, I'm not sure how "native" its apps look, >but people seem to like its power. I very much like it on WinXP, and it works (and looks good) on OSX, but some advanced widgets don't work. see www.wxpython.org Best regards, Henning Hraban Ramm S?dkurier Medienhaus / MediaPro Support/Admin/Development Dept. From mwh at python.net Thu Jun 16 12:43:21 2005 From: mwh at python.net (Michael Hudson) Date: Thu, 16 Jun 2005 11:43:21 +0100 Subject: [Pythonmac-SIG] what's the plural of "Emacs"? In-Reply-To: (Torsten Sadowski's message of "Thu, 16 Jun 2005 11:22:25 +0200 (CEST)") References: <8DF4A68A-B5AA-4529-87ED-E7B7B99B2B72@redivi.com> <2m8y1abr0z.fsf@starship.python.net> Message-ID: <2mzmtqa8fq.fsf@starship.python.net> Torsten Sadowski writes: > It could be that you just have to change the preferred order of languages > for your system. No, see this page: http://www.emacswiki.org/cgi-bin/emacs-en/CarbonEmacsPackage > I had a problem with Safari rendering some web pages in japanese > until I added english to my system languages. With respect, this seems deeply unlikely (it was a complaint about not finding some binary in $PATH, IIRC). Cheers, mwh -- Ya, ya, ya, except ... if I were built out of KSR chips, I'd be running at 25 or 50 MHz, and would be wrong about ALMOST EVERYTHING almost ALL THE TIME just due to being a computer! -- Tim Peters, 30 Apr 97 From pecora at anvil.nrl.navy.mil Thu Jun 16 17:09:19 2005 From: pecora at anvil.nrl.navy.mil (Louis Pecora) Date: Thu, 16 Jun 2005 11:09:19 -0400 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? Message-ID: <42B1961F.60206@anvil.nrl.navy.mil> I'd like to use wxPython to open some simple windows and draw/plot figures from data. But learning this apparently nice GUI has been haphazard. I've looked over documention that comes with the installation and it appears incomplete. Suggestions in the docs are to look to the examples and demos, but cheeze there's more there than I ever want to know and in no particular order. I had to scroll through two files of foreign (to me) code to find that self.SetBackgroundColour("WHITE") will make my window background white. Can anyone recommend a source of documentation (preferably indexed)? Or even a listiing of where to find things like defined colors (uppercase, apparently), events? I understand the EVT_PAINT idea, but when/what are they called and what are the possible events I can bind a function to? Thanks for any help or pointers. I know some of you might recommend matplotlib for what I want, but I looked at it and it will not serve my purposes. -- Cheers, Lou Pecora Code 6362 Naval Research Lab Washington, DC 20375 USA Ph: +202-767-6002 email: pecora at anvil.nrl.navy.mil From Larry.A.Meyn at nasa.gov Thu Jun 16 17:58:51 2005 From: Larry.A.Meyn at nasa.gov (Larry Meyn) Date: Thu, 16 Jun 2005 08:58:51 -0700 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1961F.60206@anvil.nrl.navy.mil> References: <42B1961F.60206@anvil.nrl.navy.mil> Message-ID: I feel the same way. However, you might want to look at the floatcanvas module and FloatCanvasDemo.py that come with the wxPython distribution. I've found it a very useful starting point for data plotting scripts, especially if you are interested in cartographic transformations. It utilizes the numeric package to speed up the plotting and manipulation of data and provides a nice GUI right out of the box. Chris Barker is the author and maintainer of this module and I suspect that, like many of us, he doesn't have time to write thorough documentation. Regards, Larry On Jun 16, 2005, at 8:09 AM, Louis Pecora wrote: > I'd like to use wxPython to open some simple windows and draw/plot > figures from data. But learning this apparently nice GUI has been > haphazard. I've looked over documention that comes with the > installation and it appears incomplete. Suggestions in the docs are to > look to the examples and demos, but cheeze there's more there than I > ever want to know and in no particular order. I had to scroll through > two files of foreign (to me) code to find that > self.SetBackgroundColour("WHITE") will make my window background white. > > Can anyone recommend a source of documentation (preferably indexed)? > Or > even a listiing of where to find things like defined colors (uppercase, > apparently), events? I understand the EVT_PAINT idea, but when/what > are > they called and what are the possible events I can bind a function to? > > Thanks for any help or pointers. > > I know some of you might recommend matplotlib for what I want, but I > looked at it and it will not serve my purposes. > > -- > Cheers, > > Lou Pecora > > Code 6362 > Naval Research Lab > Washington, DC 20375 > USA > Ph: +202-767-6002 > email: pecora at anvil.nrl.navy.mil > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > Larry Meyn Aerospace Operations Modeling Branch M/S 210-10 NASA Ames Research Center Moffett Field, CA 94035-1000 E-mail: Larry.A.Meyn at nasa.gov Phone: (650) 604-5038 Fax: (650) 604-0222 E-Fax: (425) 944-5526 sent via e-mail From rogerb at rogerbinns.com Thu Jun 16 18:18:14 2005 From: rogerb at rogerbinns.com (Roger Binns) Date: Thu, 16 Jun 2005 09:18:14 -0700 Subject: [Pythonmac-SIG] Newbie....(for now) References: Message-ID: <006401c5728e$ff5af240$3501a8c0@rogersqyvr14d3> > >Having not yet used wxPython, I'm not sure how "native" its apps look, > >but people seem to like its power. > > I very much like it on WinXP, and it works (and looks good) on OSX, > but some advanced widgets don't work. > see www.wxpython.org After downloading wxPython itself, there is also a demo you can download from the same site. It has a sample of every supported widget including more complex things like printing, drag and drop, clipboard etc. There is also the code used for each sample which you can edit within the demo itself. The demo gives a very good idea of exactly how things look natively and you can run it on all platforms you care about to compare and contrast. Roger From charles.hartman at conncoll.edu Thu Jun 16 18:23:56 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Thu, 16 Jun 2005 12:23:56 -0400 Subject: [Pythonmac-SIG] off-topic! BSD warning?? Message-ID: This has nothing (directly) to do with Python, but I can't find any answer elsewhere, and I'm sure people here know what's up. I'm on OS 10.4.1. When I try to run OnyX or Cocktail (the versions ready for 10.4), I get a fatal error phrased more or less like this: "The BSD Subsystem is not installed". I know BSD was optional in some earlier OS versions, but it's not any more. The standard test (type 'grep' in a Terminal window and look for "command not found" versus the Usage message) says BSD is installed. I even went digging into the 10.4 install disk and found a package for BSD, and ran that installer and restarted. Still the same message! What in the world is going on? Any enlightening much appreciated. Charles Hartman From Chris.Barker at noaa.gov Thu Jun 16 20:24:35 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 16 Jun 2005 11:24:35 -0700 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: References: <42B1961F.60206@anvil.nrl.navy.mil> Message-ID: <42B1C3E3.7030409@noaa.gov> Larry Meyn wrote: > I feel the same way. However, you might want to look at the > floatcanvas module and FloatCanvasDemo.py that come with the wxPython > distribution. I've found it a very useful starting point for data > plotting scripts, especially if you are interested in cartographic > transformations. Thanks for the plug. > Chris Barker is the author and maintainer of this module and I > suspect that, like many of us, he doesn't have time to write thorough > documentation. Exactly. It's all I can do to keep it up to date and add the features I want to add. However, every feature is put into the Demo (which is really a test bed), so if you poke around enough you can find what you want. If you are interested in using FloatCanvas, you should send me a note, and I'll send you the latest version, and I can add you to a low-traffic mailing list for announcements and technical discussion. > On Jun 16, 2005, at 8:09 AM, Louis Pecora wrote: >>I'd like to use wxPython to open some simple windows and draw/plot >>figures from data. I'm curious why you don't think matplotlib will help you here, though perhaps you mean it can't do the job by itself, which makes sense, it's a plotting library, not a GUI toolkit. Matplotlib + wxPython is a potent combination, however. What kind of data are you trying to display, and how do you want it to look? I(we) can help steer you in the right direction. >> I've looked over documention that comes with the >> installation and it appears incomplete. It depends on what you mean by "complete". The reference docs are quite complete, and you now have the choice of the C++ oriented ones (which are very helpful once you get oriented) >>Suggestions in the docs are to >>look to the examples and demos, but cheeze there's more there than I >>ever want to know and in no particular order. I had to scroll through >>two files of foreign (to me) code to find that >>self.SetBackgroundColour("WHITE") will make my window background white. >> >>Can anyone recommend a source of documentation (preferably indexed)? The reference manual is your best bet, though it's not indexed. What I do is grep all the html files, and usually find what I want. One of the tricks is that as an OO library, most of the methods available for a widget are inherited from superclasses, and thus not documented as part of that class. The new Python-spcific docs are better in this regard, but I find them a little harder to navigate. http://www.wxpython.org/docs/api/ >>Or >>even a listiing of where to find things like defined colors (uppercase, >>apparently), Actually, any case will do, and here is how you get the complete list. >>> import wx.lib.colourdb >>> wx.lib.colourdb.getColourList() Honestly, I don't remember how I found out how to do this, but it's in the FloatCanvasDemo. However, I jsut looked, and in the demo, under miscellaneous, there is the ColourDB demo. Poking through the demo to find a particular thing can be frustrating, but it's not wasted time. While looking for what you want, you will learn a lot about what is possible. events? I understand the EVT_PAINT idea, but when/what >>are >>they called and what are the possible events I can bind a function to? Look in the reference docs, under topic overview, Event Handling: http://www.wxpython.org/onlinedocs.php For that matter, quickly scanning all the topic overviews is a good way to get a handle on how wx works. If you don't have the demo running, get it running. Everything is in there, and it's reasonably organized. The other source is the Wiki, there are a lot of good examples in there. I'm also enclosing, as a public service, my collection of wxPython samples. They have been written over a couple of years, and developed to either test something I was trying go do, or to help answer a question on the mailing list. I HAVE NOT tested them all with recent versions of wxPython, but see what you can get out of them. I know that more samples is NOT what you're looking for, but hey really are a pretty good way to learn. What you really want is a nice book, and there is one in the works that is scheduled to be published "soon", which is course means that it's not out yet. Take heart, once you get the feel of it, all these references, examples and demos get much easier to use. And be sure make use of the wxpython-users mailing list, we're very friendly and helpful there. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -------------- next part -------------- A non-text attachment was scrubbed... Name: wxPythonDemos.zip Type: application/zip Size: 62116 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050616/a2a3bf34/wxPythonDemos-0001.zip From pecora at anvil.nrl.navy.mil Thu Jun 16 21:16:44 2005 From: pecora at anvil.nrl.navy.mil (Louis Pecora) Date: Thu, 16 Jun 2005 15:16:44 -0400 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1C3E3.7030409@noaa.gov> References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> Message-ID: <42B1D01C.4060905@anvil.nrl.navy.mil> Chris Barker wrote: > Larry Meyn wrote: > >> I feel the same way. However, you might want to look at the >> floatcanvas module and FloatCanvasDemo.py that come with the >> wxPython distribution. I've found it a very useful starting point >> for data plotting scripts, especially if you are interested in >> cartographic transformations. > > > If you are interested in using FloatCanvas, you should send me a note, > and I'll send you the latest version, and I can add you to a > low-traffic mailing list for announcements and technical discussion. Thanks for the offer. I'll take you up on it. >>> I'd like to use wxPython to open some simple windows and draw/plot >>> figures from data. >> > > I'm curious why you don't think matplotlib will help you here, though > perhaps you mean it can't do the job by itself, which makes sense, > it's a plotting library, not a GUI toolkit. Matplotlib + wxPython is a > potent combination, however. Because matplotlib presents the plot at the end of the program. My programs are written to be interactive and continue running, i.e. calculate something or massage data, plot the result, close the plot window, do more stuff, check another plot, or other options not in any particular order. > What kind of data are you trying to display, and how do you want it to > look? I(we) can help steer you in the right direction. I just need simple plotting. Example, feed a function a table of values over a common x-axis, plot them all in a window maybe each a different color and/or line thickness. Nothting fancy. But gotta keep that program going when the window is closed. Possible problem: I use standard I/O to "talk" to the program (e.g. print and readline) in a terminal window. I don't have time for a fancier GUI and I really don't need one. >>> I've looked over documention that comes with the >>> installation and it appears incomplete. >> > It depends on what you mean by "complete". The reference docs are > quite complete, and you now have the choice of the C++ oriented ones > (which are very helpful once you get oriented) Incomplete means I can't find a list of classes, colors, event defintions, etc. It's just random hunting. >>> look to the examples and demos, but cheeze there's more there than I >>> ever want to know and in no particular order. I had to scroll through >>> two files of foreign (to me) code to find that >>> self.SetBackgroundColour("WHITE") will make my window background white. >>> >>> Can anyone recommend a source of documentation (preferably indexed)? >> > > The reference manual is your best bet, though it's not indexed. What I > do is grep all the html files, and usually find what I want. > > One of the tricks is that as an OO library, most of the methods > available for a widget are inherited from superclasses, and thus not > documented as part of that class. The new Python-spcific docs are > better in this regard, but I find them a little harder to navigate. > > http://www.wxpython.org/docs/api/ Will check it out. Thanks. >>> Or >>> even a listiing of where to find things like defined colors (uppercase, >>> apparently), >> > > Actually, any case will do, and here is how you get the complete list. > > >>> import wx.lib.colourdb > >>> wx.lib.colourdb.getColourList() > > Honestly, I don't remember how I found out how to do this, but it's in > the FloatCanvasDemo. However, I jsut looked, and in the demo, under > miscellaneous, there is the ColourDB demo. > > Poking through the demo to find a particular thing can be frustrating, > but it's not wasted time. While looking for what you want, you will > learn a lot about what is possible. > > events? I understand the EVT_PAINT idea, but when/what > >>> are >>> they called and what are the possible events I can bind a function to? >> > > Look in the reference docs, under topic overview, Event Handling: > > http://www.wxpython.org/onlinedocs.php > > For that matter, quickly scanning all the topic overviews is a good > way to get a handle on how wx works. > > If you don't have the demo running, get it running. Everything is in > there, and it's reasonably organized. The other source is the Wiki, > there are a lot of good examples in there. I did get the demo running. It is quite nice and gives me an idea of what this wxPython can do. Impressive and it looks Mac-like (not a big deal for me, but I understand not all packages accomplish that). Chris, Thanks for your help and encouragement. Back to the drawing board. -- Cheers, Lou Pecora Code 6362 Naval Research Lab Washington, DC 20375 USA Ph: +202-767-6002 email: pecora at anvil.nrl.navy.mil From rkern at ucsd.edu Thu Jun 16 21:35:48 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 16 Jun 2005 12:35:48 -0700 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1D01C.4060905@anvil.nrl.navy.mil> References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> <42B1D01C.4060905@anvil.nrl.navy.mil> Message-ID: <42B1D494.5020401@ucsd.edu> Louis Pecora wrote: > Because matplotlib presents the plot at the end of the program. My > programs are written to be interactive and continue running, i.e. > calculate something or massage data, plot the result, close the plot > window, do more stuff, check another plot, or other options not in any > particular order. I do interactive plotting with matplotlib all the time exactly as you describe. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From Chris.Barker at noaa.gov Thu Jun 16 21:53:41 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 16 Jun 2005 12:53:41 -0700 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1D494.5020401@ucsd.edu> References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> <42B1D01C.4060905@anvil.nrl.navy.mil> <42B1D494.5020401@ucsd.edu> Message-ID: <42B1D8C5.5010806@noaa.gov> Robert Kern wrote: > I do interactive plotting with matplotlib all the time exactly as you > describe. Robert, do you have any small demo programs that do this? I think it would be a good thing to have out there. Perhaps the embedded_in_wx examples already do this, but I haven't checked them out. At the moment I primarily use matplotlib for generating PNGs for the web. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 pecora at anvil.nrl.navy.mil Thu Jun 16 22:03:08 2005 From: pecora at anvil.nrl.navy.mil (Louis Pecora) Date: Thu, 16 Jun 2005 16:03:08 -0400 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1D494.5020401@ucsd.edu> References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> <42B1D01C.4060905@anvil.nrl.navy.mil> <42B1D494.5020401@ucsd.edu> Message-ID: <42B1DAFC.2020902@anvil.nrl.navy.mil> Robert Kern wrote: >Louis Pecora wrote: > > > >>Because matplotlib presents the plot at the end of the program. My >>programs are written to be interactive and continue running, i.e. >>calculate something or massage data, plot the result, close the plot >>window, do more stuff, check another plot, or other options not in any >>particular order. >> >> > >I do interactive plotting with matplotlib all the time exactly as you >describe. > > Hi Robert, I thought that couldn't be done, but I'd be happy if it could. How do you do it? -- Cheers, Lou Pecora Code 6362 Naval Research Lab Washington, DC 20375 USA Ph: +202-767-6002 email: pecora at anvil.nrl.navy.mil From Chris.Barker at noaa.gov Thu Jun 16 22:23:46 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 16 Jun 2005 13:23:46 -0700 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1D01C.4060905@anvil.nrl.navy.mil> References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> <42B1D01C.4060905@anvil.nrl.navy.mil> Message-ID: <42B1DFD2.6060903@noaa.gov> Louis Pecora wrote: > Chris Barker wrote: >> If you are interested in using FloatCanvas, you should send me a note, >> and I'll send you the latest version, and I can add you to a >> low-traffic mailing list for announcements and technical discussion. > > Thanks for the offer. I'll take you up on it. I've added you to the list, and I'll send you the latest in a separate email. >> I'm curious why you don't think matplotlib will help you here, though >> perhaps you mean it can't do the job by itself, which makes sense, >> it's a plotting library, not a GUI toolkit. Matplotlib + wxPython is a >> potent combination, however. > > Because matplotlib presents the plot at the end of the program. No it doesn't. At least it doesn't have to. That is the one fault I have with matplotlib, the docs are so focused on how you can use it like Matlab, that new users don't realize what a rich interface it provides for real OO programming. > My > programs are written to be interactive and continue running, i.e. > calculate something or massage data, plot the result, close the plot > window, do more stuff, check another plot, or other options not in any > particular order. matplotlib is fully capable of doing all that. Look in the docs and mailing list for "embedded in wx" and "OO interface" and things like that. The core issue is that you want your program to manage the plotting window, not pylab. That's what embedded in wx means. >> What kind of data are you trying to display, and how do you want it to >> look? I(we) can help steer you in the right direction. > > I just need simple plotting. Example, feed a function a table of > values over a common x-axis, plot them all in a window maybe each a > different color and/or line thickness. Nothting fancy. There is also wx.lib.plot, which can do this. However, we all know how these things work out: you start with simple needs, then suddenly you need a log plot or something. I'd take the time to figure out matplotlib. Much as I'd like to have you as a FloatCanvas user/bug reporter/ contributer, I think matplotlib is probably what you need. > But gotta keep > that program going when the window is closed. Possible problem: I use > standard I/O to "talk" to the program (e.g. print and readline) in a > terminal window. I don't have time for a fancier GUI and I really don't > need one. This is a bit of a problem. In general, with wxPython, when you start the mainloop, the python interpreter halts and waits for it to finish before continuing, so it's hard to mingle wxPython and the command line. A few options to address this: 1) ipython 2) PyCrust 3) GUI_thread (or something, with scipy. I think that may be a sleeping project, however) Also, in the pile of demos I sent is one called "ProceduralTest.py" which shows how you can pop up a bunch of wxPython dialogs in a procedural program (as opposed to an event-driven one). Perhaps you could pop up matplotlib windows the same way. I've enclosed that demo, with a raw_input() call, to test it. It seems to work OK, except that focus doesn't return to the terminal window properly. > Incomplete means I can't find a list of classes, colors, event > defintions, etc. It's just random hunting. Well, it's not all that well indexed, but it's there. Have you found the "Alphabetical Class Index" > Chris, Thanks for your help and encouragement. Back to the drawing > board. You're welcome. I've found myself to be very productive in wxPython, so I like to spread the word. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -------------- next part -------------- A non-text attachment was scrubbed... Name: ProceduralTest.py Type: text/x-python Size: 2222 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050616/5a88791d/ProceduralTest.py From Chris.Barker at noaa.gov Thu Jun 16 22:46:24 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 16 Jun 2005 13:46:24 -0700 Subject: [Pythonmac-SIG] How do you install TkInter for python 2.4 (on 10.3) Message-ID: <42B1E520.7090405@noaa.gov> Hi all, Is there a canonical way to install Tkinter on OS-X with 2.4.1? I had installed it for use with Apple's 2.3, by installing the BI version of TCL/TK, then using Packman to install Tkinter.This worked, but I don't think there is are any Packages for 2.4. However, now that I've installed 2.4.1, Tkinter seems to be there, but I have no idea how. Is it part of the standard install now? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 bob at redivi.com Thu Jun 16 23:02:35 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 16 Jun 2005 17:02:35 -0400 Subject: [Pythonmac-SIG] How do you install TkInter for python 2.4 (on 10.3) In-Reply-To: <42B1E520.7090405@noaa.gov> References: <42B1E520.7090405@noaa.gov> Message-ID: On Jun 16, 2005, at 4:46 PM, Chris Barker wrote: > Is there a canonical way to install Tkinter on OS-X with 2.4.1? > > I had installed it for use with Apple's 2.3, by installing the BI > version of TCL/TK, then using Packman to install Tkinter.This worked, > but I don't think there is are any Packages for 2.4. However, now that > I've installed 2.4.1, Tkinter seems to be there, but I have no idea > how. > Is it part of the standard install now? Yes, from : Unlike typical builds, this one has all the stock goodies: readline 5.0.005 (static) BerkeleyDB 4.3.27 (static) waste (static) Tcl/Tk Aqua 8.4.9 (dynamic - you'll need TclTkAqua to use Tkinter if using on Mac OS X 10.3) -bob From Chris.Barker at noaa.gov Thu Jun 16 23:17:30 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 16 Jun 2005 14:17:30 -0700 Subject: [Pythonmac-SIG] How do you install TkInter for python 2.4 (on 10.3) In-Reply-To: References: <42B1E520.7090405@noaa.gov> Message-ID: <42B1EC6A.1050807@noaa.gov> Thanks Bob. Bob Ippolito wrote: > On Jun 16, 2005, at 4:46 PM, Chris Barker wrote: >>Is it part of the standard install now? > > > Yes, from : > Unlike typical builds, this one has all the stock goodies: > > readline 5.0.005 (static) > BerkeleyDB 4.3.27 (static) > waste (static) > Tcl/Tk Aqua 8.4.9 (dynamic - you'll need TclTkAqua to use Tkinter if > using on Mac OS X 10.3) Does that mean that TclTkAqua comes with 10.4 ? I'd still like to know why you haven't put this on pythonmac.org . I'm a big believer in one-stop shopping. I'm writing up instructions for building matplotlib, so I wanted to know what to tell people that wanted matpotlib to work with TK. I'll be sending you new matplotlib installers soon, one for 2.3.0, and one for 2.4 (built on 10.3) -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 marcus.h.mendenhall at vanderbilt.edu Thu Jun 16 23:26:05 2005 From: marcus.h.mendenhall at vanderbilt.edu (Marcus Mendenhall) Date: Thu, 16 Jun 2005 16:26:05 -0500 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: References: Message-ID: <41F3E080-478B-4CC4-B036-5B38619F4E87@vanderbilt.edu> Louis: To take you on an altogether different tack for plotting scientific data sets in a nice interactive window, have you tried xmgrace and the graceplot package, which allows you to easily send data from a python program to xmgrace? Once the data have been sent, the formatting of the graph can be nicely set with the xmgrace GUI graph tools, or loaded from a pre-saved grace parameter file. I use this combination quite a bit, and it is a fast, easy way to get from python to publication-quality output, or just to quick & dirty graphs. Marcus Mendenhall Vanderbilt University FEL Center From rkern at ucsd.edu Thu Jun 16 23:27:44 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 16 Jun 2005 14:27:44 -0700 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1D8C5.5010806@noaa.gov> References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> <42B1D01C.4060905@anvil.nrl.navy.mil> <42B1D494.5020401@ucsd.edu> <42B1D8C5.5010806@noaa.gov> Message-ID: <42B1EED0.4040401@ucsd.edu> Chris Barker wrote: > Robert Kern wrote: > >> I do interactive plotting with matplotlib all the time exactly as you >> describe. > > Robert, do you have any small demo programs that do this? I think it > would be a good thing to have out there. Perhaps the embedded_in_wx > examples already do this, but I haven't checked them out. At the moment > I primarily use matplotlib for generating PNGs for the web. Not particularly. I use ipython in pylab mode. Louis's original request ("to open some simple windows and draw/plot figures from data") fits matplotlib's interactive mode particularly well. Unfortunately, it doesn't make for good examples. The best thing to do is to install ipython and run "ipython -pylab" and play around a bit. The important bit, of course, is ipython's GUI thread management. PyCrust also works (although you give up on ipython's other magnificent goodies). scipy's gui_thread might also work, but it has been obsoleted by ipython. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From bob at redivi.com Thu Jun 16 23:29:19 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 16 Jun 2005 17:29:19 -0400 Subject: [Pythonmac-SIG] How do you install TkInter for python 2.4 (on 10.3) In-Reply-To: <42B1EC6A.1050807@noaa.gov> References: <42B1E520.7090405@noaa.gov> <42B1EC6A.1050807@noaa.gov> Message-ID: <24ADE346-7B06-4737-BA8D-C55EC3A118C8@redivi.com> On Jun 16, 2005, at 5:17 PM, Chris Barker wrote: > Thanks Bob. > > Bob Ippolito wrote: > >> On Jun 16, 2005, at 4:46 PM, Chris Barker wrote: >> > > >>> Is it part of the standard install now? >>> >> >> >> Yes, from : >> Unlike typical builds, this one has all the stock goodies: >> >> readline 5.0.005 (static) >> BerkeleyDB 4.3.27 (static) >> waste (static) >> Tcl/Tk Aqua 8.4.9 (dynamic - you'll need TclTkAqua to use Tkinter if >> using on Mac OS X 10.3) >> > > Does that mean that TclTkAqua comes with 10.4 ? Yes. > I'd still like to know why you haven't put this on pythonmac.org . > I'm a > big believer in one-stop shopping. Well, is generated automatically from and currently contains only .mpkg installers for packages.. I haven't had the time to decide on how I'd like to reorganize the page, let alone actually do it. > I'm writing up instructions for building matplotlib, so I wanted to > know > what to tell people that wanted matpotlib to work with TK. > > I'll be sending you new matplotlib installers soon, one for 2.3.0, and > one for 2.4 (built on 10.3) Excellent. -bob From rkern at ucsd.edu Thu Jun 16 23:38:56 2005 From: rkern at ucsd.edu (Robert Kern) Date: Thu, 16 Jun 2005 14:38:56 -0700 Subject: [Pythonmac-SIG] How do you install TkInter for python 2.4 (on 10.3) In-Reply-To: <42B1EC6A.1050807@noaa.gov> References: <42B1E520.7090405@noaa.gov> <42B1EC6A.1050807@noaa.gov> Message-ID: <42B1F170.2060406@ucsd.edu> Chris Barker wrote: > Thanks Bob. > > Bob Ippolito wrote: > >>On Jun 16, 2005, at 4:46 PM, Chris Barker wrote: > >>>Is it part of the standard install now? >> >>Yes, from : >>Unlike typical builds, this one has all the stock goodies: >> >>readline 5.0.005 (static) >>BerkeleyDB 4.3.27 (static) >>waste (static) >>Tcl/Tk Aqua 8.4.9 (dynamic - you'll need TclTkAqua to use Tkinter if >>using on Mac OS X 10.3) > > Does that mean that TclTkAqua comes with 10.4 ? Yes. [~] kern$ ls -d /System/Library/Frameworks/{Tcl,Tk}.framework/ /System/Library/Frameworks/Tcl.framework/ /System/Library/Frameworks/Tk.framework/ > I'd still like to know why you haven't put this on pythonmac.org . I'm a > big believer in one-stop shopping. > > I'm writing up instructions for building matplotlib, so I wanted to know > what to tell people that wanted matpotlib to work with TK. > > I'll be sending you new matplotlib installers soon, one for 2.3.0, and > one for 2.4 (built on 10.3) I have had problems with matplotlib/Tk/Python2.4 on Tiger with both the Apple-installed frameworks and freshly downloaded ones. Python freezes for a long time (I haven't timed it; maybe for a half-hour?) and then drops a nice crash window with a stack trace in the Tcl internals. I haven't been able to track down the problem, but it is matplotlib-specific. I recommend wxPython 2.6.1 on Tiger for matplotlib. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From Chris.Barker at noaa.gov Thu Jun 16 23:50:59 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 16 Jun 2005 14:50:59 -0700 Subject: [Pythonmac-SIG] How do you install TkInter for python 2.4 (on 10.3) In-Reply-To: <42B1F170.2060406@ucsd.edu> References: <42B1E520.7090405@noaa.gov> <42B1EC6A.1050807@noaa.gov> <42B1F170.2060406@ucsd.edu> Message-ID: <42B1F443.1020005@noaa.gov> Robert Kern wrote: > I have had problems with matplotlib/Tk/Python2.4 on Tiger with both the > Apple-installed frameworks and freshly downloaded ones. > it is > matplotlib-specific. I recommend wxPython 2.6.1 on Tiger for matplotlib. Thanks for the heads up! Personally, I don't use TK anyway, and I don't have Tiger yet. I'm just trying to build installers for other folks, so I thought I'd put TK support in there. I've got something odd with the 2.4 build now, so I'll see what happens. It's not a TK thing however. I understand someone is working on a Cocoa (I'm assuming PyObjC) back end. That will then be the way to go. By the way, my impression was that Lou was looking for a way to run fairly simple programs with plotting, not interactive use. Interactive use is well documented for matplotlib, it's the "embedding it in your program" stuff that's a little hidden. Also, there's been some discussion on the mpl list about what the "standard" way to build mpl on OS-X should be, with regard to libfreetype and libpng. I'd like your thoughts on that. (or anyone else on this list's thoughts) -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 kevino at tulane.edu Fri Jun 17 00:29:13 2005 From: kevino at tulane.edu (Kevin Ollivier) Date: Thu, 16 Jun 2005 15:29:13 -0700 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1C3E3.7030409@noaa.gov> References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> Message-ID: <6D85C704-B4D0-4D10-8476-75C1C12C61B8@tulane.edu> Hi Chris, On Jun 16, 2005, at 11:24 AM, Chris Barker wrote: [snip] > > The reference manual is your best bet, though it's not indexed. > What I do is grep all the html files, and usually find what I want. > > One of the tricks is that as an OO library, most of the methods > available for a widget are inherited from superclasses, and thus > not documented as part of that class. The new Python-spcific docs > are better in this regard, but I find them a little harder to > navigate. > > http://www.wxpython.org/docs/api/ I just wanted to add that Vaclav Slavik has written a program called Documancer that lets you index, search, and make bookmarks for several different documentation formats, and has some nice touches like providing highlighted search results. It even has HTML and Web "providers" so that you can index and search any arbitrary HTML content, even if it's online. It also can index your man and info files along with DevHelp files. (CHM support is in development, too.) IMHO, it's a very useful tool for developers or anyone who wants to organize various references and online documentation sources. You can get it from: http://documancer.sourceforge.net/ I've been working on the Mac port. There's no OS X app bundle yet, but so long as you have the latest wxPython (2.6.1.0) and PyLucene 0.9.3, the Documancer 0.2.6 source release runs fine on Mac, using the WebKit browser for rendering. I hope to have an app bundle later this week or early next week in order to make installing this a truly painless process. :-) Thanks, Kevin From sw at wordtech-software.com Fri Jun 17 06:06:58 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 17 Jun 2005 00:06:58 -0400 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available Message-ID: <42B24C62.6020101@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Boa Constructor is now available for Mac OS X. Boa is a cross-platform Python IDE and wxPython GUI Builder. It offers visual frame creation and manipulation, an object inspector, many views on the source like object browsers, inheritance hierarchies, doc string generated html documentation, an advanced debugger and integrated help. This is the first version of Boa Constructor (O.4.3) to be distributed as a Mac-native application. Boa Constructor requires the installation of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is extremely unstable on earlier versions of Python/wxPython and has not been tested on an earlier version of Mac OS X. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCskxiJmdQs+6YVcoRAmXHAJ43146ihx3YewreeGtrLz5US/jnZwCfUHf4 rr+88Q+W3Uvb0kWVLXxVFE4= =Xc0/ -----END PGP SIGNATURE----- From sw at wordtech-software.com Fri Jun 17 06:10:29 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 17 Jun 2005 00:10:29 -0400 Subject: [Pythonmac-SIG] ANN: Eric3 3.7 available for Mac OS X Message-ID: <42B24D35.1040301@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have assembled a package installer of the latest version (3.7) of Eric3, the Python IDE written in PyQt, for Mac OS X. To download, see http://www.wordtech-software.com/pyqt-mac.html This version will overwrite the version of Eric 3 that is included with the larger PyQt-Mac binary installer for OS X 10.4 ("Tiger"). For this version to function, you must have the entire PyQt-Mac package already installed. Look under "PyQt-Mac-Tiger" at the Sourceforge page to find the Eric 3 3.7 installer. - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCsk00JmdQs+6YVcoRAu31AJ9u7mh09itdaDrOQweGOIwcVX6y9QCcD0dX eEBSnvbWcFTCBmex+gWuT9I= =DMTk -----END PGP SIGNATURE----- From piet at cs.uu.nl Fri Jun 17 14:45:02 2005 From: piet at cs.uu.nl (Piet van Oostrum) Date: Fri, 17 Jun 2005 14:45:02 +0200 Subject: [Pythonmac-SIG] Where to go for wxPython help & tutorials? In-Reply-To: <42B1C3E3.7030409@noaa.gov> (Chris Barker's message of "Thu, 16 Jun 2005 11:24:35 -0700") References: <42B1961F.60206@anvil.nrl.navy.mil> <42B1C3E3.7030409@noaa.gov> Message-ID: >>>>> "Chris Barker" (CB) wrote: >CB> One of the tricks is that as an OO library, most of the methods available >CB> for a widget are inherited from superclasses, and thus not documented as >CB> part of that class. The new Python-spcific docs are better in this regard, >CB> but I find them a little harder to navigate. >CB> http://www.wxpython.org/docs/api/ There is also a HOWTO at http://www.wxpython.org/docs/howto However, the example used there contains a few lines like: f=open(self.dirname+'\\'+self.filename,'r') which is pathetic (the \\). It should use os.path.join instead. -- Piet van Oostrum URL: http://www.cs.uu.nl/~piet [PGP] Private email: piet at vanoostrum.org From sw at wordtech-software.com Fri Jun 17 15:42:48 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 17 Jun 2005 09:42:48 -0400 Subject: [Pythonmac-SIG] [wxPython-mac] ANN: Boa Constructor for OS X available In-Reply-To: <42B26D74.1090001@gmail.com> References: <42B24C62.6020101@wordtech-software.com> <42B26D74.1090001@gmail.com> Message-ID: <42B2D358.60106@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 D'oh! http://www.wordtech-software.com/boa.html Sorry! ebricca wrote: | could you post also the link to download :) | thx | | ernesto | | | Kevin Walzer wrote: | | Boa Constructor is now available for Mac OS X. | | Boa is a cross-platform Python IDE and wxPython GUI Builder. It offers | visual frame creation and manipulation, an object inspector, many views | on the source like object browsers, inheritance hierarchies, doc string | generated html documentation, an advanced debugger and integrated help. | | This is the first version of Boa Constructor (O.4.3) to be distributed | as a Mac-native application. Boa Constructor requires the installation | of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is extremely | unstable on earlier versions of Python/wxPython and has not been tested | on an earlier version of Mac OS X. |> - --------------------------------------------------------------------- To unsubscribe, e-mail: wxPython-mac-unsubscribe at lists.wxwidgets.org For additional commands, e-mail: wxPython-mac-help at lists.wxwidgets.org |> |> | --------------------------------------------------------------------- | To unsubscribe, e-mail: wxPython-mac-unsubscribe at lists.wxwidgets.org | For additional commands, e-mail: wxPython-mac-help at lists.wxwidgets.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCstNXJmdQs+6YVcoRAkfCAJ9deZQK6KYazCE4EG20b3ujwX48bQCdHBGY ACB3/oxxwvs/y9rTtZXPE2c= =PvwN -----END PGP SIGNATURE----- From Chris.Barker at noaa.gov Fri Jun 17 20:49:41 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 17 Jun 2005 11:49:41 -0700 Subject: [Pythonmac-SIG] python2.4, bdist_mpkg, matplotlib and data dir. Message-ID: <42B31B45.4000800@noaa.gov> Hi all (but mostly Bob) I'm having trouble with bdist_mpkg and the matplotlib data dir. In setup.py, data_files is defined as: [('share/matplotlib', ['fonts/afm/cmex10.afm', 'fonts/afm/cmmi10.afm', 'fonts/afm/cmr10.afm', 'fonts/afm/cmsy10.afm', 'fonts/afm/cmtt10.afm', 'fonts/afm/pagd8a.afm', 'fonts/afm/pagdo8a.afm', ... (there are lots more, but you get the idea). I guess this means that the files listed should all go into "share/matplotlib" If I install with "setup.py install" they end up in: /Library/Frameworks/Python.framework/Versions/2.4/share/matplotlib but when I use bdist_mpkg, they get put in: /usr/local/share/share/matplotlib Note the double "share". As a result, matplotlib can't find them. I think it's looking in /usr/local/share/matplotlib without the double share. so, two questions: why is it putting it in /usr/local at all? I'd prefer that python packages just stay in the python tree. However, that's a taste issue, I suppose. More importantly how can we get rid of the extra "share"? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 bob at redivi.com Fri Jun 17 21:08:08 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 17 Jun 2005 15:08:08 -0400 Subject: [Pythonmac-SIG] python2.4, bdist_mpkg, matplotlib and data dir. In-Reply-To: <42B31B45.4000800@noaa.gov> References: <42B31B45.4000800@noaa.gov> Message-ID: <3B4E23DD-72C1-4664-8CA4-3992503AC248@redivi.com> On Jun 17, 2005, at 2:49 PM, Chris Barker wrote: > Hi all (but mostly Bob) > > I'm having trouble with bdist_mpkg and the matplotlib data dir. In > setup.py, data_files is defined as: > > [('share/matplotlib', ['fonts/afm/cmex10.afm', 'fonts/afm/cmmi10.afm', > 'fonts/afm/cmr10.afm', 'fonts/afm/cmsy10.afm', 'fonts/afm/cmtt10.afm', > 'fonts/afm/pagd8a.afm', 'fonts/afm/pagdo8a.afm', > ... > > (there are lots more, but you get the idea). > > I guess this means that the files listed should all go into > "share/matplotlib" > > If I install with "setup.py install" they end up in: > > /Library/Frameworks/Python.framework/Versions/2.4/share/matplotlib > > but when I use bdist_mpkg, they get put in: > > /usr/local/share/share/matplotlib > > Note the double "share". That's probably a bug, but it should probably happen with Python 2.3 also. Can you reproduce there? > As a result, matplotlib can't find them. I think it's looking in > > /usr/local/share/matplotlib > > without the double share. > > so, two questions: why is it putting it in /usr/local at all? I'd > prefer > that python packages just stay in the python tree. However, that's a > taste issue, I suppose. More importantly how can we get rid of the > extra > "share"? For framework builds of Python, bdist_mpkg currently defaults scripts and data into /usr/local instead of in-framework. This is especially important for the Apple framework, but not as much for the others. Using data_files in this manner at all is usually the wrong thing to do anyway. Python packages should really put the files they need into the package, not some semi-random location on the filesystem. -bob From Chris.Barker at noaa.gov Fri Jun 17 21:39:47 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 17 Jun 2005 12:39:47 -0700 Subject: [Pythonmac-SIG] python2.4, bdist_mpkg, matplotlib and data dir. In-Reply-To: <3B4E23DD-72C1-4664-8CA4-3992503AC248@redivi.com> References: <42B31B45.4000800@noaa.gov> <3B4E23DD-72C1-4664-8CA4-3992503AC248@redivi.com> Message-ID: <42B32703.6020003@noaa.gov> Thanks for being so responsive, Bob. Bob Ippolito wrote: >>but when I use bdist_mpkg, they get put in: >> >>/usr/local/share/share/matplotlib >> >>Note the double "share". > > That's probably a bug, but it should probably happen with Python 2.3 > also. Can you reproduce there? Actually, it seems to work fine with 2.3, for example the package I just sent you was built that way. It's possible I've got an older version of Py2App installed in 2.3 than 2.4, however. I've been selecting between them by doing: python2.3 /usr/local/bin/bdist_mpkg and python2.4 /usr/local/bin/bdist_mpkg so they are using the same script, but importing different Py2app modules. on 2.3, the data's getting put inside the Framework, which sounds like the opposite of what you want, as the 2.3 framework is an Apple supplied one. I just checked. In 2.3: py2app.__version__ = '0.1.7' In 2.4: py2app.__version__ = '0.2' I think I'll wait to update until I figure this out, no reason to break 2.3 too! > For framework builds of Python, bdist_mpkg currently defaults scripts > and data into /usr/local instead of in-framework. This is especially > important for the Apple framework, but not as much for the others. I've always had this sort of problem with Linux too. When the vendor supplies a package, but you add non-vendor supplied add ons, where should you put them? On Linux, I've generally tried to put a link inside /usr to somewhere inside /usr/local, so that I could integrate my add ons with the system stuff, without actually putting my stuff in the system directories. I've done this for python stuff and TeX stuff, for example. Apple set this up pretty well by making site-packages a link to /Library...., rather than just putting it in the system directories, like everyone else. perhaps bdist_mpkg could check if the Python is in a system library or not and put stuff in /Library somewhere if so, and inside the Framework if not, or does that get too messy? > Using data_files in this manner at all is usually the wrong thing to > do anyway. Python packages should really put the files they need > into the package, not some semi-random location on the filesystem. You mean inside .../site-packages/matplotlib? Perhaps I'll ask John Hunter what his reasoning is. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 bob at redivi.com Fri Jun 17 21:56:26 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 17 Jun 2005 15:56:26 -0400 Subject: [Pythonmac-SIG] python2.4, bdist_mpkg, matplotlib and data dir. In-Reply-To: <42B32703.6020003@noaa.gov> References: <42B31B45.4000800@noaa.gov> <3B4E23DD-72C1-4664-8CA4-3992503AC248@redivi.com> <42B32703.6020003@noaa.gov> Message-ID: <67699E65-8A31-42E7-9F31-9E6E1195D5C1@redivi.com> On Jun 17, 2005, at 3:39 PM, Chris Barker wrote: > Thanks for being so responsive, Bob. > > Bob Ippolito wrote: > >>> but when I use bdist_mpkg, they get put in: >>> >>> /usr/local/share/share/matplotlib >>> >>> Note the double "share". >>> >> >> That's probably a bug, but it should probably happen with Python 2.3 >> also. Can you reproduce there? >> > > Actually, it seems to work fine with 2.3, for example the package I > just > sent you was built that way. It's possible I've got an older > version of > Py2App installed in 2.3 than 2.4, however. I've been selecting between > them by doing: > > python2.3 /usr/local/bin/bdist_mpkg > and > python2.4 /usr/local/bin/bdist_mpkg > > so they are using the same script, but importing different Py2app > modules. > > on 2.3, the data's getting put inside the Framework, which sounds like > the opposite of what you want, as the 2.3 framework is an Apple > supplied > one. > > I just checked. In 2.3: > > py2app.__version__ = '0.1.7' > > In 2.4: > py2app.__version__ = '0.2' > > I think I'll wait to update until I figure this out, no reason to > break > 2.3 too! > > >> For framework builds of Python, bdist_mpkg currently defaults scripts >> and data into /usr/local instead of in-framework. This is especially >> important for the Apple framework, but not as much for the others. >> > > I've always had this sort of problem with Linux too. When the vendor > supplies a package, but you add non-vendor supplied add ons, where > should you put them? On Linux, I've generally tried to put a link > inside > /usr to somewhere inside /usr/local, so that I could integrate my add > ons with the system stuff, without actually putting my stuff in the > system directories. I've done this for python stuff and TeX stuff, for > example. > > Apple set this up pretty well by making site-packages a link to > /Library...., rather than just putting it in the system directories, > like everyone else. Doing symlinks is harder because that requires replacing even more distutils functionality. I really don't care enough to go through that kinda trouble. Patches accepted. > perhaps bdist_mpkg could check if the Python is in a system library or > not and put stuff in /Library somewhere if so, and inside the > Framework > if not, or does that get too messy? That's what it's doing, except it puts things in /usr/local, not / Library. If it put things in /Library, nobody would ever find it because it's non-standard. This is especially important for incorrect usage of data_files. There is no way for a package to ask "where did my data files get installed?" That is why using data_files is not the right idea for anything but extraneous junk (documentation, examples, etc.). I chose /usr/local because it at least has a chance of being found at runtime; it's pretty common for packages to look there in addition to sys.prefix. Semantically data_files is meaningless, so I couldn't default to some examples or documentation folder under /Developer or wherever (and that would also really punish incorrect usage). The flip side is if the package is using data_files correctly (for examples, docs, etc.) but distutils installs it in-framework, then people would never find it... whereas with /usr/local they have a chance (especially for scripts). Somewhere Finder-navigable would be better (for data_files), but I decided not to do that because there are too many dumb usages of data_files out there to make it worthwhile. >> Using data_files in this manner at all is usually the wrong thing to >> do anyway. Python packages should really put the files they need >> into the package, not some semi-random location on the filesystem. >> > > You mean inside .../site-packages/matplotlib? Perhaps I'll ask John > Hunter what his reasoning is. Yes. It used to be a PITA, but these days there is setuptools (or Python 2.4's distutils) which makes it trivial, so it's likely to be either ignorance or laziness. -bob From trentm at ActiveState.com Sat Jun 18 00:33:03 2005 From: trentm at ActiveState.com (Trent Mick) Date: Fri, 17 Jun 2005 15:33:03 -0700 Subject: [Pythonmac-SIG] ActiveState's OS X Python In-Reply-To: <55F242F3-A3F1-4DB3-9739-305C5333F663@redivi.com> References: <50a15a22c86b6fad22635f691011e4cf@nasa.gov> <58A684AA-F5EE-49EF-9752-7A8BF83A0982@redivi.com> <20050607203001.GA19565@ActiveState.com> <20050608002518.GC27030@ActiveState.com> <55F242F3-A3F1-4DB3-9739-305C5333F663@redivi.com> Message-ID: <20050617223303.GA2561@ActiveState.com> [Bob Ippolito wrote] > Well, there is the license: > > "You may make and give away verbatim copies of this Package for > personal use, or for use within your organization, provided that you > duplicate all of the original copyright notices and associated > disclaimers. You may not distribute copies of this Package, or copies > of packages derived from this Package, to others outside your > organization without specific prior written permission from > ActiveState (although you are encouraged to direct them to sources > from which they may obtain it for themselves)." > > I read this as: > You can't use py2app (cx_Freeze, py2exe, ...) without written > permission. Thanks for bringing this up, and my apologies for taking a while to respond. I wanted to get this right. As I mentioned to you at WWDC our intention with ActivePython is definitely to allow usage of py2app, py2exe, and other wrapping tools. The ActivePython license has been updated to clarify this: http://www.activestate.com/Products/ActivePython/license_agreement.plex ... In addition to the above allowed uses, this license does allow for the redistribution of parts of the Package together with other software code in a wrapped format, including but not limited to a format wrapped with executable generators such as "py2app" or "py2exe". However, if you wish to redistribute the complete Package either as a standalone distribution or in a wrapped format, you must obtain written permission from ActiveState. ActiveState may charge a fee for such license. To obtain permission for redistribution or clarification regarding your particular intended use of the Package, please contact us at: sales at ActiveState.com. ... I'll have a new ActivePython package for OS X out next week with this license update in addition to a few changes so that py2app and ActivePython play more nicely together. Current a py2app build will break looking for the version.plist file in ActivePython's framework install dir. I hope that the license clarification alleviates people's concerns. Trent -- Trent Mick TrentM at ActiveState.com From charles.hartman at conncoll.edu Sat Jun 18 01:52:26 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Fri, 17 Jun 2005 19:52:26 -0400 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available In-Reply-To: <42B24C62.6020101@wordtech-software.com> References: <42B24C62.6020101@wordtech-software.com> Message-ID: <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> The new version is very pretty, and very promising. Unfortunately, it crashes. I started the steps in the Help tutorial -- created a folder, made a new app with a frame -- and pressed the Run button, and the program crashed. Tried again, same thing. Charles Hartman On Jun 17, 2005, at 12:06 AM, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Boa Constructor is now available for Mac OS X. > > Boa is a cross-platform Python IDE and wxPython GUI Builder. It offers > visual frame creation and manipulation, an object inspector, many > views > on the source like object browsers, inheritance hierarchies, doc > string > generated html documentation, an advanced debugger and integrated > help. > > This is the first version of Boa Constructor (O.4.3) to be distributed > as a Mac-native application. Boa Constructor requires the installation > of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is extremely > unstable on earlier versions of Python/wxPython and has not been > tested > on an earlier version of Mac OS X. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFCskxiJmdQs+6YVcoRAmXHAJ43146ihx3YewreeGtrLz5US/jnZwCfUHf4 > rr+88Q+W3Uvb0kWVLXxVFE4= > =Xc0/ > -----END PGP SIGNATURE----- > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From charles.hartman at conncoll.edu Sat Jun 18 02:03:27 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Fri, 17 Jun 2005 20:03:27 -0400 Subject: [Pythonmac-SIG] Aquamacs In-Reply-To: <42B0E779.6030402@wordtech-software.com> References: <42B0E779.6030402@wordtech-software.com> Message-ID: Forgot to thank you for this run-down. Thanks! I guess it depends -- like too much else -- on what I want. Charles Hartman On Jun 15, 2005, at 10:44 PM, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Charles, > > There are indeed various versions of Emacs out there for OS X. You > can't > tell the players without a scorecard. Here's the rundown, based on > what's available at > http://www.apple.com/downloads/macosx/unix_open_source/ and elsewhere: > > Carbon Emacs Package June '05: As far as I can tell, a well-maintained > build of Emacs from CVS, with the standard Emacs interface. It > seems to > be released fairly regularly. > > Emacs-on-Aqua: This is a Cocoa binding of Emacs, derived from the old > NeXT port of Emacs. It has a nice Aqua look and feel (unlike standard > Carbon Emacs). Its main drawback is that it's more than a full version > behind current Emacs (20.x, not 22.x). Development on it has just > begun > again after being dormant for a couple of years (i.e. it was last > released for Jaguar). > > Yaced (Yet Another Carbon Emacs Distribution, at > http://yaced.sourceforge.net): Pretty similar to Carbon Emacs Package > above, with some customizations geared to making it a good editing > environment for LaTeX. The maintainer, Norm Gall, also packages > AucTeX. > > Aquamacs, which I'm working on with David Reitter: This is a more > radical revision of Emacs: it overrides a lot of the standard Emacs > interface conventions, keyboard shortcuts, etc. and replaces them with > standard Aqua keymappings. i.e., Apple-C is the preferred method to > copy > text. This is based on Carbon Emacs. I like the approach that Aquamacs > uses because I no longer have to choose between Emacs' power and > BBEdit/Textwrangler's ease of use. If you prefer standard Emacs, > Aquamacs will probably drive you crazy. > > There are probably other builds that I'm not aware of, but these > are the > ones that seem to be most popular. > > Let me know if you have other questions. > > - -- > Cheers, > > Kevin Walzer, PhD > WordTech Software--Open Source Applications and Packages for OS X > http://www.wordtech-software.com > http://www.kevin-walzer.com > http://www.smallbizmac.com. > mailto:sw at wordtech-software.com > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFCsOQGJmdQs+6YVcoRAh6aAKCEpNAdyuJ/h9cjy+MhuLAVjrHWlQCdEAoH > LrGOprXPdApArcDD6LTd5d4= > =Lstc > -----END PGP SIGNATURE----- > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From sw at wordtech-software.com Sat Jun 18 02:10:08 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 17 Jun 2005 20:10:08 -0400 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available In-Reply-To: <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> References: <42B24C62.6020101@wordtech-software.com> <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> Message-ID: <42B36660.6010102@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What version of wxPython/MacPython are you using? It's *very* unstable under the Apple system Python and wxPython, but has worked fine for me under the latest versions of Py/wxPy. Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com Charles Hartman wrote: | The new version is very pretty, and very promising. Unfortunately, it | crashes. I started the steps in the Help tutorial -- created a folder, | made a new app with a frame -- and pressed the Run button, and the | program crashed. Tried again, same thing. | | Charles Hartman | | On Jun 17, 2005, at 12:06 AM, Kevin Walzer wrote: | | Boa Constructor is now available for Mac OS X. | | Boa is a cross-platform Python IDE and wxPython GUI Builder. It offers | visual frame creation and manipulation, an object inspector, many views | on the source like object browsers, inheritance hierarchies, doc string | generated html documentation, an advanced debugger and integrated help. | | This is the first version of Boa Constructor (O.4.3) to be distributed | as a Mac-native application. Boa Constructor requires the installation | of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is extremely | unstable on earlier versions of Python/wxPython and has not been tested | on an earlier version of Mac OS X. _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG at python.org http://mail.python.org/mailman/listinfo/pythonmac-sig |> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCs2ZgJmdQs+6YVcoRAlVEAJ9z7s4P7BNN1NCS/pmVHGpdu3maSQCffWKI d9Wm0l+xDoiC6EraY1Yk9IM= =c+Jl -----END PGP SIGNATURE----- From charles.hartman at conncoll.edu Sat Jun 18 02:17:52 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Fri, 17 Jun 2005 20:17:52 -0400 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available In-Reply-To: <42B36660.6010102@wordtech-software.com> References: <42B24C62.6020101@wordtech-software.com> <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> <42B36660.6010102@wordtech-software.com> Message-ID: <70A98724-EEF4-46C8-86E4-858F75DDDA9E@conncoll.edu> Pytyhon 2.4.1, wxPython 2.6.0.1. That's what I run in the shell, and that's what Boa's Shell reports. On Jun 17, 2005, at 8:10 PM, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > What version of wxPython/MacPython are you using? It's *very* unstable > under the Apple system Python and wxPython, but has worked fine for me > under the latest versions of Py/wxPy. > > Cheers, > > Kevin Walzer, PhD > WordTech Software--Open Source Applications and Packages for OS X > http://www.wordtech-software.com > http://www.kevin-walzer.com > http://www.smallbizmac.com. > mailto:sw at wordtech-software.com > > Charles Hartman wrote: > | The new version is very pretty, and very promising. > Unfortunately, it > | crashes. I started the steps in the Help tutorial -- created a > folder, > | made a new app with a frame -- and pressed the Run button, and the > | program crashed. Tried again, same thing. > | > | Charles Hartman > | > | On Jun 17, 2005, at 12:06 AM, Kevin Walzer wrote: > | > | Boa Constructor is now available for Mac OS X. > | > | Boa is a cross-platform Python IDE and wxPython GUI Builder. It > offers > | visual frame creation and manipulation, an object inspector, > many views > | on the source like object browsers, inheritance hierarchies, doc > string > | generated html documentation, an advanced debugger and > integrated help. > | > | This is the first version of Boa Constructor (O.4.3) to be > distributed > | as a Mac-native application. Boa Constructor requires the > installation > | of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is > extremely > | unstable on earlier versions of Python/wxPython and has not been > tested > | on an earlier version of Mac OS X. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > |> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFCs2ZgJmdQs+6YVcoRAlVEAJ9z7s4P7BNN1NCS/pmVHGpdu3maSQCffWKI > d9Wm0l+xDoiC6EraY1Yk9IM= > =c+Jl > -----END PGP SIGNATURE----- > From charles.hartman at conncoll.edu Sat Jun 18 02:21:51 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Fri, 17 Jun 2005 20:21:51 -0400 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available In-Reply-To: <42B36660.6010102@wordtech-software.com> References: <42B24C62.6020101@wordtech-software.com> <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> <42B36660.6010102@wordtech-software.com> Message-ID: That's the .dmg dist of Python 2.4.1, and the unicode .dmg dist of wxPython 2.6.0.1. Here are the app and frame Boa built and crashed while trying to run: ============================= #Boa:Frame:Frame1 import wx def create(parent): return Frame1(parent) [wxID_FRAME1] = [wx.NewId() for _init_ctrls in range(1)] class Frame1(wx.Frame): def _init_ctrls(self, prnt): wx.Frame.__init__(self, style=wx.DEFAULT_FRAME_STYLE, name='', parent=prnt, title='Frame1', pos=(320, 177), id=wxID_FRAME1, size=(853, 473)) def __init__(self, parent): self._init_ctrls(parent) ============================= #!/usr/bin/env python #Boa:App:BoaApp import wx import TestFrame modules ={u'TestFrame': [1, 'Main frame of Application', u'TestFrame.py']} class BoaApp(wx.App): def OnInit(self): wx.InitAllImageHandlers() self.main = TestFrame.create(None) self.main.Show() self.SetTopWindow(self.main) return True def main(): application = BoaApp(0) application.MainLoop() if __name__ == '__main__': main() =================================== On Jun 17, 2005, at 8:10 PM, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > What version of wxPython/MacPython are you using? It's *very* unstable > under the Apple system Python and wxPython, but has worked fine for me > under the latest versions of Py/wxPy. > > Cheers, > > Kevin Walzer, PhD > WordTech Software--Open Source Applications and Packages for OS X > http://www.wordtech-software.com > http://www.kevin-walzer.com > http://www.smallbizmac.com. > mailto:sw at wordtech-software.com > > Charles Hartman wrote: > | The new version is very pretty, and very promising. > Unfortunately, it > | crashes. I started the steps in the Help tutorial -- created a > folder, > | made a new app with a frame -- and pressed the Run button, and the > | program crashed. Tried again, same thing. > | > | Charles Hartman > | > | On Jun 17, 2005, at 12:06 AM, Kevin Walzer wrote: > | > | Boa Constructor is now available for Mac OS X. > | > | Boa is a cross-platform Python IDE and wxPython GUI Builder. It > offers > | visual frame creation and manipulation, an object inspector, > many views > | on the source like object browsers, inheritance hierarchies, doc > string > | generated html documentation, an advanced debugger and > integrated help. > | > | This is the first version of Boa Constructor (O.4.3) to be > distributed > | as a Mac-native application. Boa Constructor requires the > installation > | of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is > extremely > | unstable on earlier versions of Python/wxPython and has not been > tested > | on an earlier version of Mac OS X. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > |> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFCs2ZgJmdQs+6YVcoRAlVEAJ9z7s4P7BNN1NCS/pmVHGpdu3maSQCffWKI > d9Wm0l+xDoiC6EraY1Yk9IM= > =c+Jl > -----END PGP SIGNATURE----- > From sw at wordtech-software.com Sat Jun 18 04:21:02 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 17 Jun 2005 22:21:02 -0400 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available In-Reply-To: References: <42B24C62.6020101@wordtech-software.com> <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> <42B36660.6010102@wordtech-software.com> Message-ID: <42B3850E.4070903@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I don't have any answers, I'm afraid, but I did reproduce the crash. I wonder if Boa is trying to eval the script in the same process that the interpreter itself is running in. This accounts for IDLE's inability to run GUI code correctly--ditto for PythonIDE. I have yet to encounter a Python editor on the Mac that does this gracefully. Eric3, Spe, PyOxide,and now Boa--they all crash at times, and sometimes all the time, when trying to eval/debug scripts. To be perfectly honest, when it comes to the eval/debug cycle, Emacs + terminal is about the only thing that works for me. The IDE's are best for other things, such as code completion, generating the GUI code--wxPython is a lot more complex to write by hand than Tcl/Tk, for instance. I'll keep working with Boa, though, and see if I can work with Riaan to come up with a solution. Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com Charles Hartman wrote: | That's the .dmg dist of Python 2.4.1, and the unicode .dmg dist of | wxPython 2.6.0.1. Here are the app and frame Boa built and crashed | while trying to run: | | ============================= | | #Boa:Frame:Frame1 | | import wx | | def create(parent): | return Frame1(parent) | | [wxID_FRAME1] = [wx.NewId() for _init_ctrls in range(1)] | | class Frame1(wx.Frame): | def _init_ctrls(self, prnt): | wx.Frame.__init__(self, style=wx.DEFAULT_FRAME_STYLE, name='', | parent=prnt, title='Frame1', pos=(320, 177), id=wxID_FRAME1, size=(853, | 473)) | | def __init__(self, parent): | self._init_ctrls(parent) | | ============================= | | #!/usr/bin/env python | #Boa:App:BoaApp | | import wx | | import TestFrame | | modules ={u'TestFrame': [1, 'Main frame of Application', u'TestFrame.py']} | | class BoaApp(wx.App): | def OnInit(self): | wx.InitAllImageHandlers() | self.main = TestFrame.create(None) | self.main.Show() | self.SetTopWindow(self.main) | return True | | def main(): | application = BoaApp(0) | application.MainLoop() | | if __name__ == '__main__': | main() | | =================================== | | | On Jun 17, 2005, at 8:10 PM, Kevin Walzer wrote: | | What version of wxPython/MacPython are you using? It's *very* unstable | under the Apple system Python and wxPython, but has worked fine for me | under the latest versions of Py/wxPy. | | Cheers, | | Kevin Walzer, PhD | WordTech Software--Open Source Applications and Packages for OS X | http://www.wordtech-software.com | http://www.kevin-walzer.com | http://www.smallbizmac.com. | mailto:sw at wordtech-software.com | | Charles Hartman wrote: | | The new version is very pretty, and very promising. Unfortunately, it | | crashes. I started the steps in the Help tutorial -- created a | folder, | | made a new app with a frame -- and pressed the Run button, and the | | program crashed. Tried again, same thing. | | | | Charles Hartman | | | | On Jun 17, 2005, at 12:06 AM, Kevin Walzer wrote: | | | | Boa Constructor is now available for Mac OS X. | | | | Boa is a cross-platform Python IDE and wxPython GUI Builder. It offers | | visual frame creation and manipulation, an object inspector, many | views | | on the source like object browsers, inheritance hierarchies, doc | string | | generated html documentation, an advanced debugger and integrated | help. | | | | This is the first version of Boa Constructor (O.4.3) to be distributed | | as a Mac-native application. Boa Constructor requires the installation | | of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is extremely | | unstable on earlier versions of Python/wxPython and has not been | tested | | on an earlier version of Mac OS X. | _______________________________________________ | Pythonmac-SIG maillist - Pythonmac-SIG at python.org | http://mail.python.org/mailman/listinfo/pythonmac-sig | |> | |> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCs4UJJmdQs+6YVcoRAnDEAJ9B6xKZ6GINoj19ebrO9T3TKfUyMQCfalT3 gOOoS1X0d9I5n51JSGxDRc8= =fRt9 -----END PGP SIGNATURE----- From werner.bruhin at free.fr Sat Jun 18 10:30:16 2005 From: werner.bruhin at free.fr (Werner F. Bruhin) Date: Sat, 18 Jun 2005 10:30:16 +0200 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available In-Reply-To: <42B3850E.4070903@wordtech-software.com> References: <42B24C62.6020101@wordtech-software.com> <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> <42B36660.6010102@wordtech-software.com> <42B3850E.4070903@wordtech-software.com> Message-ID: Hi Kevin, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I don't have any answers, I'm afraid, but I did reproduce the crash. > > I wonder if Boa is trying to eval the script in the same process that > the interpreter itself is running in. This accounts for IDLE's inability > to run GUI code correctly--ditto for PythonIDE. > > I have yet to encounter a Python editor on the Mac that does this > gracefully. Eric3, Spe, PyOxide,and now Boa--they all crash at times, > and sometimes all the time, when trying to eval/debug scripts. Are people like Robin Dunn aware of this? Or whoever works on the MacPython stuff? One of these days I want to get a Mac for myself, so hopefully by then you chaps have figured this out :) See you Werner > > To be perfectly honest, when it comes to the eval/debug cycle, Emacs + > terminal is about the only thing that works for me. The IDE's are best > for other things, such as code completion, generating the GUI > code--wxPython is a lot more complex to write by hand than Tcl/Tk, for > instance. > > I'll keep working with Boa, though, and see if I can work with Riaan to > come up with a solution. > > Cheers, > > Kevin Walzer, PhD > WordTech Software--Open Source Applications and Packages for OS X > http://www.wordtech-software.com > http://www.kevin-walzer.com > http://www.smallbizmac.com. > mailto:sw at wordtech-software.com > > Charles Hartman wrote: > | That's the .dmg dist of Python 2.4.1, and the unicode .dmg dist of > | wxPython 2.6.0.1. Here are the app and frame Boa built and crashed > | while trying to run: > | > | ============================= > | > | #Boa:Frame:Frame1 > | > | import wx > | > | def create(parent): > | return Frame1(parent) > | > | [wxID_FRAME1] = [wx.NewId() for _init_ctrls in range(1)] > | > | class Frame1(wx.Frame): > | def _init_ctrls(self, prnt): > | wx.Frame.__init__(self, style=wx.DEFAULT_FRAME_STYLE, name='', > | parent=prnt, title='Frame1', pos=(320, 177), id=wxID_FRAME1, size=(853, > | 473)) > | > | def __init__(self, parent): > | self._init_ctrls(parent) > | > | ============================= > | > | #!/usr/bin/env python > | #Boa:App:BoaApp > | > | import wx > | > | import TestFrame > | > | modules ={u'TestFrame': [1, 'Main frame of Application', > u'TestFrame.py']} > | > | class BoaApp(wx.App): > | def OnInit(self): > | wx.InitAllImageHandlers() > | self.main = TestFrame.create(None) > | self.main.Show() > | self.SetTopWindow(self.main) > | return True > | > | def main(): > | application = BoaApp(0) > | application.MainLoop() > | > | if __name__ == '__main__': > | main() > | > | =================================== > | > | > | On Jun 17, 2005, at 8:10 PM, Kevin Walzer wrote: > | > | What version of wxPython/MacPython are you using? It's *very* unstable > | under the Apple system Python and wxPython, but has worked fine for me > | under the latest versions of Py/wxPy. > | > | Cheers, > | > | Kevin Walzer, PhD > | WordTech Software--Open Source Applications and Packages for OS X > | http://www.wordtech-software.com > | http://www.kevin-walzer.com > | http://www.smallbizmac.com. > | mailto:sw at wordtech-software.com > | > | Charles Hartman wrote: > | | The new version is very pretty, and very promising. Unfortunately, it > | | crashes. I started the steps in the Help tutorial -- created a > | folder, > | | made a new app with a frame -- and pressed the Run button, and the > | | program crashed. Tried again, same thing. > | | > | | Charles Hartman > | | > | | On Jun 17, 2005, at 12:06 AM, Kevin Walzer wrote: > | | > | | Boa Constructor is now available for Mac OS X. > | | > | | Boa is a cross-platform Python IDE and wxPython GUI Builder. It offers > | | visual frame creation and manipulation, an object inspector, many > | views > | | on the source like object browsers, inheritance hierarchies, doc > | string > | | generated html documentation, an advanced debugger and integrated > | help. > | | > | | This is the first version of Boa Constructor (O.4.3) to be distributed > | | as a Mac-native application. Boa Constructor requires the installation > | | of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is extremely > | | unstable on earlier versions of Python/wxPython and has not been > | tested > | | on an earlier version of Mac OS X. > | _______________________________________________ > | Pythonmac-SIG maillist - > Pythonmac-SIG at python.org > | http://mail.python.org/mailman/listinfo/pythonmac-sig > | |> > | > |> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFCs4UJJmdQs+6YVcoRAnDEAJ9B6xKZ6GINoj19ebrO9T3TKfUyMQCfalT3 > gOOoS1X0d9I5n51JSGxDRc8= > =fRt9 > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click From charles.hartman at conncoll.edu Sat Jun 18 13:57:40 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Sat, 18 Jun 2005 07:57:40 -0400 Subject: [Pythonmac-SIG] ANN: Boa Constructor for OS X available In-Reply-To: References: <42B24C62.6020101@wordtech-software.com> <279C16B8-B774-4C19-9DD3-3562196FBF8F@conncoll.edu> <42B36660.6010102@wordtech-software.com> <42B3850E.4070903@wordtech-software.com> Message-ID: If I understand the question, this is something that WingIDE does just fine. Charles Hartman On Jun 18, 2005, at 4:30 AM, Werner F. Bruhin wrote: > Hi Kevin, > > Kevin Walzer wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> I don't have any answers, I'm afraid, but I did reproduce the crash. >> >> I wonder if Boa is trying to eval the script in the same process that >> the interpreter itself is running in. This accounts for IDLE's >> inability >> to run GUI code correctly--ditto for PythonIDE. >> >> I have yet to encounter a Python editor on the Mac that does this >> gracefully. Eric3, Spe, PyOxide,and now Boa--they all crash at times, >> and sometimes all the time, when trying to eval/debug scripts. >> > Are people like Robin Dunn aware of this? Or whoever works on the > MacPython stuff? > > One of these days I want to get a Mac for myself, so hopefully by then > you chaps have figured this out :) > > See you > Werner > > >> >> To be perfectly honest, when it comes to the eval/debug cycle, >> Emacs + >> terminal is about the only thing that works for me. The IDE's are >> best >> for other things, such as code completion, generating the GUI >> code--wxPython is a lot more complex to write by hand than Tcl/Tk, >> for >> instance. >> >> I'll keep working with Boa, though, and see if I can work with >> Riaan to >> come up with a solution. >> >> Cheers, >> >> Kevin Walzer, PhD >> WordTech Software--Open Source Applications and Packages for OS X >> http://www.wordtech-software.com >> http://www.kevin-walzer.com >> http://www.smallbizmac.com. >> mailto:sw at wordtech-software.com >> >> Charles Hartman wrote: >> | That's the .dmg dist of Python 2.4.1, and the unicode .dmg dist of >> | wxPython 2.6.0.1. Here are the app and frame Boa built and crashed >> | while trying to run: >> | >> | ============================= >> | >> | #Boa:Frame:Frame1 >> | >> | import wx >> | >> | def create(parent): >> | return Frame1(parent) >> | >> | [wxID_FRAME1] = [wx.NewId() for _init_ctrls in range(1)] >> | >> | class Frame1(wx.Frame): >> | def _init_ctrls(self, prnt): >> | wx.Frame.__init__(self, style=wx.DEFAULT_FRAME_STYLE, >> name='', >> | parent=prnt, title='Frame1', pos=(320, 177), id=wxID_FRAME1, >> size=(853, >> | 473)) >> | >> | def __init__(self, parent): >> | self._init_ctrls(parent) >> | >> | ============================= >> | >> | #!/usr/bin/env python >> | #Boa:App:BoaApp >> | >> | import wx >> | >> | import TestFrame >> | >> | modules ={u'TestFrame': [1, 'Main frame of Application', >> u'TestFrame.py']} >> | >> | class BoaApp(wx.App): >> | def OnInit(self): >> | wx.InitAllImageHandlers() >> | self.main = TestFrame.create(None) >> | self.main.Show() >> | self.SetTopWindow(self.main) >> | return True >> | >> | def main(): >> | application = BoaApp(0) >> | application.MainLoop() >> | >> | if __name__ == '__main__': >> | main() >> | >> | =================================== >> | >> | >> | On Jun 17, 2005, at 8:10 PM, Kevin Walzer wrote: >> | >> | What version of wxPython/MacPython are you using? It's *very* >> unstable >> | under the Apple system Python and wxPython, but has worked fine >> for me >> | under the latest versions of Py/wxPy. >> | >> | Cheers, >> | >> | Kevin Walzer, PhD >> | WordTech Software--Open Source Applications and Packages for OS X >> | http://www.wordtech-software.com >> | http://www.kevin-walzer.com >> | http://www.smallbizmac.com. >> | mailto:sw at wordtech-software.com >> | >> | Charles Hartman wrote: >> | | The new version is very pretty, and very promising. >> Unfortunately, it >> | | crashes. I started the steps in the Help tutorial -- created a >> | folder, >> | | made a new app with a frame -- and pressed the Run button, >> and the >> | | program crashed. Tried again, same thing. >> | | >> | | Charles Hartman >> | | >> | | On Jun 17, 2005, at 12:06 AM, Kevin Walzer wrote: >> | | >> | | Boa Constructor is now available for Mac OS X. >> | | >> | | Boa is a cross-platform Python IDE and wxPython GUI Builder. >> It offers >> | | visual frame creation and manipulation, an object inspector, >> many >> | views >> | | on the source like object browsers, inheritance hierarchies, doc >> | string >> | | generated html documentation, an advanced debugger and >> integrated >> | help. >> | | >> | | This is the first version of Boa Constructor (O.4.3) to be >> distributed >> | | as a Mac-native application. Boa Constructor requires the >> installation >> | | of MacPython 2.4.1, wxPython 2.6.1, and Mac OS X 10.4. It is >> extremely >> | | unstable on earlier versions of Python/wxPython and has not been >> | tested >> | | on an earlier version of Mac OS X. >> | _______________________________________________ >> | Pythonmac-SIG maillist - >> Pythonmac-SIG at python.org >> | http://mail.python.org/mailman/listinfo/pythonmac-sig >> | |> >> | >> |> >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.1 (Darwin) >> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org >> >> iD8DBQFCs4UJJmdQs+6YVcoRAnDEAJ9B6xKZ6GINoj19ebrO9T3TKfUyMQCfalT3 >> gOOoS1X0d9I5n51JSGxDRc8= >> =fRt9 >> -----END PGP SIGNATURE----- >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: Discover Easy Linux Migration >> Strategies >> from IBM. Find simple to follow Roadmaps, straightforward articles, >> informative Webcasts and more! Get everything you need to get up to >> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From matsakis at mit.edu Sat Jun 18 22:03:27 2005 From: matsakis at mit.edu (Nick Matsakis) Date: Sat, 18 Jun 2005 16:03:27 -0400 (EDT) Subject: [Pythonmac-SIG] ANN: Appscript Installer 1.1 Message-ID: http://freespace.virgin.net/hamish.sanderson/appscript.html Appscript Installer 1.1 is now available. Appscript is a high-level, user-friendly MacPython to Apple event bridge that allows you to control scriptable Mac OS X applications using ordinary Python scripts. Appscript makes MacPython a serious alternative to Apple's own AppleScript language for automating your Mac. This version is identical to Appscript Installer 1.1rc4, so you don't need to reinstall if you have that version. It should work to update any previous version of the installer, including the alpha and beta installers, but please mail me if you have problems (posting to your weblog is fine, but less likely to get problems fixed). This version is fully compatible with the Apple-shipped Python 2.3 installations in 10.3 and 10.4 and includes the latest stable versions of appscript and friends. More detailed release notes are available in the disk image download. Nick Matsakis From gcanyon at inspiredlogic.com Mon Jun 20 16:42:55 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Mon, 20 Jun 2005 07:42:55 -0700 Subject: [Pythonmac-SIG] [Boa Constr] ANN: Boa Constructor for OS X available In-Reply-To: <42B24C62.6020101@wordtech-software.com> References: <42B24C62.6020101@wordtech-software.com> Message-ID: Not sure if this discussion is better suited to this list or the Boa Constructor list. I'm running the new Boa Constructor app on Tiger, with the required versions of wx and Python. It shows up with more tabs in the editor window -- a window called "Everything" that appears to literally be that -- it's filled with stuff. If I run the project, Boa dies. Suggestions? thanks gc From gcanyon at inspiredlogic.com Mon Jun 20 16:53:14 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Mon, 20 Jun 2005 07:53:14 -0700 Subject: [Pythonmac-SIG] [Boa Constr] ANN: Boa Constructor for OS X available In-Reply-To: <42B24C62.6020101@wordtech-software.com> References: <42B24C62.6020101@wordtech-software.com> Message-ID: <119E2762-E733-4AA6-8D51-ED9F467292ED@inspiredlogic.com> Installing the app version of Boa Constructor seems to have broken my previously working bunch-of-files-in-a-folder installation of Boa. It now gives me an error: 'module' object has no attribute 'wxSystemSettings_GetSystemMetric' ---- I should also point out that I tried closing the everything project and opening a new project. Just adding a text box, a radio button, and a check box, and trying to run it, and Boa dies. regards, Geoff From sw at wordtech-software.com Tue Jun 21 16:15:22 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Tue, 21 Jun 2005 10:15:22 -0400 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: References: Message-ID: <42B820FA.3010702@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 | Not sure if this discussion is better suited to this list or the Boa | Constructor list. | | I'm running the new Boa Constructor app on Tiger, with the required | versions of wx and Python. It shows up with more tabs in the editor | window -- a window called "Everything" that appears to literally be | that -- it's filled with stuff. | | If I run the project, Boa dies. | | Suggestions? | | thanks | | gc | This is a known issue. Unfortunately, I don't have any idea on how to fix it. Riaan, has this been reported on other platforms at any point--Boa just crashing when you try to run/debug a program from within the IDE? I'd be glad to test patches/bug fixes. | Installing the app version of Boa Constructor seems to have broken my | previously working bunch-of-files-in-a-folder installation of Boa. It | now gives me an error: | | 'module' object has no attribute | 'wxSystemSettings_GetSystemMetric' How did you install it before? Which version of Python/wxPython was it linked to? Did you get these crashes before? | | ---- | | I should also point out that I tried closing the everything project and | opening a new project. Just adding a text box, a radio button, and a | check box, and trying to run it, and Boa dies. Can you send code samples? That would be useful for testing. The other report I got about this indicated the same problem. Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuCD5JmdQs+6YVcoRAt+KAJ9nv8axn5QTprYcfA1GgeUg9aBhewCfbfYV nmvq0UrxaRvSCkfTvBufZc4= =/jPG -----END PGP SIGNATURE----- From Hubert.Holin at meteo.fr Tue Jun 21 17:21:17 2005 From: Hubert.Holin at meteo.fr (Hubert Holin) Date: Tue, 21 Jun 2005 17:21:17 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. Message-ID: <7AC46FDC-4C55-4486-9D86-CDC7D485A376@meteo.fr> Somewhere in the E.U., le 21/06/2005 Bonjour For my first Python steps on the Mac, I am trying to find information on all broken aliases in a folder hierarchy (i.e. aliases which were created thru the Finder and which no longer reference an existing file or folder). While I am able to find the aliases which are broken, I would like to go a step further, and indicate *what* the alias thinks it is referencing (the "original" item in the Finder info), and I am encountering some problem. It would seem that the best function to get that information is thru the FSFollowFinderAlias function of the Alias Manager, but unfortunately the only version which is wrapped is a member of the Alias class, which I have not found a way to use, as all I have is an instance of FSRef. Likewise, the Alias Manager functions FSMatchAlias and FSMatchAliasNoUI seem not to be wrapped. What can I do, short of writing a C++ extension? Merci Hubert Holin From gcanyon at inspiredlogic.com Tue Jun 21 17:30:13 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Tue, 21 Jun 2005 08:30:13 -0700 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: <42B820FA.3010702@wordtech-software.com> References: <42B820FA.3010702@wordtech-software.com> Message-ID: <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> On Jun 21, 2005, at 7:15 AM, Kevin Walzer wrote: > | Installing the app version of Boa Constructor seems to have > broken my > | previously working bunch-of-files-in-a-folder installation of > Boa. It > | now gives me an error: > | > | 'module' object has no attribute > | 'wxSystemSettings_GetSystemMetric' > > > How did you install it before? Which version of Python/wxPython was it > linked to? Did you get these crashes before? I downloaded the Boa package from sourceforge and expanded it. I then dragged boa.py onto Python Launcher. As far as I know I have only one version of Python/wxPython installed: 2.4.1 and 2.6.1. I ripped out every bit of Python before installing, so there shouldn't be any older versions running around. > > > > | > | ---- > | > | I should also point out that I tried closing the everything > project and > | opening a new project. Just adding a text box, a radio button, > and a > | check box, and trying to run it, and Boa dies. > > Can you send code samples? That would be useful for testing. The other > report I got about this indicated the same problem. > There's no source other than what Boa generates. I just created a new project, dragged out a few interface items, and ran it. From bob at redivi.com Tue Jun 21 17:37:25 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 21 Jun 2005 11:37:25 -0400 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> References: <42B820FA.3010702@wordtech-software.com> <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> Message-ID: <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> On Jun 21, 2005, at 11:30 AM, Geoff Canyon wrote: > I downloaded the Boa package from sourceforge and expanded it. I then > dragged boa.py onto Python Launcher. As far as I know I have only one > version of Python/wxPython installed: 2.4.1 and 2.6.1. I ripped out > every bit of Python before installing, so there shouldn't be any > older versions running around. If you actually did remove every trace of Python 2.3, then you broke some Apple stuff (at least some of the print workflows and fax cover pages) and several third party applications. Don't touch anything that Mac OS X comes with. If I were you, I'd go ahead and just reinstall before you start running into those problems. /System and /usr (except /usr/local, of course) should not be touched except under extreme circumstances when you know what you're doing. -bob From bob at redivi.com Tue Jun 21 17:49:59 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 21 Jun 2005 11:49:59 -0400 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <7AC46FDC-4C55-4486-9D86-CDC7D485A376@meteo.fr> References: <7AC46FDC-4C55-4486-9D86-CDC7D485A376@meteo.fr> Message-ID: <4A7BF32C-9850-452F-AC63-01FDF54119E7@redivi.com> On Jun 21, 2005, at 11:21 AM, Hubert Holin wrote: > For my first Python steps on the Mac, I am trying to find > information on all broken aliases in a folder hierarchy (i.e. aliases > which were created thru the Finder and which no longer reference an > existing file or folder). While I am able to find the aliases which > are broken, I would like to go a step further, and indicate *what* > the alias thinks it is referencing (the "original" item in the Finder > info), and I am encountering some problem. This is not a good first project. Using Carbon isn't very straightforward from any language. > It would seem that the best function to get that information is > thru the FSFollowFinderAlias function of the Alias Manager, but > unfortunately the only version which is wrapped is a member of the > Alias class, which I have not found a way to use, as all I have is an > instance of FSRef. I think you have to use FSIsAliasFile to determine if it's an alias, and if so, then you load in the alias resource and and create an Alias out of that. Carbon is painful. > Likewise, the Alias Manager functions FSMatchAlias and > FSMatchAliasNoUI seem not to be wrapped. > > What can I do, short of writing a C++ extension? Writing a C extension or using the FFI available in PyObjC or ctypes are the only ways to bridge unwrapped functions. -bob From chinook.nr at tds.net Tue Jun 21 18:20:07 2005 From: chinook.nr at tds.net (Chinook) Date: Tue, 21 Jun 2005 12:20:07 -0400 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. References: <7AC46FDC-4C55-4486-9D86-CDC7D485A376@meteo.fr> Message-ID: <0001HW.BEDDB6770000BC36F0284550@news.gmane.org> On Tue, 21 Jun 2005 11:21:17 -0400, Hubert Holin wrote (in article <7AC46FDC-4C55-4486-9D86-CDC7D485A376 at meteo.fr>): > Somewhere in the E.U., le 21/06/2005 > > Bonjour > > For my first Python steps on the Mac, I am trying to find > information on all broken aliases in a folder hierarchy (i.e. aliases > which were created thru the Finder and which no longer reference an > existing file or folder). While I am able to find the aliases which > are broken, I would like to go a step further, and indicate *what* > the alias thinks it is referencing (the "original" item in the Finder > info), and I am encountering some problem. > > It would seem that the best function to get that information is > thru the FSFollowFinderAlias function of the Alias Manager, but > unfortunately the only version which is wrapped is a member of the > Alias class, which I have not found a way to use, as all I have is an > instance of FSRef. > > Likewise, the Alias Manager functions FSMatchAlias and > FSMatchAliasNoUI seem not to be wrapped. > > What can I do, short of writing a C++ extension? > > Merci > > Hubert Holin > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > Here is a snippet from one of my utilities that might help. # deal with directory item relative to type if os.path.islink(dlfpath): # directory item a symbolic link, generate row of cells csvline = _cellpos(dlfpath, alvl, blvl, clvl) # identify as link with path lptr = '#Sym Link > ' + os.readlink(dlfpath) csvline = csvline + '"' + lptr + '"' elif FSResolveAliasFile(dlfpath, 1)[2]: # directory item an Aqua alias, generate row of cells csvline = _cellpos(dlfpath, alvl, blvl, clvl) # identify as alias with target lptr = '#Alias > ' + FSResolveAliasFile(dlfpath, 1)[0].as_pathname() csvline = csvline + '"' + lptr + '"' Lee C From rowen at cesmail.net Tue Jun 21 20:19:27 2005 From: rowen at cesmail.net (Russell E. Owen) Date: Tue, 21 Jun 2005 11:19:27 -0700 Subject: [Pythonmac-SIG] Aquamacs References: <42B0E779.6030402@wordtech-software.com> Message-ID: In article <42B0E779.6030402 at wordtech-software.com>, Kevin Walzer wrote: >... > Aquamacs, which I'm working on with David Reitter: This is a more > radical revision of Emacs: it overrides a lot of the standard Emacs > interface conventions, keyboard shortcuts, etc. and replaces them with > standard Aqua keymappings. i.e., Apple-C is the preferred method to copy > text... Thank you for the very helpful summary. I had not heard of aquamacs before and it sounds very promising. > Let me know if you have other questions. I have one... I tried Aquamacs but on the file I loaded it was displayed as one very long wrapped line with some funny character where the line endings should have been. I assume the editor was configured to demand a particular character for line endings and this file used a different convention. I looked through the prefs but didn't find any way of enabling universal newline support. Am I missing something? -- Russell From njriley at uiuc.edu Tue Jun 21 20:38:49 2005 From: njriley at uiuc.edu (Nicholas Riley) Date: Tue, 21 Jun 2005 13:38:49 -0500 Subject: [Pythonmac-SIG] Aquamacs In-Reply-To: References: <42B0E779.6030402@wordtech-software.com> Message-ID: <20050621183849.GA17593@uiuc.edu> On Tue, Jun 21, 2005 at 11:19:27AM -0700, Russell E. Owen wrote: > I tried Aquamacs but on the file I loaded it was displayed as one very > long wrapped line with some funny character where the line endings > should have been. I assume the editor was configured to demand a > particular character for line endings and this file used a different > convention. I looked through the prefs but didn't find any way of > enabling universal newline support. Am I missing something? Regular GNU Emacs, at least, should support different line endings and detect CR, CR/LF and LF line endings automatically as long as the file is internally consistent. It may be the file you are looking at has a mix of line endings. You can specify an encoding/line ending format with M-x revert-buffer-with-coding-system. The coding systems are specified as charset-name-{dos,unix,mac}, so for example if you want to read a UTF-8 formatted file with Mac line endings, you use utf-8-mac. The line ending style, if non-Unix (LF) should be shown in the bottom left corner of the status area. -- Nicholas Riley | From janssen at parc.com Tue Jun 21 22:35:00 2005 From: janssen at parc.com (Bill Janssen) Date: Tue, 21 Jun 2005 13:35:00 PDT Subject: [Pythonmac-SIG] Aquamacs In-Reply-To: Your message of "Wed, 15 Jun 2005 19:44:09 PDT." <42B0E779.6030402@wordtech-software.com> Message-ID: <05Jun21.133505pdt."58617"@synergy1.parc.xerox.com> I always build my own Emacs from CVS on the Mac, as I prefer the older X11 style of Emacs UI. The canonical page on how to do this is at http://members.shaw.ca/akochoi-emacs/stories/obtaining-and-building.html. I use the "--without-carbon --with-x" flags when I configure. Bill From sw at wordtech-software.com Tue Jun 21 22:54:07 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Tue, 21 Jun 2005 16:54:07 -0400 Subject: [Pythonmac-SIG] Aquamacs Message-ID: <42B87E6F.2090102@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I tried Aquamacs but on the file I loaded it was displayed as one very long wrapped line with some funny character where the line endings should have been. I assume the editor was configured to demand a particular character for line endings and this file used a different convention. I looked through the prefs but didn't find any way of enabling universal newline support. Am I missing something? See the options menu, "truncate long lines in this buffer" and "word wrap in text modes." - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD4DBQFCuH5uJmdQs+6YVcoRAqCcAJdRnvUfO/jetuI++J7qUWEE83E8AJ9kPHQq 50fumE5ML0O+KtwDafKIRQ== =Vwb4 -----END PGP SIGNATURE----- From Chris.Barker at noaa.gov Tue Jun 21 23:48:36 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Tue, 21 Jun 2005 14:48:36 -0700 Subject: [Pythonmac-SIG] Aquamacs In-Reply-To: <42B87E6F.2090102@wordtech-software.com> References: <42B87E6F.2090102@wordtech-software.com> Message-ID: <42B88B34.60002@noaa.gov> Kevin Walzer wrote: > > I tried Aquamacs but on the file I loaded it was displayed as one very > long wrapped line with some funny character where the line endings > should have been. I assume the editor was configured to demand a > particular character for line endings and this file used a different > convention. I looked through the prefs but didn't find any way of > enabling universal newline support. Am I missing something? > > > See the options menu, "truncate long lines in this buffer" and "word > wrap in text modes." I don't think that's what the OP was looking for. I think what he probably did was open a Mac-style file, and the \r were not interpreted as line endings. I've been using Xemacs for years, and I've never gotten it to understand anything but *nix line endings. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 hengist.podd at virgin.net Wed Jun 22 01:39:32 2005 From: hengist.podd at virgin.net (has) Date: Wed, 22 Jun 2005 00:39:32 +0100 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <4A7BF32C-9850-452F-AC63-01FDF54119E7@redivi.com> References: <7AC46FDC-4C55-4486-9D86-CDC7D485A376@meteo.fr> <4A7BF32C-9850-452F-AC63-01FDF54119E7@redivi.com> Message-ID: Hubert Holin wrote: > It would seem that the best function to get that information is >thru the FSFollowFinderAlias function of the Alias Manager, but >unfortunately the only version which is wrapped is a member of the >Alias class, which I have not found a way to use, as all I have is an >instance of FSRef. As Bob says, you want to create a new Alias out of the alias file's alis resource, e.g.: from Carbon.File import FSRef, Alias from Carbon.Res import * f = FSRef("/Users/has/a 'broken' Finder alias file") resfile = FSOpenResFile(f, 1) data = Get1IndResource('alis', 1).data CloseResFile(resfile) alias = Alias(rawdata=data) To get any useful data out of this 'broken' alias you'll have to get your hands dirty though. > Likewise, the Alias Manager functions FSMatchAlias and >FSMatchAliasNoUI seem not to be wrapped. Ditto FSCopyAliasInfo. Unfortunately I don't think Python's Carbon wrappers have been updated much since their creation back in pre-OS X days. You could probably patch up a copy yourself without much trouble; it's a slightly hackish solution, but not that hard to do (I've done it myself and my C's rubbish). HTH has -- http://freespace.virgin.net/hamish.sanderson/ From gcanyon at inspiredlogic.com Wed Jun 22 07:17:17 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Tue, 21 Jun 2005 22:17:17 -0700 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> References: <42B820FA.3010702@wordtech-software.com> <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> Message-ID: <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> On Jun 21, 2005, at 8:37 AM, Bob Ippolito wrote: > If you actually did remove every trace of Python 2.3, then you > broke some Apple stuff (at least some of the print workflows and > fax cover pages) and several third party applications. Don't touch > anything that Mac OS X comes with. If I were you, I'd go ahead and > just reinstall before you start running into those problems. > > /System and /usr (except /usr/local, of course) should not be > touched except under extreme circumstances when you know what > you're doing. (getting back on topic) Are you saying that there is some aspect of the older Python install that comes with Tiger that Boa needs, despite the fact that the documentation specifically requires the most recent version? gc From k6rtm at comcast.net Wed Jun 22 07:55:03 2005 From: k6rtm at comcast.net (Bob Martin) Date: Tue, 21 Jun 2005 22:55:03 -0700 Subject: [Pythonmac-SIG] Confused with Tiger! Message-ID: <8A97174E-A425-4326-B04B-FE08DC851592@comcast.net> I've recently upgraded to 10.4.1, and I'm having trouble getting things (the GUI as an example, and metakit) working. Help please? I checked http://homepages.cwi.nl/~jack/macpython/download.html but it doesn't talk about Tiger. When I download/install the MacPython 2.3 for Python addons, as I did with Panther, the GUI (PythonIDE.app) doesn't work -- double click it and it starts and exits. From bugbee at seanet.com Wed Jun 22 08:02:17 2005 From: bugbee at seanet.com (Larry Bugbee) Date: Tue, 21 Jun 2005 23:02:17 -0700 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: References: Message-ID: <27d213cffd0929ad71653dea00655e64@seanet.com> > Can you send code samples? That would be useful for testing. The other > report I got about this indicated the same problem. Me? I too click the Python app button and let the wizard create an app. Without adding *any* code I click the run button. Crash. I had such high hopes. If a minimalist, wizard generated app brings down the whole IDE, I don't think its a code sample you need as much as perhaps a second test box/environment? Larry From rkern at ucsd.edu Wed Jun 22 08:10:50 2005 From: rkern at ucsd.edu (Robert Kern) Date: Tue, 21 Jun 2005 23:10:50 -0700 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> References: <42B820FA.3010702@wordtech-software.com> <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> Message-ID: <42B900EA.4080609@ucsd.edu> Geoff Canyon wrote: > On Jun 21, 2005, at 8:37 AM, Bob Ippolito wrote: > >>If you actually did remove every trace of Python 2.3, then you >>broke some Apple stuff (at least some of the print workflows and >>fax cover pages) and several third party applications. Don't touch >>anything that Mac OS X comes with. If I were you, I'd go ahead and >>just reinstall before you start running into those problems. >> >>/System and /usr (except /usr/local, of course) should not be >>touched except under extreme circumstances when you know what >>you're doing. > > (getting back on topic) Are you saying that there is some aspect of > the older Python install that comes with Tiger that Boa needs, > despite the fact that the documentation specifically requires the > most recent version? *OS X* needs the older Python. Since the semi-official binaries for 2.4.1 install alongside the OS X binaries, there's no need to rip out the operating system's components. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From chinook.nr at tds.net Wed Jun 22 08:12:39 2005 From: chinook.nr at tds.net (Chinook) Date: Wed, 22 Jun 2005 02:12:39 -0400 Subject: [Pythonmac-SIG] Confused with Tiger! References: <8A97174E-A425-4326-B04B-FE08DC851592@comcast.net> Message-ID: <0001HW.BEDE7997001A7B7CF0407550@news.gmane.org> On Wed, 22 Jun 2005 01:55:03 -0400, Bob Martin wrote (in article <8A97174E-A425-4326-B04B-FE08DC851592 at comcast.net>): > I've recently upgraded to 10.4.1, and I'm having trouble getting > things (the GUI as an example, and metakit) working. > > Help please? > > I checked http://homepages.cwi.nl/~jack/macpython/download.html but > it doesn't talk about Tiger. When I download/install the MacPython > 2.3 for Python addons, as I did with Panther, the GUI (PythonIDE.app) > doesn't work -- double click it and it starts and exits. > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > I think you should take a look at: http://undefined.org/python/ Lee C From gcanyon at inspiredlogic.com Wed Jun 22 09:50:12 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Wed, 22 Jun 2005 00:50:12 -0700 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: <42B900EA.4080609@ucsd.edu> References: <42B820FA.3010702@wordtech-software.com> <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> <42B900EA.4080609@ucsd.edu> Message-ID: <9E424AFC-C490-4BCA-9FC8-D9959B53725C@inspiredlogic.com> On Jun 21, 2005, at 11:10 PM, Robert Kern wrote: >> On Jun 21, 2005, at 8:37 AM, Bob Ippolito wrote: >> >> >>> If you actually did remove every trace of Python 2.3, then you >>> broke some Apple stuff (at least some of the print workflows and >>> fax cover pages) and several third party applications. Don't touch >>> anything that Mac OS X comes with. If I were you, I'd go ahead and >>> just reinstall before you start running into those problems. >>> >>> /System and /usr (except /usr/local, of course) should not be >>> touched except under extreme circumstances when you know what >>> you're doing. >>> >> >> (getting back on topic) Are you saying that there is some aspect of >> the older Python install that comes with Tiger that Boa needs, >> despite the fact that the documentation specifically requires the >> most recent version? >> > > *OS X* needs the older Python. Since the semi-official binaries for > 2.4.1 install alongside the OS X binaries, there's no need to rip out > the operating system's components. Can we all agree that I did something others don't consider wise and move on? I'd like to get my install working if possible. I now have something like twenty hours invested in this process without even having made it through the opening tutorial. In fact my last several hours of effort have actually moved me backwards because I used to be able to at least run one of the template projects with my files-not-bundle install of Boa Constructor. Now the bundle won't run a project, and the previous Boa install won't run. I apologize for grousing, but surely everyone doesn't go through this much difficulty? I like the idea of Python and wxWidgets, but with the progress I'm making I'm tempted to move on. I know I'm setting myself up for smart retorts, but I'm being honest -- so far the install experience has been a disaster. If Python (and specifically wxPython) are to grow, people have to be able to at least get through the install relatively un-bloodied. thanks, Geoff "bruised and bleeding" Canyon From ronaldoussoren at mac.com Wed Jun 22 13:07:29 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 22 Jun 2005 13:07:29 +0200 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> References: <42B820FA.3010702@wordtech-software.com> <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> Message-ID: On 22-jun-2005, at 7:17, Geoff Canyon wrote: > On Jun 21, 2005, at 8:37 AM, Bob Ippolito wrote: > > >> If you actually did remove every trace of Python 2.3, then you >> broke some Apple stuff (at least some of the print workflows and >> fax cover pages) and several third party applications. Don't touch >> anything that Mac OS X comes with. If I were you, I'd go ahead and >> just reinstall before you start running into those problems. >> >> /System and /usr (except /usr/local, of course) should not be >> touched except under extreme circumstances when you know what >> you're doing. >> > > (getting back on topic) Are you saying that there is some aspect of > the older Python install that comes with Tiger that Boa needs, > despite the fact that the documentation specifically requires the > most recent version? I don't think he is. He is saying that you shouldn't mess around with the system unless you really know what you're doing. That is not specific to this issue but a generic advice. It is also not specific to python, replacing /bin/bash by another version would be just as bad. Ronald From charles.hartman at conncoll.edu Wed Jun 22 14:56:19 2005 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Wed, 22 Jun 2005 08:56:19 -0400 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: <9E424AFC-C490-4BCA-9FC8-D9959B53725C@inspiredlogic.com> References: <42B820FA.3010702@wordtech-software.com> <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> <42B900EA.4080609@ucsd.edu> <9E424AFC-C490-4BCA-9FC8-D9959B53725C@inspiredlogic.com> Message-ID: <972CF3F8-953C-4062-B8FF-0E8D169FBF4F@conncoll.edu> On Jun 22, 2005, at 3:50 AM, Geoff Canyon wrote: > I like the idea of Python and wxWidgets, but with > the progress I'm making I'm tempted to move on. I know I'm setting > myself up for smart retorts, but I'm being honest -- so far the > install experience has been a disaster. If Python (and specifically > wxPython) are to grow, people have to be able to at least get through > the install relatively un-bloodied. Python and wxPython are fine. (Well, pretty fine.) It's Boa that doesn't work. Charles Hartman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050622/e1a351a5/attachment.htm From gcanyon at inspiredlogic.com Wed Jun 22 15:51:03 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Wed, 22 Jun 2005 06:51:03 -0700 Subject: [Pythonmac-SIG] Boa stability issues In-Reply-To: References: <42B820FA.3010702@wordtech-software.com> <2DDD88B1-BF2E-4F67-B2F6-AC7777EE983C@inspiredlogic.com> <59C1D7E1-6AA3-47D8-B3C4-B0272B298759@redivi.com> <83FA58F1-7128-4578-946D-F4EA636204B9@inspiredlogic.com> Message-ID: <1F726A63-60BF-43FE-B863-9370209C33D5@inspiredlogic.com> On Jun 22, 2005, at 4:07 AM, Ronald Oussoren wrote: >> >> (getting back on topic) Are you saying that there is some aspect of >> the older Python install that comes with Tiger that Boa needs, >> despite the fact that the documentation specifically requires the >> most recent version? >> > > I don't think he is. He is saying that you shouldn't mess around > with the system unless you really know what you're doing. That is > not specific to this issue but a generic advice. It is also not > specific to python, replacing /bin/bash by another version would be > just as bad. As stated in a previous response to some other kind soul, I get it. I understand what he said. For the record: I have never before modified the OS X system in any way, and if it will put an end to this topic I will vow never to do so again. ;-) On Jun 22, 2005, at 5:56 AM, Charles Hartman wrote: > On Jun 22, 2005, at 3:50 AM, Geoff Canyon wrote: >> I like the idea of Python and wxWidgets, but with >> the progress I'm making I'm tempted to move on. I know I'm setting >> myself up for smart retorts, but I'm being honest -- so far the >> install experience has been a disaster. If Python (and specifically >> wxPython) are to grow, people have to be able to at least get through >> the install relatively un-bloodied. > > Python and wxPython are fine. (Well, pretty fine.) It's Boa that > doesn't work. Thanks. I guess this is the answer I'm looking for. I'll post on the Boa list asking if anyone can get it to work reasonably well, and examine alternatives. From sw at wordtech-software.com Wed Jun 22 15:52:41 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Wed, 22 Jun 2005 09:52:41 -0400 Subject: [Pythonmac-SIG] LaunchServices package Message-ID: <42B96D29.5070906@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is Bob's LaunchServices package available for download anywhere? A user of one of my packages was asking about it and I can't find the link anymore. - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuW0pJmdQs+6YVcoRApo1AKCKLzz+y9eK6YnyQkpxDepN+eeATACbBdyI wrc1XyLlFVOYaNawuSNHVZc= =Co4S -----END PGP SIGNATURE----- From sw at wordtech-software.com Wed Jun 22 16:27:07 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Wed, 22 Jun 2005 10:27:07 -0400 Subject: [Pythonmac-SIG] Workaround for Boa crashes on OS X Message-ID: <42B9753B.4070002@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I now have something like twenty hours invested in this process without even having made it through the opening tutorial. In fact my last several hours of effort have actually moved me backwards because I used to be able to at least run one of the template projects with my files-not-bundle install of Boa Constructor. Now the bundle won't run a project, and the previous Boa install won't run. I apologize for grousing, but surely everyone doesn't go through this much difficulty? I like the idea of Python and wxWidgets, but with the progress I'm making I'm tempted to move on. I know I'm setting myself up for smart retorts, but I'm being honest -- so far the install experience has been a disaster. If Python (and specifically wxPython) are to grow, people have to be able to at least get through the install relatively un-bloodied. Geoff, I sympathize with your frustration. After spending a little more time troubleshooting this, I've discovered some things: 1. The crashes appear to be limited to my app bundle. Not sure why. I ran Boa from the command line and ran a test application fine from within Boa. 2. The workaround, if you're using my app bundle, is to create the code in Boa, then test it from the Terminal. "pythonw2.4 /path/to/fooapp.py" is the correct command, because that will run the app from Python 2.4.1. 3. If you would prefer to run the app from inside Boa, then launch Boa from the command line. The correct way to do this is "pythonw2.4 /path/to/boa.py." I successfully ran the sample app inside Boa this way. 4. I'm not sure what's wrong with your previous Boa install. Try using the "pythonw2.4 /path/to/boa.py" approach. I guess it boils down to whether you want to double-click the shiny icon to launch Boa and then test the apps from the command-line (my preference) or run Boa from the command-line and test/debug from within Boa. This is actually a less serious bug than some of the other bugs with my Python packages, which tend to crash randomly, especially when saving files. Please test these workarounds. If you get good results, I'll post documentation to my website about it. I'm copying this to the Boa Constructor list. Riaan, any idea what might cause Boa to crash when running code when it's wrapped up in an app bundle (similar to py2exe) and not crash when it's run from the command-line? - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuXU6JmdQs+6YVcoRAmYdAJ91s9ju68zle2ne1XLaFlgcjb3KLACfSwb3 ydSyHXlgBKh4n7zW+13b9do= =PUBN -----END PGP SIGNATURE----- From njriley at uiuc.edu Wed Jun 22 17:32:45 2005 From: njriley at uiuc.edu (Nicholas Riley) Date: Wed, 22 Jun 2005 10:32:45 -0500 Subject: [Pythonmac-SIG] LaunchServices package In-Reply-To: <42B96D29.5070906@wordtech-software.com> References: <42B96D29.5070906@wordtech-software.com> Message-ID: <20050622153245.GB61677@uiuc.edu> On Wed, Jun 22, 2005 at 09:52:41AM -0400, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Is Bob's LaunchServices package available for download anywhere? A user > of one of my packages was asking about it and I can't find the link anymore. It's part of the Python23Compat packages: -- Nicholas Riley | From Henning.Ramm at mediapro-gmbh.de Wed Jun 22 18:02:41 2005 From: Henning.Ramm at mediapro-gmbh.de (Henning.Ramm@mediapro-gmbh.de) Date: Wed, 22 Jun 2005 18:02:41 +0200 Subject: [Pythonmac-SIG] python terminal font problem on Tiger Message-ID: Hi there, I made the mistake to upgrade my home Mac to Tiger, and now I must wait for updates of several apps... :-( Anyway, I installed Py2.4, latest wx etc. and changed my PATH to execute Python 2.4 before the system's. That works so far. But I've the same problem with every IDE that I tried (SPE, Boa, Oxygene, IDLE, PythonIDE, Dabo): In the Python interpreter windows I see always only fragments of characters, looks like the automatically choosen font wouldn't fit and chars get truncated. Source code windows look fine. Does anyone else experience something similar? Are there workarounds? How can I influence the (automatically chosen) terminal font of these apps? Best regards, Henning Hraban Ramm S?dkurier Medienhaus / MediaPro Support/Admin/Development Dept. From Chris.Barker at noaa.gov Wed Jun 22 18:38:03 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Wed, 22 Jun 2005 09:38:03 -0700 Subject: [Pythonmac-SIG] Eclipse + PyDev Message-ID: <42B993EB.5010405@noaa.gov> Hi all, Is anyone using Eclipse + PyDev on OS-X ? It's possible that this could be the full-featured, cross platform, Open Source IDE I've been looking for. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 martin at moellenbecks.de Wed Jun 22 19:14:45 2005 From: martin at moellenbecks.de (=?ISO-8859-1?Q?Martin_M=F6llenbeck?=) Date: Wed, 22 Jun 2005 19:14:45 +0200 Subject: [Pythonmac-SIG] Eclipse + PyDev In-Reply-To: <42B993EB.5010405@noaa.gov> References: <42B993EB.5010405@noaa.gov> Message-ID: <595C6B1F-AC9E-49D9-9DA1-FC8DB8E8357C@moellenbecks.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Chris, I am using Eclipse + PyDev on 10.4 for a while an have no problem. I can use all feature descriped on the web site. Martin Am 22.06.2005 um 18:38 schrieb Chris Barker: > Hi all, > > Is anyone using Eclipse + PyDev on OS-X ? > > It's possible that this could be the full-featured, cross platform, > Open > Source IDE I've been looking for. > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > NOAA/OR&R/HAZMAT (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 > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFCuZyFiJE4wzxJLBwRAinWAJ9alaFFP1Ubo6TFyOLpu4S8sAY7+ACbB5Oh Giorl9dnGrq0OFM0xhUYW/8= =UJmU -----END PGP SIGNATURE----- From rowen at cesmail.net Wed Jun 22 21:25:01 2005 From: rowen at cesmail.net (Russell E. Owen) Date: Wed, 22 Jun 2005 12:25:01 -0700 Subject: [Pythonmac-SIG] Eclipse + PyDev References: <42B993EB.5010405@noaa.gov> Message-ID: In article <42B993EB.5010405 at noaa.gov>, "Chris Barker" wrote: > Hi all, > > Is anyone using Eclipse + PyDev on OS-X ? > > It's possible that this could be the full-featured, cross platform, Open > Source IDE I've been looking for. I tried it. My initial impression was unfavorable -- it seemed cluttered and unfocused and I had trouble figuring out how to do the stuff I wanted to do. But it may just be a learning curve issue. I'd love to hear more from folks who really know it. WingIDE is my hands-down favorite IDE so far. It is cross-platform and the debugger works with all the various GUI libraries. (I will say more if interested, but don't want to get off topic too quickly). -- Russell From bob at redivi.com Wed Jun 22 23:18:13 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 22 Jun 2005 17:18:13 -0400 Subject: [Pythonmac-SIG] LaunchServices package In-Reply-To: <20050622153245.GB61677@uiuc.edu> References: <42B96D29.5070906@wordtech-software.com> <20050622153245.GB61677@uiuc.edu> Message-ID: <75A61818-AB83-4F03-B54A-22CBDDA23F43@redivi.com> On Jun 22, 2005, at 11:32 AM, Nicholas Riley wrote: > On Wed, Jun 22, 2005 at 09:52:41AM -0400, Kevin Walzer wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Is Bob's LaunchServices package available for download anywhere? A >> user >> of one of my packages was asking about it and I can't find the >> link anymore. >> > > It's part of the Python23Compat packages: > > Well I did have a hand-written LaunchServices package before it got bgen'ed in Python 2.4, but yeah, use that one. -bob From brendansimons at yahoo.ca Thu Jun 23 03:45:55 2005 From: brendansimons at yahoo.ca (Brendan Simons) Date: Wed, 22 Jun 2005 21:45:55 -0400 Subject: [Pythonmac-SIG] Eclipse+PyDev In-Reply-To: References: Message-ID: <51e98d76e62928664cccf615971ccf16@yahoo.ca> On 22-Jun-05, at 1:14 PM, Christopher Barker wrote: > Is anyone using Eclipse + PyDev on OS-X I used it briefly on 10.3 It ran so slowly on my (admittedly underspec'd) iBook that I quit. YMMV. -Brendan -- Brendan Simons __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From vshapovalov at chem.ucsb.edu Thu Jun 23 00:01:30 2005 From: vshapovalov at chem.ucsb.edu (Vladimir Shapovalov) Date: Wed, 22 Jun 2005 15:01:30 -0700 Subject: [Pythonmac-SIG] Python VTK shared libraries Message-ID: <3921833D-9E31-4E40-91FA-891148AA0BD3@chem.ucsb.edu> Recently I had to install Python interface for VTK. One of the problems I ran into was that the shared libraries built for VTK would not be seen by Python whatever path I put them into. The only way I found to make them visible was to make links in the site-pckages/ vtk_python directory. In addition, the link to libvtkRenderingPythonTkWidgets.dylib had to be named libvtkRenderingPythonTkWidgets.so to make it work (otherwise python complained it could not find the .so file). Is there a more graceful solution to keeping the libraries in a more appropriate place and still having python find them? Vladimir From bob at redivi.com Thu Jun 23 05:17:09 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 22 Jun 2005 23:17:09 -0400 Subject: [Pythonmac-SIG] Python VTK shared libraries In-Reply-To: <3921833D-9E31-4E40-91FA-891148AA0BD3@chem.ucsb.edu> References: <3921833D-9E31-4E40-91FA-891148AA0BD3@chem.ucsb.edu> Message-ID: <5E6A40A2-A7E3-4A1F-8191-35A11AABFCBC@redivi.com> On Jun 22, 2005, at 6:01 PM, Vladimir Shapovalov wrote: > Recently I had to install Python interface for VTK. One of the > problems I ran into was that the shared libraries built for VTK would > not be seen by Python whatever path I put them into. The only way I > found to make them visible was to make links in the site-pckages/ > vtk_python directory. In addition, the link to > libvtkRenderingPythonTkWidgets.dylib had to be named > libvtkRenderingPythonTkWidgets.so to make it work (otherwise python > complained it could not find the .so file). > > Is there a more graceful solution to keeping the libraries in a more > appropriate place and still having python find them? The fact that they're installed to the wrong place and not linked or named correctly is a VTK problem. Someone should fix it. Obviously they're not leveraging distutils well enough, which takes care of these sorts of issues. In order to add locations to Python's search path you should look into .pth files: http://bob.pythonmac.org/archives/2005/02/06/using-pth-files-for- python-development/ -bob From rkern at ucsd.edu Thu Jun 23 05:35:27 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 22 Jun 2005 20:35:27 -0700 Subject: [Pythonmac-SIG] Python VTK shared libraries In-Reply-To: <3921833D-9E31-4E40-91FA-891148AA0BD3@chem.ucsb.edu> References: <3921833D-9E31-4E40-91FA-891148AA0BD3@chem.ucsb.edu> Message-ID: <42BA2DFF.6030508@ucsd.edu> Vladimir Shapovalov wrote: > Recently I had to install Python interface for VTK. One of the > problems I ran into was that the shared libraries built for VTK would > not be seen by Python whatever path I put them into. The only way I > found to make them visible was to make links in the site-pckages/ > vtk_python directory. In addition, the link to > libvtkRenderingPythonTkWidgets.dylib had to be named > libvtkRenderingPythonTkWidgets.so to make it work (otherwise python > complained it could not find the .so file). The Python modules should already be .so files that have symbolic links to them (made by "python setup.py install"). libvtkRenderingPythonTkWidgets.dylib isn't a Python module as far as I can tell. > Is there a more graceful solution to keeping the libraries in a more > appropriate place and still having python find them? .pth file perhaps, but symbolic links are fine. Note that there other problems. The .so's and .dylib's point back to the build directory for the library dependencies. I used macholib from py2app to rewrite the headers to point to the installation directory. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From Hubert.Holin at meteo.fr Thu Jun 23 17:54:39 2005 From: Hubert.Holin at meteo.fr (Hubert Holin) Date: Thu, 23 Jun 2005 17:54:39 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: Message-ID: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> Somewhere in the E.U., le 23/06/2005 Bonjour Thank you for all the replies. On 21 juin 2005, at 22:35, pythonmac-sig-request at python.org wrote: > From: Bob Ippolito > Date: 21 juin 2005 17:49:59 HAEC > To: Hubert Holin > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] Finding what a broken alias refers to. > > > On Jun 21, 2005, at 11:21 AM, Hubert Holin wrote: > > >> For my first Python steps on the Mac, I am trying to find >> information on all broken aliases in a folder hierarchy (i.e. aliases >> which were created thru the Finder and which no longer reference an >> existing file or folder). While I am able to find the aliases which >> are broken, I would like to go a step further, and indicate *what* >> the alias thinks it is referencing (the "original" item in the Finder >> info), and I am encountering some problem. >> > > This is not a good first project. Using Carbon isn't very > straightforward from any language. Well, I wanted a project which might yield some useful result as well. I agree that Carbon is not the most pleasant technology to work with. >> It would seem that the best function to get that information is >> thru the FSFollowFinderAlias function of the Alias Manager, but >> unfortunately the only version which is wrapped is a member of the >> Alias class, which I have not found a way to use, as all I have is an >> instance of FSRef. >> > > I think you have to use FSIsAliasFile to determine if it's an > alias, and if so, then you load in the alias resource and and > create an Alias out of that. Carbon is painful. I have indeed used FSIsAliasFile to determine if it's an alias. I just wanted to then use an OS-supplied method to see where it pointed rather than investigate what I fear has become an opaque type. I see that Hamish Sanderson has come to my rescue (see below) by elaborating your point! >> Likewise, the Alias Manager functions FSMatchAlias and >> FSMatchAliasNoUI seem not to be wrapped. >> >> What can I do, short of writing a C++ extension? >> > > Writing a C extension or using the FFI available in PyObjC or > ctypes are the only ways to bridge unwrapped functions. > > -bob A question: I'd much, much rather use C++ than C (and never mind Objective-C). I have some idea of how to write Python extensions in C++, using Boost.Python. From reading what little documentation there is on Objective-C++, I see there are possible issues between the C++ and Objective-C runtimes. If I build a C++ extension and intend to use it along with PyObjC, am I inviting trouble ;-) ? > From: Chinook > Date: 21 juin 2005 18:20:07 HAEC > To: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] Finding what a broken alias refers to. > Reply-To: chinook.nr at tds.net > > > On Tue, 21 Jun 2005 11:21:17 -0400, Hubert Holin wrote > (in article <7AC46FDC-4C55-4486-9D86-CDC7D485A376 at meteo.fr>): [SNIP same as above] > > Here is a snippet from one of my utilities that might help. > > # deal with directory item relative to type > if os.path.islink(dlfpath): > > # directory item a symbolic link, generate row of cells > csvline = _cellpos(dlfpath, alvl, blvl, clvl) > # identify as link with path > lptr = '#Sym Link > ' + os.readlink(dlfpath) > csvline = csvline + '"' + lptr + '"' > > elif FSResolveAliasFile(dlfpath, 1)[2]: > > # directory item an Aqua alias, generate row of cells > csvline = _cellpos(dlfpath, alvl, blvl, clvl) > # identify as alias with target > lptr = '#Alias > ' + FSResolveAliasFile(dlfpath, > 1)[0].as_pathname() > csvline = csvline + '"' + lptr + '"' > > > Lee C Thank you for the suggestion. May I ask where "_cellpos" is documented? Yes, I am a newbee in more fields than one :-) . On 22 juin 2005, at 12:00, pythonmac-sig-request at python.org wrote: > > From: has > Date: 22 juin 2005 01:39:32 HAEC > To: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] Finding what a broken alias refers to. > > > Hubert Holin wrote: > > >> It would seem that the best function to get that information is >> thru the FSFollowFinderAlias function of the Alias Manager, but >> unfortunately the only version which is wrapped is a member of the >> Alias class, which I have not found a way to use, as all I have is an >> instance of FSRef. >> > > As Bob says, you want to create a new Alias out of the alias file's > alis resource, e.g.: > > from Carbon.File import FSRef, Alias > from Carbon.Res import * > > f = FSRef("/Users/has/a 'broken' Finder alias file") > > resfile = FSOpenResFile(f, 1) > data = Get1IndResource('alis', 1).data > CloseResFile(resfile) > alias = Alias(rawdata=data) > > To get any useful data out of this 'broken' alias you'll have to > get your hands dirty though. Yes, well, as this is mostly a learning experience (with hopefully useful output), I try to see just how much functionality I can get. Already listing the broken aliases (which I have managed) is useful, at least for me. >> Likewise, the Alias Manager functions FSMatchAlias and >> FSMatchAliasNoUI seem not to be wrapped. >> > > Ditto FSCopyAliasInfo. Unfortunately I don't think Python's Carbon > wrappers have been updated much since their creation back in pre-OS > X days. You could probably patch up a copy yourself without much > trouble; it's a slightly hackish solution, but not that hard to do > (I've done it myself and my C's rubbish). > > HTH > > has > -- > http://freespace.virgin.net/hamish.sanderson/ Is there a way I can contribute (using some of the time slots I now try to put aside for Boost and the unreasonable number of things I intend to do)? Merci Hubert Holin From bob at redivi.com Thu Jun 23 19:13:30 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 23 Jun 2005 13:13:30 -0400 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> Message-ID: <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> On Jun 23, 2005, at 11:54 AM, Hubert Holin wrote: > On 21 juin 2005, at 22:35, pythonmac-sig-request at python.org wrote: > > >> From: Bob Ippolito >> Date: 21 juin 2005 17:49:59 HAEC >> To: Hubert Holin >> Cc: pythonmac-sig at python.org >> Subject: Re: [Pythonmac-SIG] Finding what a broken alias refers to. >> >> >> On Jun 21, 2005, at 11:21 AM, Hubert Holin wrote: >> >>> Likewise, the Alias Manager functions FSMatchAlias and >>> FSMatchAliasNoUI seem not to be wrapped. >>> >>> What can I do, short of writing a C++ extension? >>> >>> >> >> Writing a C extension or using the FFI available in PyObjC or >> ctypes are the only ways to bridge unwrapped functions. > > A question: I'd much, much rather use C++ than C (and never > mind Objective-C). I have some idea of how to write Python extensions > in C++, using Boost.Python. From reading what little documentation > there is on Objective-C++, I see there are possible issues between > the C++ and Objective-C runtimes. If I build a C++ extension and > intend to use it along with PyObjC, am I inviting trouble ;-) ? Yes, but you really don't want to use something like Boost unless you have a fair amount of existing C++ code. In this case you need one or two functions, and it's more than overkill. C++ code and Objective-C code play together just fine. In the case of Objective-C++ (a separate language, but the same runtime), you can mix the two in the same source file with a few limitations (namely putting C++ in ivars and expecting ctor/dtor stuff to happen automatically, etc.). This is a don't-write-broken-source-code kind of issue, it can't happen by mixing things at runtime with Python. >> From: Chinook >> Date: 21 juin 2005 18:20:07 HAEC >> To: pythonmac-sig at python.org >> Subject: Re: [Pythonmac-SIG] Finding what a broken alias refers to. >> Reply-To: chinook.nr at tds.net >> >> >> csvline = _cellpos(dlfpath, alvl, blvl, clvl) > > Thank you for the suggestion. May I ask where "_cellpos" is > documented? Yes, I am a newbee in more fields than one :-) . In his project, if you're lucky. It's certainly nothing standard. > On 22 juin 2005, at 12:00, pythonmac-sig-request at python.org wrote: > >> >> From: has >> Date: 22 juin 2005 01:39:32 HAEC >> To: pythonmac-sig at python.org >> Subject: Re: [Pythonmac-SIG] Finding what a broken alias refers to. >> >>> Likewise, the Alias Manager functions FSMatchAlias and >>> FSMatchAliasNoUI seem not to be wrapped. >>> >>> >> >> Ditto FSCopyAliasInfo. Unfortunately I don't think Python's Carbon >> wrappers have been updated much since their creation back in pre-OS >> X days. You could probably patch up a copy yourself without much >> trouble; it's a slightly hackish solution, but not that hard to do >> (I've done it myself and my C's rubbish). > > Is there a way I can contribute (using some of the time > slots I now try to put aside for Boost and the unreasonable number of > things I intend to do)? Currently, all of the wrapped Carbon functionality is done with an ancient, fragile and undocumented parser/generator called bgen, which parses out Universal Headers and spits out potentially working Python bindings. In order to make a useful contribution to those modules, you'd have to learn it, which really isn't worth doing. For your own purposes you could hack the C code it spits out directly, but unless it's done with bgen, it's not going to end up in Python CVS. -bob From dleewo at gmail.com Thu Jun 23 19:28:22 2005 From: dleewo at gmail.com (Derek Lee-Wo) Date: Thu, 23 Jun 2005 13:28:22 -0400 Subject: [Pythonmac-SIG] Eclipse + PyDev In-Reply-To: References: <42B993EB.5010405@noaa.gov> Message-ID: <17b1a9f105062310284e071d68@mail.gmail.com> > I tried it. My initial impression was unfavorable -- it seemed cluttered > and unfocused and I had trouble figuring out how to do the stuff I > wanted to do. But it may just be a learning curve issue. I'd love to > hear more from folks who really know it. Is it fair to say most of the issues people have with it are because of Eclipse rather than the PyDev plugin? I'm used the Eclipse environment (and IBM's WSAD) so I know how to find my way around and I'm used to the memory and CPU footprint. I installed the PyDev plugin. While I've only used it briefly, it seems to be fine. Just wondering if there some other gotchas or issues other than Eclipse itself. Derek From sw at wordtech-software.com Thu Jun 23 20:28:20 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Thu, 23 Jun 2005 14:28:20 -0400 Subject: [Pythonmac-SIG] Eclipse + PyDev In-Reply-To: <17b1a9f105062310284e071d68@mail.gmail.com> References: <42B993EB.5010405@noaa.gov> <17b1a9f105062310284e071d68@mail.gmail.com> Message-ID: <42BAFF44.5000703@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've tried to use PyDev, but apart from the speed issue, Eclipse's interface is so sprawling and unintuitive that I haven't even figured out how to get PyDev started. Perhaps I'm missing something, and if you find Eclipse a pleasant environment to work in, go for it. Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com Derek Lee-Wo wrote: |>I tried it. My initial impression was unfavorable -- it seemed cluttered |>and unfocused and I had trouble figuring out how to do the stuff I |>wanted to do. But it may just be a learning curve issue. I'd love to |>hear more from folks who really know it. | | | Is it fair to say most of the issues people have with it are because | of Eclipse rather than the PyDev plugin? | | I'm used the Eclipse environment (and IBM's WSAD) so I know how to | find my way around and I'm used to the memory and CPU footprint. I | installed the PyDev plugin. While I've only used it briefly, it seems | to be fine. Just wondering if there some other gotchas or issues | other than Eclipse itself. | | Derek | _______________________________________________ | Pythonmac-SIG maillist - Pythonmac-SIG at python.org | http://mail.python.org/mailman/listinfo/pythonmac-sig | | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuv9EJmdQs+6YVcoRAseHAJ9E9Ytwdenw2PDsYKRwmbfGjUD7zgCfdSD9 goeEppXes2wjCsxU4RzNj6E= =rZnw -----END PGP SIGNATURE----- From rowen at cesmail.net Thu Jun 23 21:56:25 2005 From: rowen at cesmail.net (Russell E. Owen) Date: Thu, 23 Jun 2005 12:56:25 -0700 Subject: [Pythonmac-SIG] Eclipse + PyDev References: <42B993EB.5010405@noaa.gov> <17b1a9f105062310284e071d68@mail.gmail.com> Message-ID: In article <17b1a9f105062310284e071d68 at mail.gmail.com>, Derek Lee-Wo wrote: > > I tried it. My initial impression was unfavorable -- it seemed cluttered > > and unfocused and I had trouble figuring out how to do the stuff I > > wanted to do. But it may just be a learning curve issue. I'd love to > > hear more from folks who really know it. > > Is it fair to say most of the issues people have with it are because > of Eclipse rather than the PyDev plugin? > > I'm used the Eclipse environment (and IBM's WSAD) so I know how to > find my way around and I'm used to the memory and CPU footprint. I > installed the PyDev plugin. While I've only used it briefly, it seems > to be fine. Just wondering if there some other gotchas or issues > other than Eclipse itself. My recollection was that Eclipse itself was much of the problem. But I don't recall the details. You're in a much better position to evaluate it than I am, since you know your way around Eclipse. Please let us know what you think of the PyDev plugin! -- Russell From gravylovingslut at blueyonder.co.uk Thu Jun 23 21:41:56 2005 From: gravylovingslut at blueyonder.co.uk (Gravy) Date: Thu, 23 Jun 2005 20:41:56 +0100 Subject: [Pythonmac-SIG] Eclipse + PyDev Message-ID: <9F93E702-0F4F-4D2B-94BA-3C848823607C@blueyonder.co.uk> I've been using Eclipse for a while now (just started using 3.1) and for the first time find the latest version of PyDev useful. I agree that the eclipse interface is "sprawling" but stick with it and read the documentation. It's really developer friendly once you get the hang of it. All I'd like now is for PyDev to support automated PyUnit test build and run for TDD :-) John Ochiltree From Henning.Ramm at mediapro-gmbh.de Thu Jun 23 23:03:33 2005 From: Henning.Ramm at mediapro-gmbh.de (Henning.Ramm@mediapro-gmbh.de) Date: Thu, 23 Jun 2005 23:03:33 +0200 Subject: [Pythonmac-SIG] Eclipse + PyDev Message-ID: >I've tried to use PyDev, but apart from the speed issue, Eclipse's >interface is so sprawling and unintuitive that I haven't even figured >out how to get PyDev started. Perhaps I'm missing something, and if you >find Eclipse a pleasant environment to work in, go for it. I tried Eclipse yesterday and today and needed a while until I got PyDev installed: You must add the update URL as new remote repository in the update wizard (see Help menu), it doesn't work to just copy the files; Eclipse3 seems to need a special (and missing) dotfile to recognize the new plugin. I didn't try to edit Python code yet, but I agree that the interface is rather non-intuitive and non-MacOSy, and I don't like that it needs very long to start (as every Java application on MacOS X, i.e. on my old G4/400), but perhaps the mightyness of Blackout, ehm, Eclipse is worth the hassle. (And I could use it for Perl, PHP, HTML etc. also) I just tried also Eric3 (seems to support only Apple's Python 2.3) and DrPython (starts fast, seems lean, has ugly icons), I will need some time to test them. Best regards, Henning Hraban Ramm S?dkurier Medienhaus / MediaPro Support/Admin/Development Dept. From hengist.podd at virgin.net Fri Jun 24 00:52:28 2005 From: hengist.podd at virgin.net (has) Date: Thu, 23 Jun 2005 23:52:28 +0100 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> Message-ID: Bob wrote: >>Is there a way I can contribute (using some of the time >>slots I now try to put aside for Boost and the unreasonable number of >>things I intend to do)? > >Currently, all of the wrapped Carbon functionality is done with an ancient, fragile and undocumented parser/generator called bgen, which parses out Universal Headers and spits out potentially working Python bindings. In order to make a useful contribution to those modules, you'd have to learn it, which really isn't worth doing. For your own purposes you could hack the C code it spits out directly, but unless it's done with bgen, it's not going to end up in Python CVS. I blame Joseph Heller myself. has -- http://freespace.virgin.net/hamish.sanderson/ From mathieu at garambrogne.net Fri Jun 24 11:28:12 2005 From: mathieu at garambrogne.net (Mathieu Lecarme) Date: Fri, 24 Jun 2005 11:28:12 +0200 Subject: [Pythonmac-SIG] Eclipse + PyDev Message-ID: <42BBD22C.5070705@garambrogne.net> I use eclipse for my daily job, so pydev is a goode news. eclipse works fine with CVS and subversion, and its visual diff is nice. I didn't try debugging python with this tools, but syntax coloring, code navigation (function, class ...), code completion are very nice. Debbuging seems to work (http://pydev.sourceforge.net/debug.html), i'll try it later. I don't use debugger often i'd rather use crash report. Eclipse is a very cute cross plateform developpement tool with nice java, php and python support. M. From ronaldoussoren at mac.com Fri Jun 24 11:41:53 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 24 Jun 2005 11:41:53 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> Message-ID: <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> On 24-jun-2005, at 0:52, has wrote: > Bob wrote: > > >>> Is there a way I can contribute (using some of the time >>> slots I now try to put aside for Boost and the unreasonable >>> number of >>> things I intend to do)? >>> >> >> Currently, all of the wrapped Carbon functionality is done with >> an ancient, fragile and undocumented parser/generator called >> bgen, which parses out Universal Headers and spits out >> potentially working Python bindings. In order to make a useful >> contribution to those modules, you'd have to learn it, which >> really isn't worth doing. For your own purposes you could hack >> the C code it spits out directly, but unless it's done with bgen, >> it's not going to end up in Python CVS. >> > > I blame Joseph Heller myself. Why? AFAIK he has nothing to do with the mess that's called bgen ;-). IIRC a little know programmer named Guido wrote that code. BTW. I agree with Bob's classification of bgen, and would like to add that it is not only undocumented but also hard to understand without documention. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050624/a80f3aaa/smime.bin From bob at redivi.com Fri Jun 24 12:03:22 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 24 Jun 2005 06:03:22 -0400 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> Message-ID: <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> On Jun 24, 2005, at 5:41 AM, Ronald Oussoren wrote: > > On 24-jun-2005, at 0:52, has wrote: > > >> Bob wrote: >> >> >> >>>> Is there a way I can contribute (using some of the time >>>> slots I now try to put aside for Boost and the unreasonable >>>> number of >>>> things I intend to do)? >>>> >>>> >>> >>> Currently, all of the wrapped Carbon functionality is done with >>> an ancient, fragile and undocumented parser/generator called >>> bgen, which parses out Universal Headers and spits out >>> potentially working Python bindings. In order to make a useful >>> contribution to those modules, you'd have to learn it, which >>> really isn't worth doing. For your own purposes you could hack >>> the C code it spits out directly, but unless it's done with >>> bgen, it's not going to end up in Python CVS. >>> >>> >> >> I blame Joseph Heller myself. >> > > Why? AFAIK he has nothing to do with the mess that's called > bgen ;-). IIRC a little know programmer named Guido wrote that code. > > BTW. I agree with Bob's classification of bgen, and would like to > add that it is not only undocumented but also hard to understand > without documention. It was a relatively esoteric reference; Joseph Heller is the author of Catch-22. Basically, he meant that neither choice is good (and I agree). -bob From ronaldoussoren at mac.com Fri Jun 24 12:13:50 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 24 Jun 2005 12:13:50 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> Message-ID: <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> On 24-jun-2005, at 12:03, Bob Ippolito wrote: > > On Jun 24, 2005, at 5:41 AM, Ronald Oussoren wrote: > > >> >> On 24-jun-2005, at 0:52, has wrote: >> >> >> >>> Bob wrote: >>> >>> >>> >>> >>>>> Is there a way I can contribute (using some of the time >>>>> slots I now try to put aside for Boost and the unreasonable >>>>> number of >>>>> things I intend to do)? >>>>> >>>>> >>>>> >>>> >>>> Currently, all of the wrapped Carbon functionality is done with >>>> an ancient, fragile and undocumented parser/generator called >>>> bgen, which parses out Universal Headers and spits out >>>> potentially working Python bindings. In order to make a useful >>>> contribution to those modules, you'd have to learn it, which >>>> really isn't worth doing. For your own purposes you could hack >>>> the C code it spits out directly, but unless it's done with >>>> bgen, it's not going to end up in Python CVS. >>>> >>>> >>>> >>> >>> I blame Joseph Heller myself. >>> >>> >> >> Why? AFAIK he has nothing to do with the mess that's called >> bgen ;-). IIRC a little know programmer named Guido wrote that code. >> >> BTW. I agree with Bob's classification of bgen, and would like to >> add that it is not only undocumented but also hard to understand >> without documention. >> > > It was a relatively esoteric reference; Joseph Heller is the author > of Catch-22. Basically, he meant that neither choice is good (and > I agree). I knew that, but maybe the smiley was too small :-). The name looked familiar and Google helped me out. Someone with copious free time should build new Carbon wrappers, we can than ask if the existing wrappers can be dropped in a future version of Python. Sadly enough that probably is with python 2.6 at the earliest, which is a long way away. Ronald From bob at redivi.com Fri Jun 24 12:22:29 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 24 Jun 2005 06:22:29 -0400 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> Message-ID: On Jun 24, 2005, at 6:13 AM, Ronald Oussoren wrote: > > On 24-jun-2005, at 12:03, Bob Ippolito wrote: > > >> >> On Jun 24, 2005, at 5:41 AM, Ronald Oussoren wrote: >> >> >> >>> >>> On 24-jun-2005, at 0:52, has wrote: >>> >>> >>> >>> >>>> Bob wrote: >>>> >>>> >>>> >>>> >>>> >>>>>> Is there a way I can contribute (using some of the time >>>>>> slots I now try to put aside for Boost and the unreasonable >>>>>> number of >>>>>> things I intend to do)? >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> Currently, all of the wrapped Carbon functionality is done with >>>>> an ancient, fragile and undocumented parser/generator called >>>>> bgen, which parses out Universal Headers and spits out >>>>> potentially working Python bindings. In order to make a useful >>>>> contribution to those modules, you'd have to learn it, which >>>>> really isn't worth doing. For your own purposes you could hack >>>>> the C code it spits out directly, but unless it's done with >>>>> bgen, it's not going to end up in Python CVS. >>>>> >>>>> >>>>> >>>>> >>>> >>>> I blame Joseph Heller myself. >>>> >>>> >>>> >>> >>> Why? AFAIK he has nothing to do with the mess that's called >>> bgen ;-). IIRC a little know programmer named Guido wrote that code. >>> >>> BTW. I agree with Bob's classification of bgen, and would like to >>> add that it is not only undocumented but also hard to understand >>> without documention. >>> >>> >> >> It was a relatively esoteric reference; Joseph Heller is the author >> of Catch-22. Basically, he meant that neither choice is good (and >> I agree). >> > > I knew that, but maybe the smiley was too small :-). The name looked > familiar and Google helped me out. > > Someone with copious free time should build new Carbon wrappers, we > can than ask if the existing wrappers can be dropped in a future > version of Python. Sadly enough that probably is with python 2.6 at > the earliest, which is a long way away. The problem with Carbon wrappers is that they have such diminishing returns. The longer you wait, the less reason there is to use Carbon in the first place. If we just sit on our hands for another few years, all of the functionality in Carbon will be available elsewhere anyway :) -bob From ronaldoussoren at mac.com Fri Jun 24 12:36:02 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 24 Jun 2005 12:36:02 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> Message-ID: On 24-jun-2005, at 12:22, Bob Ippolito wrote: >> >> Someone with copious free time should build new Carbon wrappers, we >> can than ask if the existing wrappers can be dropped in a future >> version of Python. Sadly enough that probably is with python 2.6 at >> the earliest, which is a long way away. >> > > The problem with Carbon wrappers is that they have such diminishing > returns. The longer you wait, the less reason there is to use > Carbon in the first place. > > If we just sit on our hands for another few years, all of the > functionality in Carbon will be available elsewhere anyway :) I have no intention whatsoever to work on new Carbon wrappers because all functionality I need is already available elsewhere. However, we do need a plan to get rid of the current wrappers (especially the Carbon.CF ones) to make room for better ones. I do want to add wrappers for CoreFoundation (and frameworks based on CoreFoundation) to PyObjC and would like to drop for Carbon.CF when that's done. There may be other frameworks that are useful (OSA stuff, QuickTime) and could use wrappers with betters tests and documentation. Ronald From mario at ruggier.org Fri Jun 24 15:16:44 2005 From: mario at ruggier.org (Mario Ruggier) Date: Fri, 24 Jun 2005 15:16:44 +0200 Subject: [Pythonmac-SIG] [Durus-users] Problem compiling Durus on Tiger In-Reply-To: <3a48a11f050622075973a317cb@mail.gmail.com> References: <6df9fd8fe21f73746becac2948e12a7d@ruggier.org> <9EC7C954-B3BD-4EC8-B5A7-AC4FCDAF5B6F@mems-exchange.org> <3a48a11f050622075973a317cb@mail.gmail.com> Message-ID: Hello, i was trying to install Durus object db on a new Tiger powerbook, with just DeveloperTools and gcc-3.3 packages installed additionally. However, the following problem occurs: building 'durus._persistent' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c _persistent.c -o build/temp.darwin-8.1.0-Power_Macintosh-2.3/_persistent.o _persistent.c:6:20: Python.h: No such file or directory _persistent.c:7:26: structmember.h: No such file or directory ... Peter (message below) suggests Bob's TigerPython24Fix. I have tried but it needs python 2.4 not the stock python 2.3.5. How does one fix the stock python on 10.4 ?!? mario On Jun 22, 2005, at 4:59 PM, Peter Herndon wrote: > The Python build on Tiger is broken, it does not include the header > file. David, you probably did an upgrade install, or have other > modifications made at some point that provided the header. The fix is > at http://undefined.org/python/#TigerPython24Fix -- notice Bob's note, > "due to Tiger header regressions". I don't think you need to install > 2.4.1 in order to use the fix, though. IIRC, I used it once I > upgraded, and I've built extensions since then. Durus in particular. > > You may want to redirect this inquiry to the python-mac sig mailing > list, or just get Bob Ippolito's attention. They'll know the details > better than I. > > ---Peter Herndon > _______________________________________________ > Durus-users mailing list > Durus-users at mems-exchange.org > http://mail.mems-exchange.org/mailman/listinfo/durus-users From delza at livingcode.org Fri Jun 24 15:27:59 2005 From: delza at livingcode.org (Dethe Elza) Date: Fri, 24 Jun 2005 06:27:59 -0700 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> Message-ID: Ronald Oussoren wrote: > Someone with copious free time should build new Carbon wrappers, we > can than ask if the existing wrappers can be dropped in a future > version of Python. Sadly enough that probably is with python 2.6 at > the earliest, which is a long way away. > Would there be any benefit to documenting bgen? It seems like the functionality it provides is useful, so that might be the first step to building a worthy replacement. Or do you feel that the bgen approach is fundamentally flawed? And if so, what should be done to replace it? You're not suggesting manually wrapping Carbon, are you? Bob Ippolito wrote: > The problem with Carbon wrappers is that they have such diminishing > returns. The longer you wait, the less reason there is to use Carbon > in the first place. > > If we just sit on our hands for another few years, all of the > functionality in Carbon will be available elsewhere anyway :) > So in that scenario we don't need bgen at all, right? But there is still a significant chunck of functionality that is not exposed to Cocoa. Unfortunately, I don't know what the borders look like until I stumble across them (and the new Quicktime framework definitely shifted the borders pretty significantly). > I have no intention whatsoever to work on new Carbon wrappers because > all functionality I need is already available elsewhere. However, we > do need a plan to get rid of the current wrappers (especially the > Carbon.CF ones) to make room for better ones. I do want to add > wrappers for CoreFoundation (and frameworks based on CoreFoundation) > to PyObjC and would like to drop for Carbon.CF when that's done. > > There may be other frameworks that are useful (OSA stuff, QuickTime) > and could use wrappers with betters tests and documentation. > Is there a hitlist of frameworks that would be good to support, but are not supported yet? What are some of the best targets for someone who wants to jump in and help out? --Dethe "...our universities, I suggest, are not half-way out of the fifteenth century. [...] The three or four years' course of lectures, the bachelor who knows some, the master who knows most, the doctor who knows all, are ideas that have come down unimpaired from the Middle Ages. Nowadays no one should end his learning while he lives and these university degrees are preposterous. [...] Educationally we are still for all practical purposes in the coach and horse and galley stage." H. G. Wells From bob at redivi.com Fri Jun 24 15:29:48 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 24 Jun 2005 09:29:48 -0400 Subject: [Pythonmac-SIG] [Durus-users] Problem compiling Durus on Tiger In-Reply-To: References: <6df9fd8fe21f73746becac2948e12a7d@ruggier.org> <9EC7C954-B3BD-4EC8-B5A7-AC4FCDAF5B6F@mems-exchange.org> <3a48a11f050622075973a317cb@mail.gmail.com> Message-ID: <4CCFB278-633F-4C8A-96E3-2DC9DFF4556D@redivi.com> He's right, your installation is broken somehow and is missing files. Python24Fix is only a monkeypatch to fix my distribution of Python 2.4.1, it has nothing to do with anything else. I'd re-install the latest Xcode with all the goodies, and if that doesn't work, then archive+install Mac OS X 10.4. Something is wrong with your system, if you're lucky, it's just Xcode. -bob On Jun 24, 2005, at 9:16 AM, Mario Ruggier wrote: > Hello, > > i was trying to install Durus object db on a new Tiger powerbook, with > just DeveloperTools and gcc-3.3 packages installed additionally. > However, the following problem occurs: > > building 'durus._persistent' extension > gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp > -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall > -Wstrict-prototypes > -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ > python2.3 -c _persistent.c -o > build/temp.darwin-8.1.0-Power_Macintosh-2.3/_persistent.o > _persistent.c:6:20: Python.h: No such file or directory > _persistent.c:7:26: structmember.h: No such file or directory > ... > > Peter (message below) suggests Bob's TigerPython24Fix. I have tried > but > it needs python 2.4 not the stock python 2.3.5. > > How does one fix the stock python on 10.4 ?!? > > mario > > > On Jun 22, 2005, at 4:59 PM, Peter Herndon wrote: > > >> The Python build on Tiger is broken, it does not include the header >> file. David, you probably did an upgrade install, or have other >> modifications made at some point that provided the header. The >> fix is >> at http://undefined.org/python/#TigerPython24Fix -- notice Bob's >> note, >> "due to Tiger header regressions". I don't think you need to install >> 2.4.1 in order to use the fix, though. IIRC, I used it once I >> upgraded, and I've built extensions since then. Durus in particular. >> >> You may want to redirect this inquiry to the python-mac sig mailing >> list, or just get Bob Ippolito's attention. They'll know the details >> better than I. >> >> ---Peter Herndon >> _______________________________________________ >> Durus-users mailing list >> Durus-users at mems-exchange.org >> http://mail.mems-exchange.org/mailman/listinfo/durus-users >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From bob at redivi.com Fri Jun 24 15:35:33 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 24 Jun 2005 09:35:33 -0400 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> Message-ID: <2CF48B1C-55D5-499E-9FD6-E5973CCC41B6@redivi.com> On Jun 24, 2005, at 9:27 AM, Dethe Elza wrote: > Ronald Oussoren wrote: > > >> Someone with copious free time should build new Carbon wrappers, we >> can than ask if the existing wrappers can be dropped in a future >> version of Python. Sadly enough that probably is with python 2.6 at >> the earliest, which is a long way away. >> >> > > Would there be any benefit to documenting bgen? It seems like the > functionality it provides is useful, so that might be the first > step to building a worthy replacement. Or do you feel that the bgen > approach is fundamentally flawed? And if so, what should be done > to replace it? You're not suggesting manually wrapping Carbon, are > you? The bgen approach is pretty flawed, it's an incomplete parser of the C header grammar that Apple *used to* use. As soon as Apple stops maintaining Universal Headers, bgen will be more or less dead in the water. We have some slightly more technically sound parsing in PyObjC's sandbox, but it's designed for the Objective-C grammar, and doesn't cover all of C. If it was really that useful, it'd have been used for *something* other than the Carbon stuff. It's ancient. Nobody is suggesting that we manually wrap Carbon. > Bob Ippolito wrote: > > >> The problem with Carbon wrappers is that they have such diminishing >> returns. The longer you wait, the less reason there is to use Carbon >> in the first place. >> >> If we just sit on our hands for another few years, all of the >> functionality in Carbon will be available elsewhere anyway :) >> >> > > So in that scenario we don't need bgen at all, right? But there is > still a significant chunck of functionality that is not exposed to > Cocoa. Unfortunately, I don't know what the borders look like > until I stumble across them (and the new Quicktime framework > definitely shifted the borders pretty significantly). Most of the significant chunks of (new) functionality lives in CoreFoundation-like libraries, which are close enough to Objective-C that PyObjC will wrap them eventually. PyObjC will not try and make OO wrappers for any of the functionality, though, so there will be a 1:1 correspondence with the Apple documentation and what you should be doing from Python. >> I have no intention whatsoever to work on new Carbon wrappers because >> all functionality I need is already available elsewhere. However, we >> do need a plan to get rid of the current wrappers (especially the >> Carbon.CF ones) to make room for better ones. I do want to add >> wrappers for CoreFoundation (and frameworks based on CoreFoundation) >> to PyObjC and would like to drop for Carbon.CF when that's done. >> >> There may be other frameworks that are useful (OSA stuff, QuickTime) >> and could use wrappers with betters tests and documentation. > > Is there a hitlist of frameworks that would be good to support, but > are not supported yet? What are some of the best targets for > someone who wants to jump in and help out? The most useful work would be hacking on the parser/generator in PyObjC's sandbox. -bob From delza at livingcode.org Fri Jun 24 15:41:55 2005 From: delza at livingcode.org (Dethe Elza) Date: Fri, 24 Jun 2005 06:41:55 -0700 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <2CF48B1C-55D5-499E-9FD6-E5973CCC41B6@redivi.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> <2CF48B1C-55D5-499E-9FD6-E5973CCC41B6@redivi.com> Message-ID: On 24-Jun-05, at 6:35 AM, Bob Ippolito wrote: >> Is there a hitlist of frameworks that would be good to support, >> but are not supported yet? What are some of the best targets for >> someone who wants to jump in and help out? >> > > The most useful work would be hacking on the parser/generator in > PyObjC's sandbox. OK, thanks! That's what I wanted to know. --Dethe Windows has detected the mouse has moved. Please restart your system for changes to take effect. From ronaldoussoren at mac.com Fri Jun 24 15:43:53 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 24 Jun 2005 15:43:53 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> Message-ID: On 24-jun-2005, at 15:27, Dethe Elza wrote: > Ronald Oussoren wrote: > > >> Someone with copious free time should build new Carbon wrappers, we >> can than ask if the existing wrappers can be dropped in a future >> version of Python. Sadly enough that probably is with python 2.6 at >> the earliest, which is a long way away. >> >> > > Would there be any benefit to documenting bgen? It seems like the > functionality it provides is useful, so that might be the first > step to building a worthy replacement. Or do you feel that the bgen > approach is fundamentally flawed? And if so, what should be done > to replace it? You're not suggesting manually wrapping Carbon, are > you? Documenting bgen would surely help. But to do that you'd have to learn bgen first and that's not something I'd want to do unless I wanted to use it. I'm not happy with the way that the Carbon wrappers work, adding Carbon functions as methods of seemingly related classes. This makes it harder to map documentation for Carbon to Python. It is also ugly. But this might not be a problem with bgen itself. I'd prefer to see the function wrapped as functions in the Carbon module. If needed one could add convenience methods to type wrappers as well, but with a more pythonic interface. That would require more work because you'd have to make up a nice interface and document it. > > Bob Ippolito wrote: > > >> The problem with Carbon wrappers is that they have such diminishing >> returns. The longer you wait, the less reason there is to use Carbon >> in the first place. >> >> If we just sit on our hands for another few years, all of the >> functionality in Carbon will be available elsewhere anyway :) >> >> > > So in that scenario we don't need bgen at all, right? But there is > still a significant chunck of functionality that is not exposed to > Cocoa. Unfortunately, I don't know what the borders look like > until I stumble across them (and the new Quicktime framework > definitely shifted the borders pretty significantly). bgen isn't really needed in the first place. You could use the scanframework script of PyObjC as well (whenever that is finished), possibly with some tweaking. In a way bgen is simular to swig, but with different issues. > > > >> I have no intention whatsoever to work on new Carbon wrappers because >> all functionality I need is already available elsewhere. However, we >> do need a plan to get rid of the current wrappers (especially the >> Carbon.CF ones) to make room for better ones. I do want to add >> wrappers for CoreFoundation (and frameworks based on CoreFoundation) >> to PyObjC and would like to drop for Carbon.CF when that's done. >> >> There may be other frameworks that are useful (OSA stuff, QuickTime) >> and could use wrappers with betters tests and documentation. >> >> > > Is there a hitlist of frameworks that would be good to support, but > are not supported yet? What are some of the best targets for > someone who wants to jump in and help out? The best way to start is find some framework that you want to use and check if the wrappers for it exist and/or work. Ronald From gcanyon at inspiredlogic.com Fri Jun 24 16:08:43 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Fri, 24 Jun 2005 07:08:43 -0700 Subject: [Pythonmac-SIG] [Boa Constr] Re: Boa stability issues In-Reply-To: <42BC0225.6050409@e.co.za> References: <42B820FA.3010702@wordtech-software.com> <42BC0225.6050409@e.co.za> Message-ID: On Jun 24, 2005, at 5:52 AM, Riaan Booysen wrote: > > >> | Installing the app version of Boa Constructor seems to have >> broken my >> | previously working bunch-of-files-in-a-folder installation of >> Boa. It >> | now gives me an error: >> | >> | 'module' object has no attribute >> | 'wxSystemSettings_GetSystemMetric' >> > > This is code from before 0.4.3. I think the "bunch-of-files-in-a- > folder > installation" is now being run with a different version of wxPython > causing the problem. Is there a way I could check this? As far as I know I have only one install of Python and wxPython. While trying to get Boa to work I removed Python and wxPython completely and then installed only the most current version, requested by Boa. And for anyone who's interested in telling me what a bad idea it is to remove the built-in installation of Python, or that Python can have two installs without a problem, I understand all that -- I've already been lectured on it ;-) From mario at ruggier.org Fri Jun 24 16:25:24 2005 From: mario at ruggier.org (Mario Ruggier) Date: Fri, 24 Jun 2005 16:25:24 +0200 Subject: [Pythonmac-SIG] [Durus-users] Problem compiling Durus on Tiger In-Reply-To: <4CCFB278-633F-4C8A-96E3-2DC9DFF4556D@redivi.com> References: <6df9fd8fe21f73746becac2948e12a7d@ruggier.org> <9EC7C954-B3BD-4EC8-B5A7-AC4FCDAF5B6F@mems-exchange.org> <3a48a11f050622075973a317cb@mail.gmail.com> <4CCFB278-633F-4C8A-96E3-2DC9DFF4556D@redivi.com> Message-ID: Yep, that did it... I installed XcodeTools, and it set up the include directly nicely, and the cimpilation of durus succeeded. Another annoying thing is the path change for site-packages -- tiger now expects now that "site-packages" be appended to the panther version of the same location... ;-( On Jun 24, 2005, at 3:29 PM, Bob Ippolito wrote: > He's right, your installation is broken somehow and is missing files. > Python24Fix is only a monkeypatch to fix my distribution of Python > 2.4.1, it has nothing to do with anything else. > > I'd re-install the latest Xcode with all the goodies, and if that > doesn't work, then archive+install Mac OS X 10.4. Something is wrong > with your system, if you're lucky, it's just Xcode. > > -bob > > On Jun 24, 2005, at 9:16 AM, Mario Ruggier wrote: > >> Hello, >> >> i was trying to install Durus object db on a new Tiger powerbook, with >> just DeveloperTools and gcc-3.3 packages installed additionally. >> However, the following problem occurs: >> >> building 'durus._persistent' extension >> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp >> -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall >> -Wstrict-prototypes >> -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ >> python2.3 -c _persistent.c -o >> build/temp.darwin-8.1.0-Power_Macintosh-2.3/_persistent.o >> _persistent.c:6:20: Python.h: No such file or directory >> _persistent.c:7:26: structmember.h: No such file or directory >> ... >> >> Peter (message below) suggests Bob's TigerPython24Fix. I have tried >> but >> it needs python 2.4 not the stock python 2.3.5. >> >> How does one fix the stock python on 10.4 ?!? >> >> mario >> >> >> On Jun 22, 2005, at 4:59 PM, Peter Herndon wrote: >> >> >>> The Python build on Tiger is broken, it does not include the header >>> file. David, you probably did an upgrade install, or have other >>> modifications made at some point that provided the header. The fix >>> is >>> at http://undefined.org/python/#TigerPython24Fix -- notice Bob's >>> note, >>> "due to Tiger header regressions". I don't think you need to install >>> 2.4.1 in order to use the fix, though. IIRC, I used it once I >>> upgraded, and I've built extensions since then. Durus in particular. >>> >>> You may want to redirect this inquiry to the python-mac sig mailing >>> list, or just get Bob Ippolito's attention. They'll know the details >>> better than I. >>> >>> ---Peter Herndon >>> _______________________________________________ >>> Durus-users mailing list >>> Durus-users at mems-exchange.org >>> http://mail.mems-exchange.org/mailman/listinfo/durus-users >>> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > From gcanyon at inspiredlogic.com Fri Jun 24 16:29:06 2005 From: gcanyon at inspiredlogic.com (Geoff Canyon) Date: Fri, 24 Jun 2005 07:29:06 -0700 Subject: [Pythonmac-SIG] [Boa Constr] Workaround for Boa crashes on OS X In-Reply-To: <42BC0253.7010206@e.co.za> References: <42B9753B.4070002@wordtech-software.com> <42BC0253.7010206@e.co.za> Message-ID: On Jun 24, 2005, at 5:53 AM, Riaan Booysen wrote: > The Preference: Preferences->General->PythonInterpreterPath > should probably be set for your app bundle to point to the real > Python execuatble. This preference was empty in the app bundle. I set it to (I think) the Python engine at: /Library/Frameworks/Python.Framework/Versions/2.4/Resources/Python/ Contents/MacOS/Python Now I'm able to execute a project. Thanks! gc From bob at redivi.com Fri Jun 24 16:39:45 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 24 Jun 2005 10:39:45 -0400 Subject: [Pythonmac-SIG] [Durus-users] Problem compiling Durus on Tiger In-Reply-To: References: <6df9fd8fe21f73746becac2948e12a7d@ruggier.org> <9EC7C954-B3BD-4EC8-B5A7-AC4FCDAF5B6F@mems-exchange.org> <3a48a11f050622075973a317cb@mail.gmail.com> <4CCFB278-633F-4C8A-96E3-2DC9DFF4556D@redivi.com> Message-ID: <574A858E-8A2C-4E9E-B98E-1270B574762C@redivi.com> TigerPython23Compat will add a .pth file that allows the old /Library/ Python/2.3 to work. -bob On Jun 24, 2005, at 10:25 AM, Mario Ruggier wrote: > Yep, that did it... > > I installed XcodeTools, and it set up the include directly nicely, > and the cimpilation of durus succeeded. > > Another annoying thing is the path change for site-packages -- > tiger now expects now that "site-packages" be appended to the > panther version of the same location... ;-( > > > > On Jun 24, 2005, at 3:29 PM, Bob Ippolito wrote: > > >> He's right, your installation is broken somehow and is missing >> files. Python24Fix is only a monkeypatch to fix my distribution >> of Python 2.4.1, it has nothing to do with anything else. >> >> I'd re-install the latest Xcode with all the goodies, and if that >> doesn't work, then archive+install Mac OS X 10.4. Something is >> wrong with your system, if you're lucky, it's just Xcode. >> >> -bob >> >> On Jun 24, 2005, at 9:16 AM, Mario Ruggier wrote: >> >> >>> Hello, >>> >>> i was trying to install Durus object db on a new Tiger powerbook, >>> with >>> just DeveloperTools and gcc-3.3 packages installed additionally. >>> However, the following problem occurs: >>> >>> building 'durus._persistent' extension >>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp >>> -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall >>> -Wstrict-prototypes >>> -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ >>> python2.3 -c _persistent.c -o >>> build/temp.darwin-8.1.0-Power_Macintosh-2.3/_persistent.o >>> _persistent.c:6:20: Python.h: No such file or directory >>> _persistent.c:7:26: structmember.h: No such file or directory >>> ... >>> >>> Peter (message below) suggests Bob's TigerPython24Fix. I have >>> tried but >>> it needs python 2.4 not the stock python 2.3.5. >>> >>> How does one fix the stock python on 10.4 ?!? >>> >>> mario >>> >>> >>> On Jun 22, 2005, at 4:59 PM, Peter Herndon wrote: >>> >>> >>> >>>> The Python build on Tiger is broken, it does not include the header >>>> file. David, you probably did an upgrade install, or have other >>>> modifications made at some point that provided the header. The >>>> fix is >>>> at http://undefined.org/python/#TigerPython24Fix -- notice Bob's >>>> note, >>>> "due to Tiger header regressions". I don't think you need to >>>> install >>>> 2.4.1 in order to use the fix, though. IIRC, I used it once I >>>> upgraded, and I've built extensions since then. Durus in >>>> particular. >>>> >>>> You may want to redirect this inquiry to the python-mac sig mailing >>>> list, or just get Bob Ippolito's attention. They'll know the >>>> details >>>> better than I. >>>> >>>> ---Peter Herndon >>>> _______________________________________________ >>>> Durus-users mailing list >>>> Durus-users at mems-exchange.org >>>> http://mail.mems-exchange.org/mailman/listinfo/durus-users >>>> >>>> >>> >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>> >>> >> >> > > From hengist.podd at virgin.net Fri Jun 24 16:52:02 2005 From: hengist.podd at virgin.net (has) Date: Fri, 24 Jun 2005 15:52:02 +0100 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <2CF48B1C-55D5-499E-9FD6-E5973CCC41B6@redivi.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> <2CF48B1C-55D5-499E-9FD6-E5973CCC41B6@redivi.com> Message-ID: Bob wrote: >Nobody is suggesting that we manually wrap Carbon. Indeed. However, given the effective deadlock that bgen is causing (great-in-theory being the enemy of good-in-practice) perhaps we could find a pragmatic compromise? A semi-automated system that works adequately would, I think, be preferable to a fully automated one that doesn't. 1. Could we take the current bgen-generated C source and turn it over to manual maintainers? Apple's Carbon APIs aren't changing much these days, so I doubt there'll be much need to regenerate existing extensions from scratch, and it'll be easier to find volunteers willing to apply bugfixes and minor addition by hand than via bgen. Copy-n-paste and C macros should be more than adequate for this kind of work. e.g. I'd be willing to fix and maintain the AE and OSA extensions by hand, whereas there's probably zero chance of finding someone willing to actively work on them via bgen. 2. Could we take the more useful Carbon extensions and create a new third-party 'CarbonX' package where they can be actively developed and maintained? The original Carbon extensions in the standard distribution could be quietly deprecated; a lot of it's just deadweight anyway. I can't see them being thrown out before Python 3.0, but we can discourage their use in favour of alternatives like CarbonX and PyObjC. has -- http://freespace.virgin.net/hamish.sanderson/ From hengist.podd at virgin.net Fri Jun 24 17:05:17 2005 From: hengist.podd at virgin.net (has) Date: Fri, 24 Jun 2005 16:05:17 +0100 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> Message-ID: Ronald Oussoren wrote: >I'm not happy with the way that the Carbon wrappers work, adding Carbon functions as methods of seemingly related classes. This makes it harder to map documentation for Carbon to Python. It is also ugly. But this might not be a problem with bgen itself. > >I'd prefer to see the function wrapped as functions in the Carbon module. That would be my preference as well, at least for any new work. Stick with plain functions + opaque types. I'd rather deal with a well designed ADT-based API than a not-so-well designed OO one. Part of bgen's problem is that it's a victim of its own cleverness: it tries to do much more than it actually needs to, which ends up creating additional complexity; i.e. more things to learn, more things to go wrong. >If needed one could add convenience methods to type wrappers as well, but with a more pythonic interface. That would require more work because you'd have to make up a nice interface and document it. I'd suggest writing any new OO wrappers as Python classes. Less work than doing it in C, and it'd make it much quicker and easier to tweak and polish the high-level API design. has -- http://freespace.virgin.net/hamish.sanderson/ From ronaldoussoren at mac.com Fri Jun 24 17:22:12 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 24 Jun 2005 17:22:12 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> Message-ID: <3A94E8DD-56B9-4DEA-966F-0663A5D133EC@mac.com> On 24-jun-2005, at 17:05, has wrote: > Ronald Oussoren wrote: > > >> I'm not happy with the way that the Carbon wrappers work, adding >> Carbon functions as methods of seemingly related classes. This >> makes it harder to map documentation for Carbon to Python. It is >> also ugly. But this might not be a problem with bgen itself. >> >> I'd prefer to see the function wrapped as functions in the Carbon >> module. >> > > That would be my preference as well, at least for any new work. > Stick with plain functions + opaque types. I'd rather deal with a > well designed ADT-based API than a not-so-well designed OO one. > Part of bgen's problem is that it's a victim of its own cleverness: > it tries to do much more than it actually needs to, which ends up > creating additional complexity; i.e. more things to learn, more > things to go wrong. Exactly. > > > >> If needed one could add convenience methods to type wrappers as >> well, but with a more pythonic interface. That would require more >> work because you'd have to make up a nice interface and document it. >> > > I'd suggest writing any new OO wrappers as Python classes. Less > work than doing it in C, and it'd make it much quicker and easier > to tweak and polish the high-level API design. That's simular as what I was thinking of. What I'd do is create a C extension that contains the wrapper types and function. The wrapper types would be mutable, that is they should have a writeable __dict__. You can then add convienence methods to the wrapper types. Something like:: # CarbonX.py from _CarbonX import * from _CarbonXUtil import Category # simular to the one in PyObjC class FSRef (Category(FSRef)): """ Bla bla class documentation """ def __new__(self, path): return FSRefCreate(path) # Or whatever def islink(self): return ... The C extension might not even be a C extension, PyObjC can already create wrappers for simple functions given their name and signature. PyObjC's scanframework.py could be used to parse header files and create flat wrappers. The only disadvantage of this is that you'd have to depend on PyObjC, but that's not really a problem. Doing this should be fairly easy onces scanframework.py is finished, and that's just a matter of implementing some missing functionality all the hard work has already been done. Ronald From ronaldoussoren at mac.com Fri Jun 24 17:29:49 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 24 Jun 2005 17:29:49 +0200 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> <2CF48B1C-55D5-499E-9FD6-E5973CCC41B6@redivi.com> Message-ID: <3BCF29BF-8A79-4D99-8639-0B4A5EBCC8D6@mac.com> On 24-jun-2005, at 16:52, has wrote: > Bob wrote: > > >> Nobody is suggesting that we manually wrap Carbon. >> > > Indeed. However, given the effective deadlock that bgen is causing > (great-in-theory being the enemy of good-in-practice) perhaps we > could find a pragmatic compromise? A semi-automated system that > works adequately would, I think, be preferable to a fully automated > one that doesn't. > > 1. Could we take the current bgen-generated C source and turn it > over to manual maintainers? Apple's Carbon APIs aren't changing > much these days, so I doubt there'll be much need to regenerate > existing extensions from scratch, and it'll be easier to find > volunteers willing to apply bugfixes and minor addition by hand > than via bgen. Copy-n-paste and C macros should be more than > adequate for this kind of work. e.g. I'd be willing to fix and > maintain the AE and OSA extensions by hand, whereas there's > probably zero chance of finding someone willing to actively work on > them via bgen. There's little change that this will be accepted in the official tree. > > 2. Could we take the more useful Carbon extensions and create a new > third-party 'CarbonX' package where they can be actively developed > and maintained? The original Carbon extensions in the standard > distribution could be quietly deprecated; a lot of it's just > deadweight anyway. I can't see them being thrown out before Python > 3.0, but we can discourage their use in favour of alternatives like > CarbonX and PyObjC. Nobody would be stopping you if you wanted to maintain part of the Carbon package out-of-tree. It is important though to pick a new module namespace, at least while the in-tree stuff is still present. BTW. I've no problems with adding usefull wrappers to PyObjC, especially when those wrappers would use scanframework. Someone else would have to do the legwork to get them in a good enough shape to add them though, I'm have not enough time to work on PyObjC as it is. Ronald From sw at wordtech-software.com Fri Jun 24 17:38:49 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 24 Jun 2005 11:38:49 -0400 Subject: [Pythonmac-SIG] Configuration fix for Eric3 crashes on OS X Message-ID: <42BC2909.4010907@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 To all users of Eric3 with my PyQt-Mac package: Geoff Canyon has documented an important fix for another package I mantain, which crashes when trying to execute Python code from inside the program. This fix is also applicable to Eric3, which crashes under the same circumstances. To run/debug Python code from inside the Eric3 IDE without crashing it, go to Preferences, and select Debugger/Python. Check "custom Python interpreter" and input this path: /System/Library/Frameworks/Python.framework/Versions/2.3/Resources/Python.app/Contents/MacOS/Python This will allow you to run code, especially GUI code, that currently crashes Eric3. It won't fix the stability issues that sometimes arise when trying to save files. I need to do a bit more work with Eric3 against Python 2.4.1 and see if it's more stable with file i/o; that's been my experience with other Python packages running on 2.4.1. If such proves the case with Eric, then I will put together a PyQt installer for Python 2.4.1. - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCvCkIJmdQs+6YVcoRAjcaAJ9N9esQkK098/7NilFi7IcbZ8S66ACfYko2 J54v9X9ZCs7vXHDzvMiUF2Y= =C1wH -----END PGP SIGNATURE----- From sw at wordtech-software.com Fri Jun 24 17:38:59 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri, 24 Jun 2005 11:38:59 -0400 Subject: [Pythonmac-SIG] [Boa Constr] Workaround for Boa crashes on OS X In-Reply-To: References: <42B9753B.4070002@wordtech-software.com> <42BC0253.7010206@e.co.za> Message-ID: <42BC2913.7050803@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Geoff, Thank you for working this out! This does work perfect with app bundles. This also solves similar problems I've had with other programs I maintain. I'll document this at the website this weekend. Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com Geoff Canyon wrote: | On Jun 24, 2005, at 5:53 AM, Riaan Booysen wrote: | | |>The Preference: Preferences->General->PythonInterpreterPath |>should probably be set for your app bundle to point to the real |>Python execuatble. | | | This preference was empty in the app bundle. I set it to (I think) | the Python engine at: | | /Library/Frameworks/Python.Framework/Versions/2.4/Resources/Python/ | Contents/MacOS/Python | | Now I'm able to execute a project. Thanks! | | gc | _______________________________________________ | Pythonmac-SIG maillist - Pythonmac-SIG at python.org | http://mail.python.org/mailman/listinfo/pythonmac-sig | | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCvCkSJmdQs+6YVcoRArWPAJ9EbFw56ZlmYAXWQxeme2K1LU3PTwCcDzZf hRj4VN3dp0Tc+Ink2XI4Nzk= =SvH2 -----END PGP SIGNATURE----- From hengist.podd at virgin.net Fri Jun 24 18:27:53 2005 From: hengist.podd at virgin.net (has) Date: Fri, 24 Jun 2005 17:27:53 +0100 Subject: [Pythonmac-SIG] Finding what a broken alias refers to. In-Reply-To: <3BCF29BF-8A79-4D99-8639-0B4A5EBCC8D6@mac.com> References: <12BF7C01-F2AE-4A34-9F88-52688AA65684@meteo.fr> <924F9658-733A-4B43-A5D1-92238D9EC239@redivi.com> <972DE69A-6299-41FD-B992-D0CB5887B0ED@mac.com> <2ACA56D8-30C9-408A-93D7-C61F51D031DD@redivi.com> <04BBD103-243E-4957-A9AF-0313F2EBB976@mac.com> <2CF48B1C-55D5-499E-9FD6-E5973CCC41B6@redivi.com> <3BCF29BF-8A79-4D99-8639-0B4A5EBCC8D6@mac.com> Message-ID: Ronald Oussoren wrote: >>1. Could we take the current bgen-generated C source and turn it over to manual maintainers? > >There's little change that this will be accepted in the official tree. Since the official Carbon tree is largely moribund anyway, I can't say I'm too bothered by this. Hence my second suggestion of handling these extensions outside of the main Python distribution; an approach that's obviously worked extremely well for PyObjC, for example. I'm all for abandoning the original Carbon stuff to wither and die by itself: it's dug itself into a hole of its own making and I doubt anyone here cares enough to dig it out again on its own terms. It seems to me that the best bits stand a better chance of surviving and thriving as a third-party venture. Most likely an ad-hoc one as I've suggested: apart from anything else, there's a lot more folks who know C than bgen - and many hands make light work, as they say. Whereas constructing a brand new bgen replacement purely to rewrap a bunch of aging legacy APIs for which we already have plenty of C wrapper code simply isn't economically worthwhile. Sometimes the deliberately dumb solutions are actually the best. Like Bob says, Carbon has already passed the point of diminishing returns. These old Carbon APIs won't matter much in another few years anyway, so all we need to keep the still-useful bits comfortably ticking over in the meantime is one good initial cleanup of the existing C code and then maybe a handful of minor tweaks every 18 months or so. Which I'm pretty certain will be less work to do by hand than any other way. Use smart tools for rapidly evolving APIs like Cocoa and CF where the long-term benefits of investing in heavy automation are clear, and leave any odd maintenance jobs on existing legacy code to the manual code monkeys. Does that make sense? has -- http://freespace.virgin.net/hamish.sanderson/ From delza at livingcode.org Fri Jun 24 18:53:19 2005 From: delza at livingcode.org (Dethe Elza) Date: Fri, 24 Jun 2005 09:53:19 -0700 Subject: [Pythonmac-SIG] [Durus-users] Problem compiling Durus on Tiger In-Reply-To: References: <6df9fd8fe21f73746becac2948e12a7d@ruggier.org> <9EC7C954-B3BD-4EC8-B5A7-AC4FCDAF5B6F@mems-exchange.org> <3a48a11f050622075973a317cb@mail.gmail.com> <4CCFB278-633F-4C8A-96E3-2DC9DFF4556D@redivi.com> Message-ID: <8369B8C7-4714-4A30-A398-BC54745C64A3@livingcode.org> On 24-Jun-05, at 7:25 AM, Mario Ruggier wrote: > Another annoying thing is the path change for site-packages -- tiger > now expects now that "site-packages" be appended to the panther > version > of the same location... ;-( I use a script to tell me where site-packages is. Save this as "pyext" for example and you can do things like >>> ls `pyext` and tab-completion works fine with that in Bash. If you need to find the site-packages for a specific python, then just run it as >>> /usr/local/bin/python pyext.py assuming you call it "pyext.py" in that case... ================= pyext script ================ #!/usr/bin/env python import sys for p in sys.path: if p.endswith('site-packages'): print p sys.exit() ================ end script ================= It's not particularly elegant, but I find it useful (and not just on OS X). --Dethe Life is extinct on other planets. Their scientists were more advanced than ours. --Mark Russell From Chris.Barker at noaa.gov Fri Jun 24 22:44:21 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 24 Jun 2005 13:44:21 -0700 Subject: [Pythonmac-SIG] OS-X package for matplotlib 0.82 for OS-X Message-ID: <42BC70A5.6090101@noaa.gov> Hi folks, There are now binary installers for OS-X for matplotlib 0.82 for both Apple's python2.3.0 and the 2.4.1 Framework build (available at: http://undefined.org/python/) They were built on OS-X 10.3.9, and should work there and on 10.4 They work with Agg, Tk and Wx back ends, and require Numeric or numarray You can find them at: http://pythonmac.org/packages/ (the 10.4 one may not be there just yet, but should be there soon.) Have fun! -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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 phil at masstransfer.net Sat Jun 25 03:53:56 2005 From: phil at masstransfer.net (Phil) Date: Fri, 24 Jun 2005 21:53:56 -0400 Subject: [Pythonmac-SIG] BitTorrent on Mac OS 9: redux Message-ID: Howdy, Some folks on the list may remember a thread, from a little more than a year ago (http://mail.python.org/pipermail/pythonmac-sig/2004-April.txt.gz), where I asked the following question: "I'm trying to track down a bug that shows up when I run BitTorrent for Mac OS 9, and I'm not sure whether it's a problem with BitTorrent, MacPython, or some combination of both...in BitTorrent, when you resume downloading after having stopped (say, to restart your computer), the client checks the portion of the file you've already downloaded. (I assume it does this to test for corruption and so forth.) Normally, under Windows or OS X, this takes just a few minutes. "But for some reason, under OS 9, it takes an absurd amount of time -- something like 1 hour per 100 MB. From what I understand, "checking [the] existing file" is _not_ a computationally-intensive process, and shouldn't take anything like the length of time it takes on Mac OS 9 (using the btdownloadheadless.py client, which is the only one that works under OS 9). As it stands now, if I'm interrupted near the end of an 800MB download, I have to let my computer run overnight just to get back on!" At the time, several list members were kind enough to offer suggestions, through which we established a few things: -- Quitting all other open programs -- including the Finder -- doesn't help. -- Increasing the memory allocated to MacPython doesn't help. -- The problem doesn't seem to have anything to do with virtual memory. Alas, between the lack of data and my own lack of Python skills, we didn't get much further. For want of a solution, I borrowed a Windows computer and did my BitTorrent-ing on that machine. And so the matter has rested for the past year. However, I've just resumed using my OS 9 machine to participate in torrents, and recently, I discovered an important data point that may shed light on the problem. If I may elaborate: While btdownloadheadless.py is "checking existing file", the MacPython window normally updates every eight seconds or so, changing the "percent done" to reflects how much is left to check. On a file of, say, 250MB, that "percent done" changes by an average of 0.1% every update -- which means that checking the whole file takes about 8000 seconds, or 2+ hours. However, if you resize the MacPython window by clicking the lower-right hand corner, it updates *immediately*. And if you resize the window constantly, clicking on the lower-right corner over and over again, it updates nearly as fast as you click it [1] -- at the minimum, you can get it to update once per second, which means that it's checking the file about eight times as fast as it would otherwise be (at the expense of your having to sit there, clicking hundreds of times!). It's still not as fast as on Windows, where it takes mere seconds -- but cutting the amount of time it takes from 150 minutes, to 20 or fewer, would still be huge. So, does this information make anyone go "Aha!", by any chance? It seems to me that it's now unambiguously clear that the problem is not a processor bottleneck, but something else entirely. I'm no programmer, but I'm guessing that something about resizing the window (you don't actually need to resize it, but only to "attempt" to, if that makes sense) is either (a) encouraging the OS to give a higher priority to MacPython, or (b) jump-starting MacPython into performing an operation that it's otherwise, for unknown reasons, deferring. If anyone has any thoughts on this, I'd love to hear them, and will be grateful for your willingness to grapple with an obscure bug on an outdated OS. It's not an earth-shakingly important problem, but it'd be awesome if there's a solution! Thanks, Phil [1] Footnote: the optimum rate seems to be to click the window, and resize it, immediately after it scrolls and updates -- slightly faster than once per second -- and in a steady rhythm. Doing it faster doesn't do any good. From bob at redivi.com Sat Jun 25 03:49:27 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 24 Jun 2005 21:49:27 -0400 Subject: [Pythonmac-SIG] BitTorrent on Mac OS 9: redux In-Reply-To: References: Message-ID: On Jun 24, 2005, at 9:53 PM, Phil wrote: > Some folks on the list may remember a thread, from a little more > than a > year ago > (http://mail.python.org/pipermail/pythonmac-sig/2004-April.txt.gz), > where I > asked the following question: > > "I'm trying to track down a bug that shows up when I run > BitTorrent for Mac OS 9, and I'm not sure whether it's a problem with > BitTorrent, MacPython, or some combination of both...in BitTorrent, > when > you resume downloading after having stopped (say, to restart your > computer), the > client checks the portion of the file you've already downloaded. > (I assume > it does this to test for corruption and so forth.) Normally, under > Windows > or OS X, this takes just a few minutes. ... > While btdownloadheadless.py is "checking existing file", the MacPython > window normally updates every eight seconds or so, changing the > "percent > done" to reflects how much is left to check. On a file of, say, > 250MB, > that "percent done" changes by an average of 0.1% every update -- > which > means that checking the whole file takes about 8000 seconds, or 2+ > hours. > > However, if you resize the MacPython window by clicking the lower- > right > hand corner, it updates *immediately*. And if you resize the window > constantly, clicking on the lower-right corner over and over again, it > updates nearly as fast as you click it [1] -- at the minimum, you > can get > it to update once per second, which means that it's checking the > file about > eight times as fast as it would otherwise be (at the expense of > your having > to sit there, clicking hundreds of times!). It's still not as fast > as on > Windows, where it takes mere seconds -- but cutting the amount of > time it > takes from 150 minutes, to 20 or fewer, would still be huge. Sounds like it's probably a bug in MacPython or GUSI maybe.. but unfortunately I don't think anyone is ever going to bother to fix it, since OS9 is not currently a supported platform for Python. -bob From riaan at e.co.za Fri Jun 24 14:52:53 2005 From: riaan at e.co.za (Riaan Booysen) Date: Fri, 24 Jun 2005 14:52:53 +0200 Subject: [Pythonmac-SIG] [Boa Constr] Re: Boa stability issues In-Reply-To: <42B820FA.3010702@wordtech-software.com> References: <42B820FA.3010702@wordtech-software.com> Message-ID: <42BC0225.6050409@e.co.za> Hi Kevin, Kevin Walzer wrote: > This is a known issue. Unfortunately, I don't have any idea on how to > fix it. Riaan, has this been reported on other platforms at any > point--Boa just crashing when you try to run/debug a program from within > the IDE? No, it works fine under wxMSW and wxGTK. See my other reply for a possible reason. > | Installing the app version of Boa Constructor seems to have broken my > | previously working bunch-of-files-in-a-folder installation of Boa. It > | now gives me an error: > | > | 'module' object has no attribute > | 'wxSystemSettings_GetSystemMetric' This is code from before 0.4.3. I think the "bunch-of-files-in-a-folder installation" is now being run with a different version of wxPython causing the problem. Cheers, Riaan. From riaan at e.co.za Fri Jun 24 14:53:39 2005 From: riaan at e.co.za (Riaan Booysen) Date: Fri, 24 Jun 2005 14:53:39 +0200 Subject: [Pythonmac-SIG] [Boa Constr] Workaround for Boa crashes on OS X In-Reply-To: <42B9753B.4070002@wordtech-software.com> References: <42B9753B.4070002@wordtech-software.com> Message-ID: <42BC0253.7010206@e.co.za> Hi Kevin, Kevin Walzer wrote: > I'm copying this to the Boa Constructor list. Riaan, any idea what might > cause Boa to crash when running code when it's wrapped up in an app > bundle (similar to py2exe) and not crash when it's run from the > command-line? I know next to nothing about app bundles. But one thing that comes to mind is that (and you will also have this issue with py2exe) by default Boa uses sys.executable to run Python files. So in the normal case this is python.exe but under e.g. py2exe it will be Boa.exe. The Preference: Preferences->General->PythonInterpreterPath should probably be set for your app bundle to point to the real Python execuatble. Cheers, Riaan. From sw at wordtech-software.com Mon Jun 27 06:24:26 2005 From: sw at wordtech-software.com (Kevin Walzer) Date: Mon, 27 Jun 2005 00:24:26 -0400 Subject: [Pythonmac-SIG] How to call Apple Help from Python via Carbon.AH wrapper Message-ID: <42BF7F7A.9020606@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi everyone, A few weeks ago I asked about how to call Apple Help from a Python application because that functionality is provided via Carbon. Apparently this API is so crufty that no one quite knew how. :-) After some trial and error, I figured it out, and am actually using it in several non-Python applications via "python -c" calls, for which direct access to the Carbon Help API would be difficult or impossible. (Aquamacs is one of them, my Tk applications are also examples.) Here's a Pythonic sample of initalizing/registering the help book: from Carbon import AH path = /Applications/MyApp.app AH.AHRegisterHelpBook(path) And here's a sample of how to load a help book from the help menu: from Carbon import AH AH.AHGotoPage('MyApp Help', None, None) The 'MyApp Help' is the Apple Title tag that you would add to the main help page, as per the Apple documentation on user help. You'd also, of course, need to correctly set up the proper elements in the info.plist file (CFBundleHelpBookFolder--the directory within the Resources folder in the app bundle--and CFBundleHelpBookName, which is the Apple Title tag). For me the appeal of this approach is that it's built-in to OS X via the system Python installation; I don't have to ask anyone to install an external framework (or bundle it myself). Hope this is useful to somebody. - -- Cheers, Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.kevin-walzer.com http://www.smallbizmac.com. mailto:sw at wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCv395JmdQs+6YVcoRAsCOAJ4luboCq7+weyhiVmTRuNkR03d6mwCggEUO SnlouNefrLI+rVnhZqOAvbA= =5SuN -----END PGP SIGNATURE----- From debert at gmail.com Mon Jun 27 06:36:29 2005 From: debert at gmail.com (Arthur Debert) Date: Mon, 27 Jun 2005 01:36:29 -0300 Subject: [Pythonmac-SIG] py2app newbie problems Message-ID: Hi there. Sorry if this is too basic, but I'm having real trouble getting py2app working. I have an application writen in python 2.4 that uses wxPython(2.6) and 4Suite. Two questions: a) i can't make much sense about this on the documentation. From what I understood, all I have to do is point the setup.py script to the 'main' script of my application, and the module graph should find and package all the needed frameworks (such as wxPython and 4Suite). Is this right? If not, where should I specify that I am using these frameworks? b) when tryiing to build setup.py I get the following error: " TypeError: compile() expected string without null bytes > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/py2app/modulegraph/modulegraph.py(376)load_module() -> co = compile (fp.read().replace("\r\n", "\n")+'\n',pathname, 'exec') " ouch! what does that mean? I am running tiger, with pythonmac2.4, py2app 0.2, wxPython2.6. Am I missing something? Thanks a lot, Arthur From bob at redivi.com Mon Jun 27 07:09:54 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 27 Jun 2005 01:09:54 -0400 Subject: [Pythonmac-SIG] py2app newbie problems In-Reply-To: References: Message-ID: <7758A232-0208-4137-B041-13C90817F701@redivi.com> On Jun 27, 2005, at 12:36 AM, Arthur Debert wrote: > Sorry if this is too basic, but I'm having real trouble getting > py2app working. > I have an application writen in python 2.4 that uses wxPython(2.6) > and 4Suite. > > Two questions: > a) i can't make much sense about this on the documentation. From what > I understood, all I have to do is point the setup.py script to the > 'main' script of my application, and the module graph should find and > package all the needed frameworks (such as wxPython and 4Suite). Is > this right? If not, where should I specify that I am using these > frameworks? > > b) when tryiing to build setup.py I get the following error: > " > TypeError: compile() expected string without null bytes > >> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >> site-packages/py2app/modulegraph/modulegraph.py(376)load_module() >> > -> co = compile (fp.read().replace("\r\n", "\n")+'\n',pathname, > 'exec') > " > > ouch! what does that mean? It means what it says, one of your Python scripts has null bytes in it. That shouldn't happen. I've never seen it happen with wx, so it's either your code or 4suite. I'll have the next version of py2app do something nicer when that happens. No idea when I'll have time to do that, though. -bob From debert at gmail.com Mon Jun 27 18:38:13 2005 From: debert at gmail.com (Arthur Debert) Date: Mon, 27 Jun 2005 13:38:13 -0300 Subject: [Pythonmac-SIG] py2app newbie problems In-Reply-To: <7758A232-0208-4137-B041-13C90817F701@redivi.com> References: <7758A232-0208-4137-B041-13C90817F701@redivi.com> Message-ID: Hi Bob. Thanks for your prompt answer. Yes, you were obvioulsy right, my sources files had null bytes on them. The funny thing is, I got them cutting and pasting code from the the wx demo... evil... If I can make a suggestions, when you can, write an error message that will warn about this together with the offending source file, line number and char number. If that's possible, that would be great help! I've hacked a utility to remove null byte chars from python source files. It's not very efficient(the way it's reading the sources files and all) but it works, maybe it can help somebody. I am attaching it to this email, maybe it will be useful. Again, thanks for you help, Arthur 2005/6/27, Bob Ippolito : > On Jun 27, 2005, at 12:36 AM, Arthur Debert wrote: > > > Sorry if this is too basic, but I'm having real trouble getting > > py2app working. > > I have an application writen in python 2.4 that uses wxPython(2.6) > > and 4Suite. > > > > Two questions: > > a) i can't make much sense about this on the documentation. From what > > I understood, all I have to do is point the setup.py script to the > > 'main' script of my application, and the module graph should find and > > package all the needed frameworks (such as wxPython and 4Suite). Is > > this right? If not, where should I specify that I am using these > > frameworks? > > > > b) when tryiing to build setup.py I get the following error: > > " > > TypeError: compile() expected string without null bytes > > > >> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ > >> site-packages/py2app/modulegraph/modulegraph.py(376)load_module() > >> > > -> co = compile (fp.read().replace("\r\n", "\n")+'\n',pathname, > > 'exec') > > " > > > > ouch! what does that mean? > > It means what it says, one of your Python scripts has null bytes in > it. That shouldn't happen. I've never seen it happen with wx, so > it's either your code or 4suite. I'll have the next version of > py2app do something nicer when that happens. No idea when I'll have > time to do that, though. > > -bob > > -------------- next part -------------- A non-text attachment was scrubbed... Name: nullbyteremover.py Type: text/x-python-script Size: 1122 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050627/ded98de0/nullbyteremover.bin From loredo at astro.cornell.edu Mon Jun 27 18:59:07 2005 From: loredo at astro.cornell.edu (Tom Loredo) Date: Mon, 27 Jun 2005 12:59:07 -0400 (EDT) Subject: [Pythonmac-SIG] Eclipse + PyDev Message-ID: <200506271659.j5RGx7O15064@laplace.astro.cornell.edu> Mathieu wrote: > I use eclipse for my daily job, so pydev is a goode news. > eclipse works fine with CVS and subversion, and its visual diff is nice. > I didn't try debugging python with this tools, but syntax coloring, code > navigation (function, class ...), code completion are very nice. > Debbuging seems to work (http://pydev.sourceforge.net/debug.html), i'll > try it later. I don't use debugger often i'd rather use crash report. > Eclipse is a very cute cross plateform developpement tool with nice > java, php and python support. This pretty much echoes my own experience. I use Eclipse+PyDev on an old 333 MHz G3 laptop and a Quicksilver G4 desktop. It's slow to start (about 30s on both machines), but once it's up it runs just fine. I've only been using it for a few weeks but I'm pretty close to hooked. I did take a brief look at Wing IDE and was impressed. But what attracts me to Eclipse is that I'm working on projects with C and Fortran extensions. My understanding is that other Eclipse plugins (e.g. Photran for Fortran) will let me work with those files within Eclipse as well. And I'll be able to also work on HTML & JavaScript in support of these projects in the same IDE. (I hasten to add that I haven't tried any of this yet.) I need to do this on both Mac and Linux (FC3) machines. The only other environment I found that offers this combination of both cross-platform and cross-language support is JEdit (with appropriate plugins). I tried JEdit for a while, but Eclipse's latest incarnations are much more Mac-like on the Mac and Linux-like on my FC3 box, probably because Eclipse uses custom GUI tools, rather than relying on Java's standard GUI tools. I have also tried Eclispe+TruStudio Foundation. While TruStudio looks promising, they have a ways to go (their editor plugin doesn't even correctly handle indentation). It's a 1.0 release, but I'd say that designation is premature. But it's probably worth keeping an eye on TruStudio. -Tom Loredo From gravylovingslut at blueyonder.co.uk Mon Jun 27 19:38:43 2005 From: gravylovingslut at blueyonder.co.uk (Gravy) Date: Mon, 27 Jun 2005 18:38:43 +0100 Subject: [Pythonmac-SIG] Eclipse + PyDev In-Reply-To: <200506271659.j5RGx7O15064@laplace.astro.cornell.edu> References: <200506271659.j5RGx7O15064@laplace.astro.cornell.edu> Message-ID: <6427BD4A-32A7-4600-8271-007A8CD1B7E9@blueyonder.co.uk> I'm not entirely sure, but isn't the eclipse UI done in SWT so the library is separate for each platform, hence looks like whatever the host is? John On 27 Jun 2005, at 17:59, Tom Loredo wrote: > > Mathieu wrote: > > >> I use eclipse for my daily job, so pydev is a goode news. >> eclipse works fine with CVS and subversion, and its visual diff is >> nice. >> I didn't try debugging python with this tools, but syntax >> coloring, code >> navigation (function, class ...), code completion are very nice. >> Debbuging seems to work (http://pydev.sourceforge.net/debug.html), >> i'll >> try it later. I don't use debugger often i'd rather use crash report. >> Eclipse is a very cute cross plateform developpement tool with nice >> java, php and python support. >> > > This pretty much echoes my own experience. I use Eclipse+PyDev on > an old 333 MHz G3 laptop and a Quicksilver G4 desktop. It's slow > to start (about 30s on both machines), but once it's up it runs > just fine. I've only been using it for a few weeks but I'm pretty > close to hooked. I did take a brief look at Wing IDE and was > impressed. But what attracts me to Eclipse is that I'm working > on projects with C and Fortran extensions. My understanding is > that other Eclipse plugins (e.g. Photran for Fortran) will let > me work with those files within Eclipse as well. And I'll be > able to also work on HTML & JavaScript in support of these > projects in the same IDE. (I hasten to add that I haven't tried > any of this yet.) I need to do this on both Mac and > Linux (FC3) machines. The only other environment I found that > offers this combination of both cross-platform and cross-language > support is JEdit (with appropriate plugins). I tried JEdit > for a while, but Eclipse's latest incarnations are much more > Mac-like on the Mac and Linux-like on my FC3 box, probably > because Eclipse uses custom GUI tools, rather than relying > on Java's standard GUI tools. > > I have also tried Eclispe+TruStudio Foundation. While TruStudio > looks promising, they have a ways to go (their editor plugin > doesn't even correctly handle indentation). It's a 1.0 > release, but I'd say that designation is premature. But > it's probably worth keeping an eye on TruStudio. > > -Tom Loredo > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > From grobinson at goombah.com Tue Jun 28 00:16:07 2005 From: grobinson at goombah.com (Gary Robinson) Date: Mon, 27 Jun 2005 18:16:07 -0400 Subject: [Pythonmac-SIG] OS X C API bug? Message-ID: <20050627181607.042882.c6e9a4d0@goombah.com> Hello, The attached file contains a c module with 4 versions of the same extremely simple function. All they do is return a float double to python. The zip also contains the setup.py to build it. On Windows I can import the module into Python and run all of them successfully. But on OS X Panther with XCode 1.5 installed, the first 3 work and the last one causes a bus error. There is no obvious reason why it should do so. (At least not to me or the others who have looked at it.) Here's the output on Panther: >>> from check import * >>> fun0() 411.0 >>> fun1() 534.30000000000007 >>> fun2() 411.0 >>> fun3() Bus error I originally reported this on the C++ sig's mail list. They suggested I try dev-python. Scott David Daniels on that list helped me refine some test cases and verified that they all worked on Windows. He suggested I try mac-python next, so here I am. We're thinking it may be compiler-related. The code follows: #include "Python.h" static double value = 411.0; static PyObject * fun0(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "", NULL)) return NULL; return Py_BuildValue("d", value); } static PyObject * fun1(PyObject *self, PyObject *args) { return Py_BuildValue("d", 1.3*value); } static PyObject * fun2(PyObject *self, PyObject *args) { return PyFloat_FromDouble(value); } static PyObject * fun3(PyObject *self, PyObject *args) { return Py_BuildValue("d", value); } static PyMethodDef TestMethods[] = { {"fun0", fun0, METH_VARARGS, "Read args and return value"}, {"fun1", fun1, METH_VARARGS, "Return value multiplied inline by 1.3"}, {"fun2", fun2, METH_VARARGS, "Return value using PyFloat_FromDouble"}, {"fun3", fun3, METH_VARARGS, "Return value using Py_BuildValue without reading args -- causes bus error on OS X Panther with XCode 1.5 installed"}, {NULL, NULL, 0, NULL} /* Sentinel */ }; PyMODINIT_FUNC initcheck(void) { PyObject *module; module = Py_InitModule3("check", TestMethods, "extension module with three functions."); if (module) { PyModule_AddStringConstant(module, "__version__", "0.02"); } } Any help or insight would be most appreciated. Gary -------------- next part -------------- A non-text attachment was scrubbed... Name: check.zip Type: application/zip Size: 1484 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050627/7aa50305/check.zip -------------- next part -------------- -- Gary Robinson CTO Emergent Music, LLC grobinson at goombah.com 207-942-3463 Company: http://www.goombah.com Blog: http://www.garyrobinson.net From rkern at ucsd.edu Tue Jun 28 01:15:33 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 27 Jun 2005 16:15:33 -0700 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: <20050627181607.042882.c6e9a4d0@goombah.com> References: <20050627181607.042882.c6e9a4d0@goombah.com> Message-ID: <42C08895.6050708@ucsd.edu> Gary Robinson wrote: > Hello, > > The attached file contains a c module with 4 versions of the same > extremely simple function. All they do is return a float double to > python. The zip also contains the setup.py to build it. Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 and gcc 3.3. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From brian_l at mac.com Tue Jun 28 01:26:16 2005 From: brian_l at mac.com (Brian Lenihan) Date: Mon, 27 Jun 2005 16:26:16 -0700 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: <42C08895.6050708@ucsd.edu> References: <20050627181607.042882.c6e9a4d0@goombah.com> <42C08895.6050708@ucsd.edu> Message-ID: <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> On Jun 27, 2005, at 4:15 PM, Robert Kern wrote: > Gary Robinson wrote: > >> Hello, >> >> The attached file contains a c module with 4 versions of the same >> extremely simple function. All they do is return a float double to >> python. The zip also contains the setup.py to build it. >> > > Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 > and gcc > 3.3. It works fine on Tiger with Python 2.4.1 and gcc 4.0 . > > -- > Robert Kern > rkern at ucsd.edu > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From grobinson at goombah.com Tue Jun 28 01:51:28 2005 From: grobinson at goombah.com (Gary Robinson) Date: Mon, 27 Jun 2005 19:51:28 -0400 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> References: <20050627181607.042882.c6e9a4d0@goombah.com> <42C08895.6050708@ucsd.edu> <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> Message-ID: <20050627195128.465468.8b0da820@goombah.com> Interesting, maybe it's a problem with gcc 3.3. Gary -- Gary Robinson CTO Emergent Music, LLC grobinson at goombah.com 207-942-3463 Company: http://www.goombah.com Blog: http://www.garyrobinson.net On Mon, 27 Jun 2005 16:26:16 -0700, Brian Lenihan wrote: > > On Jun 27, 2005, at 4:15 PM, Robert Kern wrote: > >> Gary Robinson wrote: >> >>> Hello, >>> >>> The attached file contains a c module with 4 versions of the same >>> extremely simple function. All they do is return a float double to >>> python. The zip also contains the setup.py to build it. >>> >> >> Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 >> and gcc >> 3.3. > > It works fine on Tiger with Python 2.4.1 and gcc 4.0 > . >> >> -- >> Robert Kern >> rkern at ucsd.edu >> >> "In the fields of hell where the grass grows high >> Are the graves of dreams allowed to die." >> -- Richard Harter >> _______________________________________________ >> 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 grobinson at goombah.com Tue Jun 28 01:59:05 2005 From: grobinson at goombah.com (Gary Robinson) Date: Mon, 27 Jun 2005 19:59:05 -0400 Subject: [Pythonmac-SIG] [Python-Dev] Possible C API problem? In-Reply-To: <2773CAC687FD5F4689F526998C7E4E5F05CAF5@au3010avexu1.global.avaya.com> References: <2773CAC687FD5F4689F526998C7E4E5F05CAF5@au3010avexu1.global.avaya.com> Message-ID: <20050627195905.919351.c47f9b85@goombah.com> > Well, it appears you have a workaround (METH_VARARGS) so I'd suggest > using that for now, and raise a bug report at SourceForge > . I don't feel confident in a workaround unless someone understands the details -- otherwise the "workaround" may really be temporarily hiding an ongoing intermittent problem... That's why I'm very interested in getting an answer to this. But based on other people's testing today, I'm coming to feel that that possibility is fairly unlikely. Gary -- Gary Robinson CTO Emergent Music, LLC grobinson at goombah.com 207-942-3463 Company: http://www.goombah.com Blog: http://www.garyrobinson.net O From knorton at media.mit.edu Tue Jun 28 02:04:16 2005 From: knorton at media.mit.edu (Kelly Norton) Date: Mon, 27 Jun 2005 20:04:16 -0400 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: <20050627195128.465468.8b0da820@goombah.com> References: <20050627181607.042882.c6e9a4d0@goombah.com> <42C08895.6050708@ucsd.edu> <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> <20050627195128.465468.8b0da820@goombah.com> Message-ID: <6AC5622B-3C82-46E6-8D82-FE9177127DD8@media.mit.edu> Just out of curiosity, Are you using gcc3.3 build 1666? If so, you probably want to install the November2004 gcc updater as that version had some really nasty problems with emitting bad machine code. The update is available for free on the apple developer site. /kel On Jun 27, 2005, at 7:51 PM, Gary Robinson wrote: > Interesting, maybe it's a problem with gcc 3.3. > > Gary > > -- > > Gary Robinson > CTO > Emergent Music, LLC > grobinson at goombah.com > 207-942-3463 > Company: http://www.goombah.com > Blog: http://www.garyrobinson.net > > On Mon, 27 Jun 2005 16:26:16 -0700, Brian Lenihan wrote: > >> >> On Jun 27, 2005, at 4:15 PM, Robert Kern wrote: >> >> >>> Gary Robinson wrote: >>> >>> >>>> Hello, >>>> >>>> The attached file contains a c module with 4 versions of the same >>>> extremely simple function. All they do is return a float double to >>>> python. The zip also contains the setup.py to build it. >>>> >>>> >>> >>> Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 >>> and gcc >>> 3.3. >>> >> >> It works fine on Tiger with Python 2.4.1 and gcc 4.0 >> . >> >>> >>> -- >>> Robert Kern >>> rkern at ucsd.edu >>> >>> "In the fields of hell where the grass grows high >>> Are the graves of dreams allowed to die." >>> -- Richard Harter >>> _______________________________________________ >>> 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 >> >> > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From grobinson at goombah.com Tue Jun 28 02:42:11 2005 From: grobinson at goombah.com (Gary Robinson) Date: Mon, 27 Jun 2005 20:42:11 -0400 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: <6AC5622B-3C82-46E6-8D82-FE9177127DD8@media.mit.edu> References: <20050627181607.042882.c6e9a4d0@goombah.com> <42C08895.6050708@ucsd.edu> <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> <20050627195128.465468.8b0da820@goombah.com> <6AC5622B-3C82-46E6-8D82-FE9177127DD8@media.mit.edu> Message-ID: <20050627204211.376694.99afb9ad@goombah.com> I'm using a nov2004 updated build, reported on my machine as Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1671) Gary -- Gary Robinson CTO Emergent Music, LLC grobinson at goombah.com 207-942-3463 Company: http://www.goombah.com Blog: http://www.garyrobinson.net On Mon, 27 Jun 2005 20:04:16 -0400, Kelly Norton wrote: > Just out of curiosity, > > Are you using gcc3.3 build 1666? > > If so, you probably want to install the November2004 gcc updater as > that version had some really nasty problems with emitting bad machine > code. The update is available for free on the apple developer site. > > /kel > > On Jun 27, 2005, at 7:51 PM, Gary Robinson wrote: > >> Interesting, maybe it's a problem with gcc 3.3. >> >> Gary >> >> -- >> >> Gary Robinson >> CTO >> Emergent Music, LLC >> grobinson at goombah.com >> 207-942-3463 >> Company: http://www.goombah.com >> Blog: http://www.garyrobinson.net >> >> On Mon, 27 Jun 2005 16:26:16 -0700, Brian Lenihan wrote: >> >>> >>> On Jun 27, 2005, at 4:15 PM, Robert Kern wrote: >>> >>> >>>> Gary Robinson wrote: >>>> >>>> >>>>> Hello, >>>>> >>>>> The attached file contains a c module with 4 versions of the same >>>>> extremely simple function. All they do is return a float double to >>>>> python. The zip also contains the setup.py to build it. >>>>> >>>>> >>>> >>>> Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 >>>> and gcc >>>> 3.3. >>>> >>> >>> It works fine on Tiger with Python 2.4.1 and gcc 4.0 >>> . >>> >>>> >>>> -- >>>> Robert Kern >>>> rkern at ucsd.edu >>>> >>>> "In the fields of hell where the grass grows high >>>> Are the graves of dreams allowed to die." >>>> -- Richard Harter >>>> _______________________________________________ >>>> 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 >>> >>> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > From qdecavel at nordnet.fr Tue Jun 28 15:17:22 2005 From: qdecavel at nordnet.fr (Quentin DECAVEL) Date: Tue, 28 Jun 2005 14:17:22 +0100 Subject: [Pythonmac-SIG] Problem with pygame on Mac Message-ID: <20050628131722.M16791@nordnet.fr> This is a follow-up of the thread "Problem with a py2app bundle". I downloaded the latest pygame version from CVS (1.7.1 on version.py), and compiled and installed it without any problem (I have every dependency, SDL... and smpeg). Here is the lines in Setup.in about the movie modules (movie is not commented, movieext is commented out): #the following modules are optional. you will want to compile #everything you can, but you can ignore ones you don't have #dependencies for, just comment them out imageext src/imageext.c $(SDL) $(IMAGE) font src/font.c $(SDL) $(FONT) mixer src/mixer.c $(SDL) $(MIXER) mixer_music src/music.c $(SDL) $(MIXER) surfarray src/surfarray.c $(SDL) $(NUMERIC) sndarray src/sndarray.c $(SDL) $(NUMERIC) $(MIXER) movie src/movie.c $(SDL) $(SMPEG) #experimental new movie movie. requires libavcodec and libavformat. #add any necessary compile flags to this line and uncomment. #movieext src/movie.c src/ffmovie.c $(SDL) -lavcodec -lavformat I then tried the following script, testmovie.py, that is supposed to load a movie: import pygame from pygame.display import flip from pygame.locals import * pygame.init() screen = pygame.display.set_mode((640,480)) pygame.mixer.quit() movie = pygame.movie.Movie("chamber.mpg") movie.set_display(screen, (0,0)) movie.play() movie.set_volume(1) flip() while 1: if not movie.get_busy(): break time.sleep(0.1) Launched with the command "/usr/local/bin/pythonw2.3 testmovie.py", this crashed before the movie was loaded, and here is the terminal output: testmovie.py:8: RuntimeWarning: use movieext: No module named movieext movie = pygame.movie.Movie("chamber.mpg") Traceback (most recent call last): File "testmovie.py", line 8, in ? movie = pygame.movie.Movie("chamber.mpg") File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pygame/__init__.py", line 52, in __getattr__ raise NotImplementedError, MissingPygameModule NotImplementedError: movieext module not available How is it possible that pygame, without being compiled with the movieext module, is still asking for it when a movie is loaded ? Is there any way to correct this behavior, or at least to trace the problem (I cannot get any more information than what the terminal gives me) ? Thanks in advance From grobinson at goombah.com Tue Jun 28 15:29:05 2005 From: grobinson at goombah.com (Gary Robinson) Date: Tue, 28 Jun 2005 09:29:05 -0400 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> References: <20050627181607.042882.c6e9a4d0@goombah.com> <42C08895.6050708@ucsd.edu> <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> Message-ID: <20050628092905.118217.af24c851@goombah.com> >>> >>> The attached file contains a c module with 4 versions of the same >>> extremely simple function. All they do is return a float double to >>> python. The zip also contains the setup.py to build it. >>> >> >> Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 >> and gcc >> 3.3. > > It works fine on Tiger with Python 2.4.1 and gcc 4.0 > . So based on the evidence at hand, there is no reason to assume this is an unfixed bug -- it looks to have been fixed with gcc 4.0. So I guess I shouldn't file a bug report unless someone reproduces the problem with gcc 4.0. If anyone has another opinion, please let me know. Gary -- Gary Robinson CTO Emergent Music, LLC grobinson at goombah.com 207-942-3463 Company: http://www.goombah.com Blog: http://www.garyrobinson.net From ronaldoussoren at mac.com Tue Jun 28 16:28:14 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 28 Jun 2005 16:28:14 +0200 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: <20050628092905.118217.af24c851@goombah.com> References: <20050627181607.042882.c6e9a4d0@goombah.com> <42C08895.6050708@ucsd.edu> <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> <20050628092905.118217.af24c851@goombah.com> Message-ID: On 28-jun-2005, at 15:29, Gary Robinson wrote: >>>> >>>> The attached file contains a c module with 4 versions of the same >>>> extremely simple function. All they do is return a float double to >>>> python. The zip also contains the setup.py to build it. >>>> >>>> >>> >>> Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 >>> and gcc >>> 3.3. >>> >> >> It works fine on Tiger with Python 2.4.1 and gcc 4.0 >> . >> > > So based on the evidence at hand, there is no reason to assume this is > an unfixed bug -- it looks to have been fixed with gcc 4.0. > > So I guess I shouldn't file a bug report unless someone reproduces the > problem with gcc 4.0. If anyone has another opinion, please let me > know. You might want to file a bug anyway. gcc 3.3 is still used to build binaries for older versions of the OS. Ronald From bob at redivi.com Tue Jun 28 21:20:50 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 28 Jun 2005 15:20:50 -0400 Subject: [Pythonmac-SIG] OS X C API bug? In-Reply-To: References: <20050627181607.042882.c6e9a4d0@goombah.com> <42C08895.6050708@ucsd.edu> <27F0D459-D116-426E-94A3-6EEC4852B11D@mac.com> <20050628092905.118217.af24c851@goombah.com> Message-ID: <82C760F6-D0FD-4A70-8CD9-1C09188A48B9@redivi.com> On Jun 28, 2005, at 10:28 AM, Ronald Oussoren wrote: > > On 28-jun-2005, at 15:29, Gary Robinson wrote: > > >>>>> >>>>> The attached file contains a c module with 4 versions of the same >>>>> extremely simple function. All they do is return a float >>>>> double to >>>>> python. The zip also contains the setup.py to build it. >>>>> >>>>> >>>>> >>>> >>>> Data point: fun3 gives me a bus error on Tiger with Python 2.4.1 >>>> and gcc >>>> 3.3. >>>> >>>> >>> >>> It works fine on Tiger with Python 2.4.1 and gcc 4.0 >>> . >>> >>> >> >> So based on the evidence at hand, there is no reason to assume >> this is >> an unfixed bug -- it looks to have been fixed with gcc 4.0. >> >> So I guess I shouldn't file a bug report unless someone reproduces >> the >> problem with gcc 4.0. If anyone has another opinion, please let me >> know. >> > > You might want to file a bug anyway. gcc 3.3 is still used to build > binaries for older versions of the OS. It's still used to build binaries for newer versions of the OS too. % sw_vers -productVersion 10.4.1 % /usr/bin/python Python 2.3.5 (#1, Mar 20 2005, 20:38:20) [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin -bob From bob at redivi.com Tue Jun 28 21:25:44 2005 From: bob at redivi.com (Bob Ippolito) Date: Tue, 28 Jun 2005 15:25:44 -0400 Subject: [Pythonmac-SIG] Problem with pygame on Mac In-Reply-To: <20050628131722.M16791@nordnet.fr> References: <20050628131722.M16791@nordnet.fr> Message-ID: <174108E2-0B48-4CE1-9050-DFB50C812C45@redivi.com> On Jun 28, 2005, at 9:17 AM, Quentin DECAVEL wrote: > > This is a follow-up of the thread "Problem with a py2app bundle". > > I downloaded the latest pygame version from CVS (1.7.1 on > version.py), and > compiled and installed it without any problem (I have every > dependency, SDL... > and smpeg). Here is the lines in Setup.in about the movie modules > (movie is > not commented, movieext is commented out): > > #the following modules are optional. you will want to compile > #everything you can, but you can ignore ones you don't have > #dependencies for, just comment them out > > imageext src/imageext.c $(SDL) $(IMAGE) > font src/font.c $(SDL) $(FONT) > mixer src/mixer.c $(SDL) $(MIXER) > mixer_music src/music.c $(SDL) $(MIXER) > surfarray src/surfarray.c $(SDL) $(NUMERIC) > sndarray src/sndarray.c $(SDL) $(NUMERIC) $(MIXER) > movie src/movie.c $(SDL) $(SMPEG) > > #experimental new movie movie. requires libavcodec and libavformat. > #add any necessary compile flags to this line and uncomment. > #movieext src/movie.c src/ffmovie.c $(SDL) -lavcodec -lavformat > > I then tried the following script, testmovie.py, that is supposed > to load a movie: > > import pygame > from pygame.display import flip > from pygame.locals import * > > pygame.init() > screen = pygame.display.set_mode((640,480)) > pygame.mixer.quit() > movie = pygame.movie.Movie("chamber.mpg") > movie.set_display(screen, (0,0)) > movie.play() > movie.set_volume(1) > flip() > while 1: > if not movie.get_busy(): > break > time.sleep(0.1) > > Launched with the command "/usr/local/bin/pythonw2.3 testmovie.py", > this > crashed before the movie was loaded, and here is the terminal output: > > testmovie.py:8: RuntimeWarning: use movieext: No module named movieext > movie = pygame.movie.Movie("chamber.mpg") > Traceback (most recent call last): > File "testmovie.py", line 8, in ? > movie = pygame.movie.Movie("chamber.mpg") > File > "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ > site-packages/pygame/__init__.py", > line 52, in __getattr__ > raise NotImplementedError, MissingPygameModule > NotImplementedError: movieext module not available > > How is it possible that pygame, without being compiled with the > movieext > module, is still asking for it when a movie is loaded ? Is there > any way to > correct this behavior, or at least to trace the problem (I cannot > get any more > information than what the terminal gives me) ? This should be on the pygame list, not the pythonmac-sig list.. but here is the problem: try: import pygame.movieext except (ImportError,IOError), msg:movie=MissingModule("movieext", msg, 0) I just committed a patch. Nobody noticed, because SMPEG isn't very good at what it does and the movie module doesn't see much use. -bob From trentm at ActiveState.com Tue Jun 28 23:08:31 2005 From: trentm at ActiveState.com (Trent Mick) Date: Tue, 28 Jun 2005 14:08:31 -0700 Subject: [Pythonmac-SIG] ANN: ActivePython 2.4.1 build 247 for Mac OS X Message-ID: <20050628210831.GD31180@ActiveState.com> ActivePython 2.4.1 build 247 for Mac OS X is now available for free download from: http://www.ActiveState.com/Products/ActivePython/ This release includes important updates to build 246. In particular: - ActivePython and py2app will now play nicely together. Previously py2app failed looking for version.plist in ActivePython's framework install. - ActivePython's license was clarified to specify that usage of ActivePython with wrapping tools such as py2app and py2exe are allowed. Please see the release notes for details: http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/relnotes.html#release_history What is ActivePython? --------------------- ActivePython is ActiveState's quality-assured binary distribution of Python. Builds for Linux, Mac OS X, Solaris and Windows are made freely available. ActivePython includes the Python core and core extensions (zlib 1.2.1, bzip2 1.0.2, bsddb 4.2.52, Tk 8.4.9, and Tix 8.1.4) and is fully compatible with other Python distributions of the same version. ActivePython also includes a wealth of Python documentation, including: - the core Python docs; - Andrew Kuchling's "What's New in Python" series; - the Non-Programmer's Tutorial for Python; - Mark Pilgrim's excellent "Dive into Python"; and - a snapshot of the Python FAQs, HOWTOs and PEPs. An online version of the docs can be found here: http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/welcome.html Thanks, and enjoy! Trent, Python Tech Lead -- Trent Mick TrentM at ActiveState.com From brownr at ucalgary.ca Wed Jun 29 23:16:07 2005 From: brownr at ucalgary.ca (Robert Brown) Date: Wed, 29 Jun 2005 15:16:07 -0600 Subject: [Pythonmac-SIG] Python code in Objective C Message-ID: <4461A608-BEE2-4145-97AB-E99C9D1451B1@ucalgary.ca> I've got an object written in Python (descended from NSObject using PyObjC) that I'd like to have access to in Objective-C. There's an example where some Python code is packaged as a plugin, then loaded in an Objective-C app, but it only ends up specifying one of the objects instantiated in the nib. How would you go about using the Python objects directly, like you would a framework, for instance? Thanks, Robb --------------------------------------------------- Robb Brown Seaman Family MR Research Centre Calgary, Alberta, Canada -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050629/65ef76fe/attachment.htm From bob at redivi.com Thu Jun 30 01:33:34 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 29 Jun 2005 13:33:34 -1000 Subject: [Pythonmac-SIG] Python code in Objective C In-Reply-To: <4461A608-BEE2-4145-97AB-E99C9D1451B1@ucalgary.ca> References: <4461A608-BEE2-4145-97AB-E99C9D1451B1@ucalgary.ca> Message-ID: On Jun 29, 2005, at 11:16 AM, Robert Brown wrote: > I've got an object written in Python (descended from NSObject using > PyObjC) that I'd like to have access to in Objective-C. There's an > example where some Python code is packaged as a plugin, then loaded > in an Objective-C app, but it only ends up specifying one of the > objects instantiated in the nib. How would you go about using the > Python objects directly, like you would a framework, for instance? NSClassFromString, objc_lookUpClass, -[NSBundle classNamed:], etc. -bob From ronaldoussoren at mac.com Thu Jun 30 09:02:17 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 30 Jun 2005 09:02:17 +0200 Subject: [Pythonmac-SIG] Python code in Objective C In-Reply-To: References: <4461A608-BEE2-4145-97AB-E99C9D1451B1@ucalgary.ca> Message-ID: On 30-jun-2005, at 1:33, Bob Ippolito wrote: > > On Jun 29, 2005, at 11:16 AM, Robert Brown wrote: > > >> I've got an object written in Python (descended from NSObject using >> PyObjC) that I'd like to have access to in Objective-C. There's an >> example where some Python code is packaged as a plugin, then loaded >> in an Objective-C app, but it only ends up specifying one of the >> objects instantiated in the nib. How would you go about using the >> Python objects directly, like you would a framework, for instance? >> > > NSClassFromString, objc_lookUpClass, -[NSBundle classNamed:], etc. And look in the archives of this list for more information. Ronald From ronaldoussoren at mac.com Thu Jun 30 09:22:46 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 30 Jun 2005 09:22:46 +0200 Subject: [Pythonmac-SIG] Python code in Objective C In-Reply-To: References: <4461A608-BEE2-4145-97AB-E99C9D1451B1@ucalgary.ca> Message-ID: On 30-jun-2005, at 9:02, Ronald Oussoren wrote: > > On 30-jun-2005, at 1:33, Bob Ippolito wrote: > > >> >> On Jun 29, 2005, at 11:16 AM, Robert Brown wrote: >> >> >> >>> I've got an object written in Python (descended from NSObject using >>> PyObjC) that I'd like to have access to in Objective-C. There's an >>> example where some Python code is packaged as a plugin, then loaded >>> in an Objective-C app, but it only ends up specifying one of the >>> objects instantiated in the nib. How would you go about using the >>> Python objects directly, like you would a framework, for instance? >>> >>> >> >> NSClassFromString, objc_lookUpClass, -[NSBundle classNamed:], etc. >> > > And look in the archives of this list for more information. Oops, wrong list. You should look in the archives of the pyobjc-dev list, this question has been asked and answered several times this year. Ronald From jbarden at wilcoxd.com Thu Jun 30 20:49:41 2005 From: jbarden at wilcoxd.com (Jared Barden) Date: Thu, 30 Jun 2005 14:49:41 -0400 Subject: [Pythonmac-SIG] NSMovieView question Message-ID: <76564DFF-AF73-4C33-A944-E91D62191486@wilcoxd.com> Hello all, If I'm using an NSMovieView to play a given movie that is let's say 5:00 long, how do I tell the NSMovieView to go to 4:45? I've been looking around and haven't found a good answer yet. All help appreciated, Jared Barden Wilcox Development Solutions http://www.wilcoxd.com From delza at livingcode.org Thu Jun 30 22:01:36 2005 From: delza at livingcode.org (Dethe Elza) Date: Thu, 30 Jun 2005 13:01:36 -0700 Subject: [Pythonmac-SIG] NSMovieView question In-Reply-To: <76564DFF-AF73-4C33-A944-E91D62191486@wilcoxd.com> References: <76564DFF-AF73-4C33-A944-E91D62191486@wilcoxd.com> Message-ID: <296F9697-D63B-437B-80B3-671E10E34B2C@livingcode.org> You can't really do that using NSMovieView without dropping down to the C-level Quicktime routines (maybe there is a python wrapper for these, but if so it is not documented). If you are running on Tiger (10.4) you can use the Quicktime (QTKit) framework, which has much more control over the movie. QTKit Reference: http://developer.apple.com/documentation/QuickTime/ Reference/QTCocoaObjCKit/index.html Quicktime for Cocoa documentation: http://developer.apple.com/ documentation/Cocoa/QuickTime-date.html Specifically, you could use the QTMovie.currentTime() and QTMovie.setCurrentTime_(time) methods to do what you're asking. --Dethe On 30-Jun-05, at 11:49 AM, Jared Barden wrote: > Hello all, > > If I'm using an NSMovieView to play a given movie that is let's say > 5:00 long, how do I tell the NSMovieView to go to 4:45? I've been > looking around and haven't found a good answer yet. > > All help appreciated, > Jared Barden > > Wilcox Development Solutions > http://www.wilcoxd.com > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > Young children play in a way that is strikingly similar to the way scientists work --Busytown News