From Chris.Barker at noaa.gov Fri May 2 00:17:53 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 01 May 2008 15:17:53 -0700 Subject: [Pythonmac-SIG] py2app and matplotlib In-Reply-To: References: <47EAE7EE.6030103@noaa.gov> Message-ID: <481A4191.9090804@noaa.gov> Ronald, About a month or so ago, you helped me out with this: > That load command is for LC_UUID. The version of macholib in subversion > should have some support that is (basicly ignoring the entire load > command because macholib won't have to change it), could you test that > (easy_install macholib==dev)? I hope I told you at the time, but yes, that did fix it, and I've been using it happily ever since. I just started working on testing some stuff on a new Intel machine, and ran into the same problem. Fortunately, I remembers this message, and did the same thing here. Is this going to get into the released version of py2app soon? It would be nice if this stuff worked "out of the box" -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Fri May 2 18:07:09 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 02 May 2008 09:07:09 -0700 Subject: [Pythonmac-SIG] Please test PIL package on OS-X In-Reply-To: <6101F578-702B-4D0C-A4E0-9E137DB7C854@kyngchaos.com> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> <4810E0A6.9000005@noaa.gov> <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> <48111DE4.1000902@noaa.gov> <6101F578-702B-4D0C-A4E0-9E137DB7C854@kyngchaos.com> Message-ID: <481B3C2D.2090801@noaa.gov> Hi all, I've been experimenting with building PIL for OS-X in a new way, providing the dependencies through William Kyngesburye's Unix Compatability frameworks: http://www.kyngchaos.com/wiki/software:frameworks See earlier posts on the MacPython lists for details. The short version is that the Frameworks provide universal versions of a bunch of libraries that PIL and other Python packages (Matplotlib, etc) rely on. They are an easy click install. The motivation for this is that the dependencies are otherwise very tricky to build correctly for Universal python builds. The result is a PIL package that installs easily on PPC an Intel systems, and can be bundles up with py2app to provide a Universal stand alone application. I've built the installer, written a simple test app, and built an app out of that. They all work on the PPC 10.4 and Intel 10.4 systems I have to test -- I'd love others to test them as well. on this ftp site: ftp://ftp.orr.noaa.gov/public/HMRD/Python You will find: SimplePILTest.py : the test script PILTest.zip: the test application -- it should run with nothing else installed on any 10.4+ system PIL-1.1.6-py2.5-macosx10.4.mpkg.zip : The PIL package installer, for python.org python2.5 framework build. It depends on the following frameworks: FreeType_Framework-2.3.5-3.dmg: Freetype UnixImageIO_Framework-1.0.22a.dmg: various image libs, jpeg, etc. Please test on your machine, and let me know if they work! If they do, then we could build versions for Apple's Python 2.5 on OS-X 10.5, and maybe bundle up the Frameworks inside the PIL package installer for one-click installation. And do the same thing for Matplotlib, and ??? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From woklist at kyngchaos.com Fri May 2 22:02:06 2008 From: woklist at kyngchaos.com (William Kyngesburye) Date: Fri, 2 May 2008 15:02:06 -0500 Subject: [Pythonmac-SIG] Please test PIL package on OS-X In-Reply-To: <481B3C2D.2090801@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> <4810E0A6.9000005@noaa.gov> <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> <48111DE4.1000902@noaa.gov> <6101F578-702B-4D0C-A4E0-9E137DB7C854@kyngchaos.com> <481B3C2D.2090801@noaa.gov> Message-ID: On May 2, 2008, at 11:07 AM, Christopher Barker wrote: > The motivation for this is that the dependencies are otherwise very > tricky to build correctly for Universal python builds. > ...and are already installed and used by many GIS users (Qgis, GDAL, GRASS, MapServer), who may also want to use PIL. > The result is a PIL package that installs easily on PPC an Intel > systems, and can be bundles up with py2app to provide a Universal > stand alone application. > > I've built the installer, written a simple test app, and built an > app out of that. They all work on the PPC 10.4 and Intel 10.4 > systems I have to test -- I'd love others to test them as well. > Quick import test works. > If they do, then we could build versions for Apple's Python 2.5 on > OS-X 10.5, and maybe bundle up the Frameworks inside the PIL package > installer for one-click installation. > > And do the same thing for Matplotlib, and ??? I haven't built a python extension installer package before, but is it an option of distutils? If so, it may be hard to *add* packages to the installer. I know how I would setup a bulk framework installer (so it doesn't unnecessarily overwrite frameworks) manually with PackageMaker, and I could probably come up with a CLI packagemaker method. Also, I would building be a Distribution package, not a Metapackage, since I rely on the builtin Javascript requirements checking. This would limit it to Tiger+. I'd have to dig up my old simple-package volumecheck scripts. ----- William Kyngesburye http://www.kyngchaos.com/ Theory of the Universe There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened. -Hitchhiker's Guide to the Galaxy 2nd season intro From Chris.Barker at noaa.gov Fri May 2 22:31:08 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 02 May 2008 13:31:08 -0700 Subject: [Pythonmac-SIG] Please test PIL package on OS-X In-Reply-To: References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> <4810E0A6.9000005@noaa.gov> <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> <48111DE4.1000902@noaa.gov> <6101F578-702B-4D0C-A4E0-9E137DB7C854@kyngchaos.com> <481B3C2D.2090801@noaa.gov> Message-ID: <481B7A0C.8010003@noaa.gov> William Kyngesburye wrote: > Quick import test works. good start -- could you run that test script? you pass in a *.jpg on the command line, and it makes a copy with a watermark printed on it. That tests the jpeg driver and the freetype implementation. > I haven't built a python extension installer package before, but is it > an option of distutils? I think it's a distutils extension that comes with py2app: dist_mpkg > If so, it may be hard to *add* packages to the > installer. Can you just dump additional packages into Contents/Packages ? Or dump the mpkg into your Metapackage, or dump the two *.pkg files into your Metapackage? I have no clue. Others on this list should know. > Also, I would building be a Distribution package, not a Metapackage, > since I rely on the builtin Javascript requirements checking. This > would limit it to Tiger+. That's 10.4, right? I'm OK with that -- do your Frameworks support 10.3 anyway? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From woklist at kyngchaos.com Fri May 2 23:09:30 2008 From: woklist at kyngchaos.com (William Kyngesburye) Date: Fri, 2 May 2008 16:09:30 -0500 Subject: [Pythonmac-SIG] Please test PIL package on OS-X In-Reply-To: <481B7A0C.8010003@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> <4810E0A6.9000005@noaa.gov> <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> <48111DE4.1000902@noaa.gov> <6101F578-702B-4D0C-A4E0-9E137DB7C854@kyngchaos.com> <481B3C2D.2090801@noaa.gov> <481B7A0C.8010003@noaa.gov> Message-ID: On May 2, 2008, at 3:31 PM, Christopher Barker wrote: > William Kyngesburye wrote: >> Quick import test works. > > good start -- could you run that test script? you pass in a *.jpg on > the command line, and it makes a copy with a watermark printed on > it. That tests the jpeg driver and the freetype implementation. > Kinda busy today. Maybe this weekend. >> Can you just dump additional packages into Contents/Packages ? Or >> dump the mpkg into your Metapackage, or dump the two *.pkg files >> into your Metapackage? > > I have no clue. Others on this list should know. > No, there is setup in the Info.plist of the mpkg. Hacking the info.plist could get dicey. It may be possible to merge the sub-packages into a new distribution package - the man page implies that it's possible, tho I haven't figured it out yet. >> Also, I would building be a Distribution package, not a >> Metapackage, since I rely on the builtin Javascript requirements >> checking. This would limit it to Tiger+. > > That's 10.4, right? I'm OK with that -- do your Frameworks support > 10.3 anyway? > Tiger = 10.4. I stopped making my frameworks Panther (10.3) compatible when Leopard (10.5) came out. > ----- William Kyngesburye http://www.kyngchaos.com/ "History is an illusion caused by the passage of time, and time is an illusion caused by the passage of history." - Hitchhiker's Guide to the Galaxy From Chris.Barker at noaa.gov Sat May 3 01:14:18 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 02 May 2008 16:14:18 -0700 Subject: [Pythonmac-SIG] [Image-SIG] Please test PIL package on OS-X In-Reply-To: <481B89E4.1010007@mathematik.uni-dortmund.de> References: <481B3C2D.2090801@noaa.gov> <481B89E4.1010007@mathematik.uni-dortmund.de> Message-ID: <481BA04A.7020705@noaa.gov> Karsten Hiddemann wrote: > Here is my experience with it on a Mac OS X 10.5.2 system: Thanks for trying it: > - clicked on the SimplePILTest thing. Nothing happens. Is it broken? oops, sorry, I didn't tell you what to do with it! Drag and drop a *.jpg on it -- it should make a copy with "Watermark" printed in top, in the upper left hand corner. You can also open the "Console" app, and it should give you a bit of output. Sorry, I didn't want to complicate the test with a gui toolkit. > - I try to start it via Terminal: > > $ ./SimplePILTest.app/Contents/MacOS/python I don't expect that to work. > So I download the Python 2.5.2 build from python.org and install > that. After this, the PIL package installs fine. Yes, this installer is built for the python.org build, not the Apple one -- we could do that to, but I don't have 10.5, so I can't do it. > - Now I try to run the script by hand: > > $ python SimplePILTest.py SafetyGirl1-small.jpg > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/ImageFont.py", > line 205, in truetype > return FreeTypeFont(filename, size, index, encoding) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/ImageFont.py", > line 121, in __init__ > self.font = _imagingft.getfont(file, size, index, encoding) > IOError: cannot open resource > > - It needs the font file, which isn't in there. So I do: Correct -- arrg! sorry about this, the font is bundled with the *.app, but I didn't give you it. > $ cd SimplePILTest.app/Contents/Resources/ > $ python SimplePILTest.py ../../../SafetyGirl1-small.jpg > #Processing: ../../../SafetyGirl1-small.jpg > It is a JPEG, (461, 615), RGB image > writing out a version with some text on it: > > - It works, it actually produced a watermarked image! Wait, that means > that I should have just dropped the image on the App? (tries) Yes, that > works, too. Maybe I should have tested that before installing Python > 2.5.2 and PIL and the other frameworks to test the standalone version. That would have been nice. > So, to sum it up: It does work, very nice work. But you should have > described a little better what one is supposed to do to test it. ;) Yes, I should have -- sorry. Thank you for being so persistent! > What I dislike: There's no way to uninstall these thing again right now. Blame Apple for that -- these are standard Apple packages. Anyway, I think you can simply remove them by hand. You need to delete: /Library/Frameworks/Python.framework/ (if you don't want to keep using it) /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL (if you only want to remove PIL) /Library/Frameworks/UnixImageIO.framework/ /Library/Frameworks/FreeType.framework/ If you do remove all those, would you mind testing the .app again, just to make sure? Thanks for testing. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From rpyle at post.harvard.edu Sat May 3 21:42:40 2008 From: rpyle at post.harvard.edu (Robert Pyle) Date: Sat, 03 May 2008 15:42:40 -0400 Subject: [Pythonmac-SIG] [Image-SIG] Please test PIL package on OS-X In-Reply-To: <481BA04A.7020705@noaa.gov> References: <481B3C2D.2090801@noaa.gov> <481B89E4.1010007@mathematik.uni-dortmund.de> <481BA04A.7020705@noaa.gov> Message-ID: <4559FD0E-CF3D-475B-82F1-851345C87A55@post.harvard.edu> Hi Chris, Your frameworks installed as expected. Once you explained to Karsten how to test, I dropped the test picture on the app and got the a watermarked picture. This was on a MacBook Pro (Intel Core 2 Duo) running 10.5.2. Curiously, the size of the watermarked jpeg is much smaller than that of the original jpeg, and the appearance is slightly different (different color balance and/or brightness). I also encountered the missing font problem when running SimplePILTest.py. Bob Pyle On May 2, 2008, at 7:14 PM, Christopher Barker wrote: > Karsten Hiddemann wrote: >> Here is my experience with it on a Mac OS X 10.5.2 system: > > Thanks for trying it: > >> - clicked on the SimplePILTest thing. Nothing happens. Is it broken? > > oops, sorry, I didn't tell you what to do with it! > From Chris.Barker at noaa.gov Wed May 7 01:45:15 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 06 May 2008 16:45:15 -0700 Subject: [Pythonmac-SIG] py2app and eggs Message-ID: <4820ED8B.7050107@noaa.gov> Hi all, I'm having an odd issue with py2app. It seems to be bringing in almost everything in my Python install -- I"m getting a 112MB .app --which is way too big! The resulting app is crashing hard in a way I can't figure out anything about, too, but I don't know if that has anything to do with it. Anyway, do you suppose it is bringing in every egg I have installed? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From hraban at fiee.net Wed May 7 13:18:47 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Wed, 7 May 2008 13:18:47 +0200 Subject: [Pythonmac-SIG] py2app and eggs In-Reply-To: <4820ED8B.7050107@noaa.gov> References: <4820ED8B.7050107@noaa.gov> Message-ID: <3D8F8DB9-5415-4062-B438-2456BD788349@fiee.net> Am 2008-05-07 um 01:45 schrieb Christopher Barker: > I'm having an odd issue with py2app. It seems to be bringing in > almost everything in my Python install -- I"m getting a 112MB .app > --which is way too big! > The resulting app is crashing hard in a way I can't figure out > anything about, too, but I don't know if that has anything to do > with it. > Anyway, do you suppose it is bringing in every egg I have installed? I had problems with modules installed as eggs before. Some modules don't seem to find some files or the like. Mostly it helps to install everything with "easy_install -Z" (i.e. unzip the egg). Further you must specifically include or exclude some modules or sub-modules. Perhaps post your setup.py, otherwise it's hard to detect what could be wrong in your case. At least my crystal ball doesn't work at the moment. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From Chris.Barker at noaa.gov Wed May 7 18:29:08 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 07 May 2008 09:29:08 -0700 Subject: [Pythonmac-SIG] py2app and eggs In-Reply-To: <3D8F8DB9-5415-4062-B438-2456BD788349@fiee.net> References: <4820ED8B.7050107@noaa.gov> <3D8F8DB9-5415-4062-B438-2456BD788349@fiee.net> Message-ID: <4821D8D4.10005@noaa.gov> Henning Hraban Ramm wrote: > I had problems with modules installed as eggs before. Some modules don't > seem to find some files or the like. Yes, I know. I don't think any of the modules I need are installed with eggs, but it seems to be bringing in all kinds of other stuff -- weird. Particularly since this setup.py worked with this app last week (I think!). > Mostly it helps to install > everything with "easy_install -Z" (i.e. unzip the egg). good hint, thanks! > Perhaps post your setup.py, otherwise it's hard to detect what could be > wrong in your case. At least my crystal ball doesn't work at the moment. Yours is broken too? Yes, that would help -- I'm going to simplify things and poke around a bit more, then I'll post the results here. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From mariano.difelice at gmail.com Fri May 9 23:15:22 2008 From: mariano.difelice at gmail.com (Mariano Di Felice) Date: Fri, 9 May 2008 23:15:22 +0200 Subject: [Pythonmac-SIG] py2app mac Message-ID: Hi people! I have a problem about compiling my simple python script into a MAC app. I have installed Python 2.5, wxPython2.8.7.1, PIL 1.1.6. After, py2app from svn trunk version 0.4.2 I compile this on a mac PC Intel Minimac with OS Tiger version 10.4.11 This is my python source script: """ test.py """ import Image import os import sys import wx app = wx.PySimpleApp(0) Image.new("RGBA", (400,400) ) wx.MessageBox("ciao", "") app.MainLoop() and this is my setup.py script: from distutils.core import setup import os #includes=["PIL", "PIL._imaging", "PIL._imagingft", "PIL._imagingmath", "PIL._imagingtk", "Image", "PIL.Image"] #packages = ["PIL"] import py2app plist = {} setup(name='test', options={ 'py2app': { 'includes':includes, #'packages': packages, 'compressed': True, 'optimize': 2, 'plist': plist } }, version='0.1', app=["test.py"], setup_requires=["py2app"], ) Compilation works fine! But.... when I run my test.app into another MAC ( this is a MAC PPC Tiger without PIL, wxpython, etc etc ), I have more problems: if I don't include any package, I obtain: ImportError: The _imaging C module is not installed And if I include packages = ["PIL"] I obtain this exception from console: ImportError: No module named Image Why???? I'm desperate!!! thx very much -- /\/\ariano Di Felice Java PHP Python programmer with MySQL, PostgreSql and Oracle support Linux Platform Developer http://www.marianodifelice.it +39 339 6407211 0735 703735 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Fri May 9 23:50:15 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 09 May 2008 14:50:15 -0700 Subject: [Pythonmac-SIG] py2app mac In-Reply-To: References: Message-ID: <4824C717.3020809@noaa.gov> Mariano Di Felice wrote: > I compile this on a mac PC Intel Minimac with OS Tiger version 10.4.11 > But.... when I run my test.app into another MAC ( this is a MAC > PPC Tiger without PIL, wxpython, etc etc ), I have more problems: > > if I don't include any package, I obtain: > > ImportError: The _imaging C module is not installed I just noticed this -- are you sure your PIL is Universal? it isn't unless you compiled it that way, and all its dependencies are Universal. IIRC, in your earlier posts to the wxPython list, you compiled it yourself. Try the PIL found here: http://pythonmac.org/packages/py25-fat/index.html Also make sure you are running py2app with the python installed in /Library, rather than Apple's one. How big is your *.app? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From m.vanland at gmail.com Sun May 11 03:46:02 2008 From: m.vanland at gmail.com (Michael VanLandingham) Date: Sat, 10 May 2008 18:46:02 -0700 Subject: [Pythonmac-SIG] giving an embedded interactive interpreter access to objc & app objects Message-ID: Hi, I'm working on a (mostly cocoa) application, and want to embed an interactive interpreter into the app. I think I have that working, at least in a Foundation-based test CLI app. (I'm sure it will be more difficult outside of the terminal environment). However, how do I give the interpreter access to the app's objects? Is there some way to pass those objects in, via PyObjC or something else, before calling the PyRun_InteractiveLoop() function? Or is there a way that I can take advantage of introspection to gain access to those objects once I've started the interpreter? There is pyobjc.inject, which seems to be able to do this kind of introspection etc, but it's not working for me on Leopard. Plus, I'd rather explicitly embed the interpreter, rather than the injecting voodoo. (I did try loading the example InjectInterpreter.bundle into my app, but that didn't work either). Thank You, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From Garry.Willgoose at newcastle.edu.au Tue May 6 06:58:26 2008 From: Garry.Willgoose at newcastle.edu.au (Garry Willgoose) Date: Tue, 06 May 2008 14:58:26 +1000 Subject: [Pythonmac-SIG] python shell crash after 10.5 upgrade Message-ID: <08A6FA3E-7F3D-479F-8DA1-C63C218829A0@newcastle.edu.au> I've just moved all my stuff from a Intel Imac on 10.4.11 to a Macpro on 10.5.2. On both machines I have the same universal activestate python. I have some codes that build a shared library using f2py from numpy. Now when I import the library as built on osx10.4 it all works fine but when I import library as built on 10.5 I get the following error message willgoose-macpro:system garrywillgoose$ python ActivePython 2.5.1.1 (ActiveState Software Inc.) based on Python 2.5.1 (r251:54863, May 1 2007, 17:40:00) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import tsimdtm Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap Its only my libraries that are the problem. I upgraded to the latest version of activestate 2.5.2 but same problem. Reinstalled all the compilers and the numpy support library ... still the same. Any ideas (1) what the error means in the first place and (2) what I should do? ==================================================================== Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University of Newcastle, Callaghan, 2308 Australia. Centre webpage: www.c2im.org.au Phone: (International) +61 2 4921 6050 (Tues-Fri AM); +61 2 6545 9574 (Fri PM-Mon) FAX: (International) +61 2 4921 6991 (Uni); +61 2 6545 9574 (personal and Telluric) Env. Engg. Secretary: (International) +61 2 4921 6042 email: garry.willgoose at newcastle.edu.au; g.willgoose at telluricresearch.com email-for-life: garry.willgoose at alum.mit.edu personal webpage: www.telluricresearch.com/garry ==================================================================== "Do not go where the path may lead, go instead where there is no path and leave a trail" Ralph Waldo Emerson ==================================================================== From mariano.difelice at gmail.com Mon May 12 11:14:14 2008 From: mariano.difelice at gmail.com (Mariano Di Felice) Date: Mon, 12 May 2008 11:14:14 +0200 Subject: [Pythonmac-SIG] py2app mac Message-ID: <48280A66.7090909@gmail.com> Well Christopher, VERY GREAT!!! I've installed Universal PIL from your link, and now I've solved my initial problem. But now, I have another problem: when I launch my app, will raise an Exception managed from Apple Report. I attach this report thx very much PS: and debugging my app, I've found that the import xml.etree.cElementTree as cElementTree cause crash on running app... any ideas??? -- /\/\ariano Di Felice Java PHP Python Ruby programmer with MySQL, PostgreSql, SQLite and Oracle support Linux Platform Developer http://www.marianodifelice.it mariano.difelice at gmail.com Tel. 0735 703735 Cell +39 339 6407211 -------------- next part -------------- A non-text attachment was scrubbed... Name: app.crash.zip Type: application/x-zip-compressed Size: 10286 bytes Desc: not available URL: From ronaldoussoren at mac.com Mon May 12 12:37:01 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 12 May 2008 12:37:01 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> Message-ID: <5C67D425-FD29-404B-A0DB-12D7D6A5A7CC@mac.com> Folks, Here's an updated version of Daniels work. Changes w.r.t. to Daniels version: * Remove all version except the one using SystemConfiguration * Add "noproxy" function * Add support for https, ftp and gopher * More defensive programming I'm going to do some testing with this version if everything works for me I'll add this to python2.6. This doesn't support "proxy autoconfiguration", but I don't think that's possible to do within the structure of urllib and would require a JavaScript engine anyway. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: urllib_without_carbon.py Type: text/x-python-script Size: 7535 bytes Desc: not available URL: -------------- next part -------------- On 14 Apr, 2008, at 14:24, Daniel Miller wrote: > Thanks Nicholas, > >> The general CF rule is that if you use a function named *Get*, then >> you don't need to CFRelease; if you use a function named *Copy* or >> *Create*, you do. So, what you've written looks fine. > > With that in mind one further modification seems to be necessary. > Take three attached. > > ~ Daniel > > < > urllib_contribution.py>_______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ronaldoussoren at mac.com Mon May 12 12:49:32 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 12 May 2008 12:49:32 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <5C67D425-FD29-404B-A0DB-12D7D6A5A7CC@mac.com> References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> <5C67D425-FD29-404B-A0DB-12D7D6A5A7CC@mac.com> Message-ID: On 12 May, 2008, at 12:37, Ronald Oussoren wrote: > Folks, > > Here's an updated version of Daniels work. Changes w.r.t. to Daniels > version: Almost, but not quite. This version actually works (the "enabled" keys in the SystemConfiguration dictionary have a CFNumber as theire value, not a CFBoolean). Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: urllib_without_carbon.py Type: text/x-python-script Size: 7536 bytes Desc: not available URL: -------------- next part -------------- > > > On 14 Apr, 2008, at 14:24, Daniel Miller wrote: > >> Thanks Nicholas, >> >>> The general CF rule is that if you use a function named *Get*, >>> then you don't need to CFRelease; if you use a function named >>> *Copy* or *Create*, you do. So, what you've written looks fine. >> >> With that in mind one further modification seems to be necessary. >> Take three attached. >> >> ~ Daniel >> >> < >> urllib_contribution >> .py>_______________________________________________ >> 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 ronaldoussoren at mac.com Mon May 12 13:32:16 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 12 May 2008 13:32:16 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> <5C67D425-FD29-404B-A0DB-12D7D6A5A7CC@mac.com> Message-ID: On 12 May, 2008, at 12:49, Ronald Oussoren wrote: > > On 12 May, 2008, at 12:37, Ronald Oussoren wrote: > >> Folks, >> >> Here's an updated version of Daniels work. Changes w.r.t. to >> Daniels version: > > Almost, but not quite. > > This version actually works (the "enabled" keys in the > SystemConfiguration dictionary have a CFNumber as theire value, not > a CFBoolean). This version is now merged into urllib and commited as revision 63159 in the trunk. Ronald From Chris.Barker at noaa.gov Mon May 12 19:08:02 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 12 May 2008 10:08:02 -0700 Subject: [Pythonmac-SIG] py2app mac In-Reply-To: <48280A66.7090909@gmail.com> References: <48280A66.7090909@gmail.com> Message-ID: <48287972.4090702@noaa.gov> Mariano Di Felice wrote: > Well Christopher, > VERY GREAT!!! > I've installed Universal PIL from your link, and now I've solved my > initial problem. Good to hear. It is a trick to build PIL properly for a Universal Python. I've been doing some work to try to make it easier (and to get binaries up on the PIL site), but I'm not sure when I'll finish that. > PS: and debugging my app, I've found that the > > import xml.etree.cElementTree as cElementTree > > cause crash on running app... Does it crash when run outside the *.app bundle? or only when bundled? -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From mariano.difelice at gmail.com Mon May 12 19:47:23 2008 From: mariano.difelice at gmail.com (Mariano Di Felice) Date: Mon, 12 May 2008 19:47:23 +0200 Subject: [Pythonmac-SIG] py2app mac In-Reply-To: <48287972.4090702@noaa.gov> References: <48280A66.7090909@gmail.com> <48287972.4090702@noaa.gov> Message-ID: <482882AB.1020006@gmail.com> Hi Chris, The app crash when I run in another PC Mac... but don't worry, I've found ( another one!!! ) what's wrong: psyco with elementtree cause crash!!! I don't believe to, but it is!!! and don't ask me why, please...;) well, after this risconcerting news, I've found another problem unfortunately: My app utilize aggdraw module, that I have downloaded from effbot.org and installed in my Intel Mac. Py2app build works well, but the .app that run on another PPC Mac cause a crash with follow error: An unexpected error has occurred during execution of the main script ImportError: dlopen(/Users/mac/Desktop/FotoTaxi3.app/Contents/Resources/lib/pyth on2.5/lib-dynload/aggdraw.so, 2): Symbol not found: _FT_Load_Glyph Referenced from: /Users/mac/Desktop/FotoTaxi3.app/Contents/Resources/lib/pytho n2.5/lib-dynload/aggdraw.so Expected in: dynamic lookup And now, I have not idea about.... what's wrong? >> PS: and debugging my app, I've found that the >> >> import xml.etree.cElementTree as cElementTree >> >> cause crash on running app... > > Does it crash when run outside the *.app bundle? or only when bundled? > > -CHB > -- /\/\ariano Di Felice Java PHP Python Ruby programmer with MySQL, PostgreSql, SQLite and Oracle support Linux Platform Developer http://www.marianodifelice.it mariano.difelice at gmail.com Tel. 0735 703735 Cell +39 339 6407211 From dougfort at dougfort.com Mon May 12 20:20:00 2008 From: dougfort at dougfort.com (Doug Fort, Consulting Programmer) Date: Mon, 12 May 2008 14:20:00 -0400 Subject: [Pythonmac-SIG] Folder Access Modes in Py2App Install Message-ID: <5db086ad0805121120n5635a4abu29d0e3c03b743d9b@mail.gmail.com> Hi, We use Py2App to distribute SpiderOak. We're getting complaints from users that when they install the product from an administrator account (which they must do to write to /Applications), they can't run the product from other accounts. Examination shows that the top level .app directory has access mode 755 $ ls -ld /Applications/SpiderOak.app/ drwxr-xr-x 3 dougfort admin 102 Mar 17 10:50 /Applications/SpiderOak.app/ However, lower level directories have access mode 700 $ ls -ld /Applications/SpiderOak.app/Contents/ drwx------ 7 dougfort admin 238 Mar 17 10:50 /Applications/SpiderOak.app/Contents/ When I run chmod -R 755 /Applications/SpiderOak.app/ I can run from the other users. Is there a way we can persuade Py2App, and/or setup to set these access modes? -- Doug Fort, Consulting Programmer http://www.dougfort.com From arne_bab at web.de Tue May 13 01:15:31 2008 From: arne_bab at web.de (Arne Babenhauserheide) Date: Tue, 13 May 2008 01:15:31 +0200 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? Message-ID: <200805130115.31845.arne_bab@web.de> Hi, I am trying to get py2app and bdst_mpkg to work in Gentoo GNU/Linux at the moment, and I wondered, if you could provide some information. The problems I'm stumbling upon are: * plistlib isn't avaible in my Python. It can be downloaded from SVn, though: -> http://svn.python.org/view/*checkout*/python/trunk/Lib/plistlib.py?rev=60173 * Carbon.File isn't avaible in my Python either. I'd be very thankful for help in getting it to work (and I'll try to contribute the findings at least into Gentoo, so other Gentoo users can use py2app and bdist_mpkg, too). Best wishes, Arne -- Unpolitisch sein Hei?t politisch sein Ohne es zu merken. - Arne Babenhauserheide ( http://draketo.de ) -- Weblog: http://blog.draketo.de -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein W?rfel System: http://1w6.org - einfach sauberere (Rollenspiel-) Regeln -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): http://draketo.de/inhalt/ich/pubkey.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From dwf at cs.toronto.edu Tue May 13 02:17:45 2008 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Mon, 12 May 2008 20:17:45 -0400 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: References: <200805130115.31845.arne_bab@web.de> Message-ID: I'm positively confused. What would be the use of py2app and bdst_mpkg on a platform other than the Mac? Are you trying to build apps for GNUstep or something? If that is your intention, chances are a lot of the NeXT-ish stuff available in GNUstep has diverged significantly from the same in OS X, and most packages that have those targets are not going to build properly on Linux without rewriting half the package itself. David > On Mon, May 12, 2008 at 7:15 PM, Arne Babenhauserheide wrote: > > Hi, > > > > I am trying to get py2app and bdst_mpkg to work in Gentoo GNU/Linux at the > > moment, and I wondered, if you could provide some information. > > > > The problems I'm stumbling upon are: > > * plistlib isn't avaible in my Python. It can be downloaded from SVn, though: > > -> > > http://svn.python.org/view/*checkout*/python/trunk/Lib/plistlib.py?rev=60173 > > > > * Carbon.File isn't avaible in my Python either. > > > > I'd be very thankful for help in getting it to work (and I'll try to > > contribute the findings at least into Gentoo, so other Gentoo users can use > > py2app and bdist_mpkg, too). > > > > Best wishes, > > Arne > > -- > > Unpolitisch sein > > Hei?t politisch sein > > Ohne es zu merken. > > - Arne Babenhauserheide ( http://draketo.de ) > > > > -- Weblog: http://blog.draketo.de > > -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the > > history of free software. > > -- Ein W?rfel System: http://1w6.org - einfach sauberere (Rollenspiel-) Regeln > > > > -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): > > http://draketo.de/inhalt/ich/pubkey.txt > > > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > > > > From vip at avatar.com.au Tue May 13 01:52:13 2008 From: vip at avatar.com.au (DavidW) Date: Tue, 13 May 2008 09:52:13 +1000 Subject: [Pythonmac-SIG] py2app mac In-Reply-To: <48287972.4090702@noaa.gov> References: <48280A66.7090909@gmail.com> <48287972.4090702@noaa.gov> Message-ID: <20169B8E-99E5-4E6F-A8F1-DCC68A5CE055@avatar.com.au> This is good news indeed, and will create great waves, if not a tsunami (sorry Christopher:-) I've been 1/2 following this thread since I found the 1.1.6 (?) PIL downloaded lib interfered with gcc through scons and I had to ditch it. Please post a message when the package has been successfully tested on OSX (universal or intel) thanks, David. On 13/05/2008, at 3:08 AM, Christopher Barker wrote: > Mariano Di Felice wrote: >> Well Christopher, >> VERY GREAT!!! >> I've installed Universal PIL from your link, and now I've solved my >> initial problem. > > Good to hear. It is a trick to build PIL properly for a Universal > Python. I've been doing some work to try to make it easier (and to > get binaries up on the PIL site), but I'm not sure when I'll finish > that. > >> PS: and debugging my app, I've found that the >> import xml.etree.cElementTree as cElementTree >> cause crash on running app... > > Does it crash when run outside the *.app bundle? or only when bundled? > > -CHB .. ________________________________________________ David Worrall. - Experimental Polymedia: www.avatar.com.au - Education for Financial Independence: www.mindthemarkets.com.au Australian research affiliations: - Capital Markets Cooperative Research Centre: www.cmcrc.com - Sonic Communications Research Group: creative.canberra.edu.au/scrg From ronaldoussoren at mac.com Tue May 13 15:22:13 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 13 May 2008 15:22:13 +0200 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <200805130115.31845.arne_bab@web.de> References: <200805130115.31845.arne_bab@web.de> Message-ID: <92F745F4-DF03-4165-A342-66D02314C0B6@mac.com> On 13 May, 2008, at 1:15, Arne Babenhauserheide wrote: > Hi, > > I am trying to get py2app and bdst_mpkg to work in Gentoo GNU/Linux > at the > moment, and I wondered, if you could provide some information. > > The problems I'm stumbling upon are: > * plistlib isn't avaible in my Python. It can be downloaded from > SVn, though: > -> > http://svn.python.org/view/*checkout*/python/trunk/Lib/plistlib.py?rev=60173 plistlib is a mac-specific library, it will be added to the general stdlib in python 2.6. > > > * Carbon.File isn't avaible in my Python either. That's mac specific and will stay that way. > > > I'd be very thankful for help in getting it to work (and I'll try to > contribute the findings at least into Gentoo, so other Gentoo users > can use > py2app and bdist_mpkg, too). I don't understand why you want that. You do know that both provide mac-specific functionality? bdist_mpkg cannot work on platforms other than OSX because it uses a utility from Apple to build that BOM (kind of an index) for the package, that tool is only available on OSX and the fileformat of the BOM is not documented. Ronald From arne_bab at web.de Tue May 13 20:36:49 2008 From: arne_bab at web.de (Arne Babenhauserheide) Date: Tue, 13 May 2008 20:36:49 +0200 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: References: <200805130115.31845.arne_bab@web.de> Message-ID: <200805132036.51901.arne_bab@web.de> The use of py2app on GNU/Linux is, that I want to distribute apps to non-linux users, but I don't have MacOSX running anywhere near. I develop on my Gentoo Box, and I want to be able to create programs for friends of mine who use MacOSX. Python is cross platform, but to really use that advantage, I need to be able to distribute Python programs for individual platforms easily. And I want to enable other Linux users to do the same. Best wishes, Arne El Tuesday, 13 de May de 2008 02:17:45 David Warde-Farley escribi?: > I'm positively confused. What would be the use of py2app and bdst_mpkg > on a platform other than the Mac? Are you trying to build apps for > GNUstep or something? > > If that is your intention, chances are a lot of the NeXT-ish stuff > available in GNUstep has diverged significantly from the same in OS X, > and most packages that have those targets are not going to build > properly on Linux without rewriting half the package itself. > > David > > > On Mon, May 12, 2008 at 7:15 PM, Arne Babenhauserheide wrote: > > > Hi, > > > > > > I am trying to get py2app and bdst_mpkg to work in Gentoo GNU/Linux > > > at the moment, and I wondered, if you could provide some information. > > > > > > The problems I'm stumbling upon are: > > > * plistlib isn't avaible in my Python. It can be downloaded from SVn, > > > though: -> > > > > > > http://svn.python.org/view/*checkout*/python/trunk/Lib/plistlib.py?rev > > >=60173 > > > > > > * Carbon.File isn't avaible in my Python either. > > > > > > I'd be very thankful for help in getting it to work (and I'll try to > > > contribute the findings at least into Gentoo, so other Gentoo users > > > can use py2app and bdist_mpkg, too). > > > > > > Best wishes, > > > Arne > > > -- > > > Unpolitisch sein > > > Hei?t politisch sein > > > Ohne es zu merken. > > > - Arne Babenhauserheide ( http://draketo.de ) > > > > > > -- Weblog: http://blog.draketo.de > > > -- Infinite Hands: http://infinite-hands.draketo.de - singing a part > > > of the history of free software. > > > -- Ein W?rfel System: http://1w6.org - einfach sauberere > > > (Rollenspiel-) Regeln > > > > > > -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): > > > http://draketo.de/inhalt/ich/pubkey.txt > > > > > > _______________________________________________ > > > 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 -- Unpolitisch sein Hei?t politisch sein Ohne es zu merken. - Arne Babenhauserheide ( http://draketo.de ) -- Weblog: http://blog.draketo.de -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein W?rfel System: http://1w6.org - einfach sauberere (Rollenspiel-) Regeln -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): http://draketo.de/inhalt/ich/pubkey.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From kw at codebykevin.com Tue May 13 20:46:46 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 13 May 2008 14:46:46 -0400 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <200805132036.51901.arne_bab@web.de> References: <200805130115.31845.arne_bab@web.de> <200805132036.51901.arne_bab@web.de> Message-ID: <4829E216.7090205@codebykevin.com> Arne Babenhauserheide wrote: > The use of py2app on GNU/Linux is, that I want to distribute apps to non-linux > users, but I don't have MacOSX running anywhere near. > > I develop on my Gentoo Box, and I want to be able to create programs for > friends of mine who use MacOSX. > > Python is cross platform, but to really use that advantage, I need to be able > to distribute Python programs for individual platforms easily. > > And I want to enable other Linux users to do the same. > > Best wishes, > Arne > If all you are distributing are Python scripts, you can already to this with distutils or setuptools. If you want to distribute standalone apps with the Python interpreter embedded, that can't be done in a cross-platform manner. A Python binary built on Linux won't run on OS X. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From arne_bab at web.de Tue May 13 21:15:03 2008 From: arne_bab at web.de (Arne Babenhauserheide) Date: Tue, 13 May 2008 21:15:03 +0200 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <92F745F4-DF03-4165-A342-66D02314C0B6@mac.com> References: <200805130115.31845.arne_bab@web.de> <92F745F4-DF03-4165-A342-66D02314C0B6@mac.com> Message-ID: <200805132115.14748.arne_bab@web.de> Hi Ronald, Thanks for your answer! El Tuesday, 13 de May de 2008 15:22:13 escribi?: > plistlib is a mac-specific library, it will be added to the general > stdlib in python 2.6. And it works under GNU/Linux (I tried installing it by hand). > > * Carbon.File isn't avaible in my Python either. > > That's mac specific and will stay that way. Is it essential in py2app? > > I'd be very thankful for help in getting it to work (and I'll try to > > contribute the findings at least into Gentoo, so other Gentoo users > > can use > > py2app and bdist_mpkg, too). > > I don't understand why you want that. You do know that both provide > mac-specific functionality? Yes. Functionality for Mac users which might want to use my programs :) > bdist_mpkg cannot work on platforms other than OSX because it uses a > utility from Apple to build that BOM (kind of an index) for the > package, that tool is only available on OSX and the fileformat of the > BOM is not documented. That's sad... how about py2app? Best wishes, Arne -- Unpolitisch sein Hei?t politisch sein Ohne es zu merken. - Arne Babenhauserheide ( http://draketo.de ) -- Weblog: http://blog.draketo.de -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein W?rfel System: http://1w6.org - einfach sauberere (Rollenspiel-) Regeln -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): http://draketo.de/inhalt/ich/pubkey.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From Garry.Willgoose at newcastle.edu.au Wed May 14 07:27:33 2008 From: Garry.Willgoose at newcastle.edu.au (Garry Willgoose) Date: Wed, 14 May 2008 15:27:33 +1000 Subject: [Pythonmac-SIG] mac osx10.5 and external library crash (possible f2py/numpy problem?) Message-ID: I've just moved all my stuff from a Intel Imac on 10.4.11 to a Macpro on 10.5.2. On both machines I have the same universal activestate python (both 2.5.1 and 2.5.2.2 give the same problem). I have some codes in fortran from which I build a shared library using f2py from numpy. Now when I import the library as built on osx10.4 it all works fine but when I import library as built on 10.5 I get the following error message willgoose-macpro:system garrywillgoose$ python ActivePython 2.5.1.1 (ActiveState Software Inc.) based on Python 2.5.1 (r251:54863, May 1 2007, 17:40:00) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import tsimdtm Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap Its only my libraries that are the problem. Now also (1) if I move this library back to my 10.4 machine it works fine, and (2) if I move the library built on my 10.4 machine over to 10.5 it also works fine. Its only the library built on 10.5 and run on 10.5 that is the problem. Re f2py it appears to be independent of fortran compiler (g95, gfortran and intel fortran all give same result). I upgraded to the latest version of activestate 2.5.2 but same problem. OSX 10.4 has xcode 2.4 installed, 10.5 has 3.0 installed. Reinstalled all the fortran compilers and the numpy support library ... still the same. Any ideas (1) what the error means in the first place and (2) what I should do? I've cross-posted this on the Python-mac and numpy discussion since it appears to be a OSX/numpy/f2py interaction. ==================================================================== Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University of Newcastle, Callaghan, 2308 Australia. Centre webpage: www.c2im.org.au Phone: (International) +61 2 4921 6050 (Tues-Fri AM); +61 2 6545 9574 (Fri PM-Mon) FAX: (International) +61 2 4921 6991 (Uni); +61 2 6545 9574 (personal and Telluric) Env. Engg. Secretary: (International) +61 2 4921 6042 email: garry.willgoose at newcastle.edu.au; g.willgoose at telluricresearch.com email-for-life: garry.willgoose at alum.mit.edu personal webpage: www.telluricresearch.com/garry ==================================================================== "Do not go where the path may lead, go instead where there is no path and leave a trail" Ralph Waldo Emerson ==================================================================== From jf at ai.univ-paris8.fr Wed May 14 17:49:40 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Wed, 14 May 2008 17:49:40 +0200 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: <47F74C20.8060706@gmail.com> References: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> <18422.12696.17942.906398@montanaro-dyndns-org.local> <47F74C20.8060706@gmail.com> Message-ID: At 10:53 +0100 2008/04/05, Matthias Baas wrote: >Just for the record, the distutils have a function that returns the include path: > >>>import distutils.sysconfig > >>>distutils.sysconfig.get_python_inc() > >So if you really need to know the include path for some reason, you should use this function as it is platform independent. But as was said above, when compiling an extension module adding this path manually is not required. Thanks: my next step also involves including Python.h, as documented in section 5.1 Very High Level Embedding : [http://docs.python.org/ext/high-level-embedding.html] The problem is this header file does not define the required symbols for the C code example at the above link : collect2: ld returned 1 exit status /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _Py_Initialize _Py_Finalize _PyRun_SimpleString I've unsuccessfully tried all of the Python.h files I could find in my tree... Does anybody know how to link such a simple program properly? Or merely give me a clue about what I'm doing wrong? From kw at codebykevin.com Wed May 14 19:57:29 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 14 May 2008 13:57:29 -0400 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <200805141942.21829.arne_bab@web.de> References: <200805130115.31845.arne_bab@web.de> <200805132036.51901.arne_bab@web.de> <4829E216.7090205@codebykevin.com> <200805141942.21829.arne_bab@web.de> Message-ID: <482B2809.8030809@codebykevin.com> Copying repsonse to the list so others can see the follow-up: Arne Babenhauserheide wrote: > El Tuesday, 13 de May de 2008 20:46:46 Kevin Walzer escribi?: >> If all you are distributing are Python scripts, you can already to this >> with distutils or setuptools. > > I'd do it, if most Mac Users where completely comfortable with scripts. > > But to create something in which a Mac User feels aat home, I need to turn it > into an Application bundle. That's correct. > >> If you want to distribute standalone apps with the Python interpreter >> embedded, that can't be done in a cross-platform manner. A Python binary >> built on Linux won't run on OS X. > > Wouldn't it be possible to just include a binary Mac Python and then copy the > script to the correct location? No, not really. Python isn't installed in a single location on the Mac, and standalone app bundles are structured differently anyway. > > I remember doing that for Java applications, and a friend of mine did the same > with Python scripts. > > At the moment this takes manual intervention, though, and I can't do it with > setuptools. > > This could also enable Windows users (the vast majority of users) to publish > Python programs, which look like native MacOSX Applications, and so the > number of available programs for MacOSX could increase. Yes, but things don't work this way. You can't build standalone Python apps intended for Windows on the Mac, either. py2exe is the standard tool here, and it won't run on the Mac. :-) --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From arne_bab at web.de Wed May 14 21:20:11 2008 From: arne_bab at web.de (Arne Babenhauserheide) Date: Wed, 14 May 2008 21:20:11 +0200 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <482B2809.8030809@codebykevin.com> References: <200805130115.31845.arne_bab@web.de> <200805141942.21829.arne_bab@web.de> <482B2809.8030809@codebykevin.com> Message-ID: <200805142120.12458.arne_bab@web.de> El Wednesday, 14 de May de 2008 19:57:29 Kevin Walzer escribi?: > Copying repsonse to the list so others can see the follow-up: sorry... > Arne Babenhauserheide wrote: > > Wouldn't it be possible to just include a binary Mac Python and then copy > > the script to the correct location? > > No, not really. Python isn't installed in a single location on the Mac, > and standalone app bundles are structured differently anyway. What I mean is: MyPythonApp.app/ Contents/my_python_script.py MacOS/python info.plist (or so, I don't remember the exact setup of app bundles right now), To create a new python app, just replace my_python_script.py . Would that work? > Yes, but things don't work this way. You can't build standalone Python > apps intended for Windows on the Mac, either. py2exe is the standard > tool here, and it won't run on the Mac. :-) But afaik, osx is built a bit more efficiently, there. Best wishes, Arne -- Unpolitisch sein Hei?t politisch sein Ohne es zu merken. - Arne Babenhauserheide ( http://draketo.de ) -- Weblog: http://blog.draketo.de -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein W?rfel System: http://1w6.org - einfach sauberere (Rollenspiel-) Regeln -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): http://draketo.de/inhalt/ich/pubkey.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From kw at codebykevin.com Wed May 14 22:00:10 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 14 May 2008 16:00:10 -0400 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <200805142120.12458.arne_bab@web.de> References: <200805130115.31845.arne_bab@web.de> <200805141942.21829.arne_bab@web.de> <482B2809.8030809@codebykevin.com> <200805142120.12458.arne_bab@web.de> Message-ID: <482B44CA.9080805@codebykevin.com> Arne Babenhauserheide wrote: > El Wednesday, 14 de May de 2008 19:57:29 Kevin Walzer escribi?: >> Copying repsonse to the list so others can see the follow-up: > > sorry... > >> Arne Babenhauserheide wrote: >>> Wouldn't it be possible to just include a binary Mac Python and then copy >>> the script to the correct location? >> No, not really. Python isn't installed in a single location on the Mac, >> and standalone app bundles are structured differently anyway. > > What I mean is: > > MyPythonApp.app/ > Contents/my_python_script.py > MacOS/python > info.plist > > (or so, I don't remember the exact setup of app bundles right now), > > To create a new python app, just replace my_python_script.py . > > Would that work? > Most likely, no. py2app works all kinds of magic in creating an application bundle, including rolling in the Python standard library, whatever GUI tookit you are using, and other scripts, and it runs Mac-specific tools to modify the library search path. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From m.vanland at gmail.com Wed May 14 22:43:42 2008 From: m.vanland at gmail.com (Michael VanLandingham) Date: Wed, 14 May 2008 13:43:42 -0700 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: References: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> <18422.12696.17942.906398@montanaro-dyndns-org.local> <47F74C20.8060706@gmail.com> Message-ID: <8AD00B62-E8C5-443A-A4D4-B3E426C20FCF@gmail.com> If you're using Xcode, you just #include in your source file, then add the Python framework to your project (in Xcode, right click on your project file in the "Groups & Files" pane, select "Add->Existing Frameworks..."). You might need to configure the build rules to make sure the right version of the framework is found first, but on my system, this just worked. If you don't add the framework to the project, you get the linker errors that you described. If you're not using Xcode, and instead are using gcc on the command line or makefile, then you need to add the right flags so that it can find the framework, etc. -mv On May 14, 2008, at 8:49 AM, Feat wrote: > At 10:53 +0100 2008/04/05, Matthias Baas wrote: >> Just for the record, the distutils have a function that returns the >> include path: >> >>>import distutils.sysconfig >> >>>distutils.sysconfig.get_python_inc() >> >> So if you really need to know the include path for some reason, you >> should use this function as it is platform independent. But as was >> said above, when compiling an extension module adding this path >> manually is not required. > > Thanks: my next step also involves including Python.h, as documented > in section 5.1 Very High Level Embedding : > > [http://docs.python.org/ext/high-level-embedding.html] > > The problem is this header file does not define the required symbols > for the C code example at the above link : > > collect2: ld returned 1 exit status > /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: > Undefined symbols: > _Py_Initialize > _Py_Finalize > _PyRun_SimpleString > > I've unsuccessfully tried all of the Python.h files I could find in > my tree... > > Does anybody know how to link such a simple program properly? > > Or merely give me a clue about what I'm doing wrong? > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From bwaters at nrao.edu Thu May 15 00:40:11 2008 From: bwaters at nrao.edu (Boyd Waters) Date: Wed, 14 May 2008 16:40:11 -0600 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: <8AD00B62-E8C5-443A-A4D4-B3E426C20FCF@gmail.com> References: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> <18422.12696.17942.906398@montanaro-dyndns-org.local> <47F74C20.8060706@gmail.com> <8AD00B62-E8C5-443A-A4D4-B3E426C20FCF@gmail.com> Message-ID: <73553A8B-759F-4E29-9590-FCFB399E2EB0@nrao.edu> On May 14, 2008, at 2:43 PM, Michael VanLandingham wrote: > gcc on the command line or makefile, then you need to add the right > flags so that it can find the framework The Python framework that ships with OS X is already in the search path, so all you'd need is -framework Python added to your GCC command line. I'm using Python 2.5.2 at the moment, which is built as a framework at /opt/local/lib/Python.framework, so I use -F/opt/local/lib -framework Python and I'm good. From arne_bab at web.de Thu May 15 07:26:03 2008 From: arne_bab at web.de (Arne Babenhauserheide) Date: Thu, 15 May 2008 07:26:03 +0200 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <482B44CA.9080805@codebykevin.com> References: <200805130115.31845.arne_bab@web.de> <200805142120.12458.arne_bab@web.de> <482B44CA.9080805@codebykevin.com> Message-ID: <200805150726.03773.arne_bab@web.de> El Wednesday, 14 de May de 2008 22:00:10 Kevin Walzer escribi?: > Most likely, no. py2app works all kinds of magic in creating an > application bundle, including rolling in the Python standard library, > whatever GUI tookit you are using, and other scripts, and it runs > Mac-specific tools to modify the library search path. Then it seems I'll have to work on some solutions myself. It won't be as advanced as py2app, but it might just work. (For example creating a python bin (on a Mac with py2app) for each dependency-setting I need and such, or rather first creating a Python App-Bundle for pure python programs, and bothering with more advances stuff later on :) ). Many thanks for your answers! Shall I keep you informed of the progress (as soon as I have something which works)? Best wishes, Arne -- Unpolitisch sein Hei?t politisch sein Ohne es zu merken. - Arne Babenhauserheide ( http://draketo.de ) -- Weblog: http://blog.draketo.de -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein W?rfel System: http://1w6.org - einfach sauberere (Rollenspiel-) Regeln -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): http://draketo.de/inhalt/ich/pubkey.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From Chris.Barker at noaa.gov Thu May 15 19:02:16 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 15 May 2008 10:02:16 -0700 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <482B44CA.9080805@codebykevin.com> References: <200805130115.31845.arne_bab@web.de> <200805141942.21829.arne_bab@web.de> <482B2809.8030809@codebykevin.com> <200805142120.12458.arne_bab@web.de> <482B44CA.9080805@codebykevin.com> Message-ID: <482C6C98.8050907@noaa.gov> Kevin Walzer wrote: > Arne Babenhauserheide wrote: >> What I mean is: >> MyPythonApp.app/ >> Contents/my_python_script.py >> MacOS/python >> info.plist >> To create a new python app, just replace my_python_script.py . >> Would that work? > > Most likely, no. py2app works all kinds of magic in creating an > application bundle, including rolling in the Python standard library, > whatever GUI tookit you are using, and other scripts, and it runs > Mac-specific tools to modify the library search path. All that is true. However, Arne may be able to get something like this to work. It seems there are three components to a py2app application bundle: One is the "magic of creating an application bundle", which includes a specific binary, etc. The second is the all the included packages, and modules, including the Frameworks, shared libs, etc that are needed. The third is the actual application user code. If one where to build an application bundle that included all the packages for a given app, you could then swap out the application code. This wouldn't be a general purpose solution, but could be a way to distribute a particular app, doing the final building on another system. Come to think of it, it would be nice to have a "just replace the app code" option to py2app -- it does take a long time to do the complete rebuild. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From lindec at gmail.com Sun May 18 00:32:14 2008 From: lindec at gmail.com (Garrett Friedman) Date: Sat, 17 May 2008 17:32:14 -0500 Subject: [Pythonmac-SIG] mysqldb on leopard binary? Message-ID: <482F5CEE.4050507@mcw.edu> Hello all, I've been trying to get mysqldb to compile on Leopard so I can use Django with a database. As I'm sure most of you know, mysqldb has some issues compiling on Leopard, and even after trying all the "fixes" on the blogs, I cannot seem to get it to compile. I'm using the MAMP package as my Apache + MySQL setup and mysqldb doesn't like the location of mysql_config even when I point the config file to the proper location. I've tried just about everything I can to get it to work and I'm consistently coming up empty. I did however, notice that mysqldb is available as a binary on pythonmac.org, which is exactly what I need. However, I am running Python 2.5 and the binary is for Python 2.4. I was hoping, is there some kind soul out there that can compile mysqldb into a binary for Python 2.5? I would be forever grateful! Garrett From conradwt at gmail.com Sun May 18 10:44:31 2008 From: conradwt at gmail.com (Conrad Taylor) Date: Sun, 18 May 2008 01:44:31 -0700 Subject: [Pythonmac-SIG] mysqldb on leopard binary? In-Reply-To: <482F5CEE.4050507@mcw.edu> References: <482F5CEE.4050507@mcw.edu> Message-ID: <7317d7610805180144w39c87d9chae03d1b8bc1dfc49@mail.gmail.com> Hi, I was able to get everything built using Mac Ports on the Intel based MacBook Pro with Mac OS 10.5.2. However, I'm still working on getting it to install on my PowerMac G5 with Mac OS 10.5.2. -Conrad On Sat, May 17, 2008 at 3:32 PM, Garrett Friedman wrote: > Hello all, > > I've been trying to get mysqldb to compile on Leopard so I can use Django > with a database. As I'm sure most of you know, mysqldb has some issues > compiling on Leopard, and even after trying all the "fixes" on the blogs, I > cannot seem to get it to compile. I'm using the MAMP package as my Apache + > MySQL setup and mysqldb doesn't like the location of mysql_config even when > I point the config file to the proper location. I've tried just about > everything I can to get it to work and I'm consistently coming up empty. I > did however, notice that mysqldb is available as a binary on pythonmac.org, > which is exactly what I need. However, I am running Python 2.5 and the > binary is for Python 2.4. I was hoping, is there some kind soul out there > that can compile mysqldb into a binary for Python 2.5? I would be forever > grateful! > > Garrett > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From georg.seifert at gmx.de Sun May 18 20:15:20 2008 From: georg.seifert at gmx.de (Georg Seifert) Date: Sun, 18 May 2008 20:15:20 +0200 Subject: [Pythonmac-SIG] embed python in cocoa Message-ID: <3CDF557D-5593-42A9-B192-FDF78C17E1A0@gmx.de> Hello, I want wo be able to make my program scriptable with python. My program is written in ObjectC in XCode 3 (target only for MacOSX 10.5). I want to embed it and use Py_Initialize(); PyRun_SimpleString("..... Can anyone give me some advice how I wrap my cocoa classes to be able to access them from within the python script? I found the examples on how to wrap c/c++ functions but nothing about ObjectC. Many thanks in advance Georg From massimodisasha at yahoo.it Mon May 19 03:44:27 2008 From: massimodisasha at yahoo.it (Massimo Di Stefano) Date: Mon, 19 May 2008 03:44:27 +0200 Subject: [Pythonmac-SIG] py2app and missed modules Message-ID: <77141B00-56FB-457E-A79A-688DE0303B9B@yahoo.it> Hi, i'm tring for the first time to use py2app :-) i need to create a .app of a module that have the follow dependancies : import os from scipy import io, linalg from numpy import * from pylab import save import sys from PyQt4 import QtGui from PyQt4 import QtCore but unlucky tring " py2app -A " : sashas-macbook-pro-15:pyapp sasha$ python setup.py py2app -A running py2app creating /Users/sasha/Desktop/pyapp/build creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386 creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app/collect creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app/temp creating /Users/sasha/Desktop/pyapp/dist creating build/bdist.macosx-10.5-i386/python2.5-semi_standalone/app/ lib-dynload creating build/bdist.macosx-10.5-i386/python2.5-semi_standalone/app/ Frameworks *** creating application bundle: degree *** sashas-macbook-pro-15:pyapp sasha$ open -a /Users/sasha/Desktop/pyapp/ dist/degree.app it do nor runs ######## console log : 5/19/08 3:30:20 AM [0x0-0x356356].org.pythonmac.unspecified.degree[7158] File "/Users/ sasha/Desktop/pyapp/dist/degree.app/Contents/Resources/__boot__.py", line 153, in _run 5/19/08 3:30:20 AM [0x0-0x356356].org.pythonmac.unspecified.degree[7158] execfile(path, globals(), globals()) 5/19/08 3:30:20 AM [0x0-0x356356].org.pythonmac.unspecified.degree[7158] File "/Users/ sasha/Desktop/pyapp/degree.py", line 5, in 5/19/08 3:30:20 AM [0x0-0x356356].org.pythonmac.unspecified.degree[7158] from scipy import io, linalg 5/19/08 3:30:20 AM [0x0-0x356356].org.pythonmac.unspecified.degree[7158] ImportError: No module named scipy 5/19/08 3:30:23 AM com.apple.launchd[139] ([0x0-0x356356].org.pythonmac.unspecified.degree[7158]) Exited with exit code: 255 5/19/08 3:30:27 AM tuncfgd[7162] tuncfg: already running, use 'killall tuncfg; tuncfg' to restart it 5/19/08 3:30:27 AM com.apple.launchd[1] (tuncfgd[7162]) Exited with exit code: 1 ######## while tring the option : --packages=PyQt4,scipy i get : sashas-macbook-pro-15:pyapp sasha$ python setup.py py2app -- packages=PyQt4,scipy running py2app creating /Users/sasha/Desktop/pyapp/build creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386 creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app/collect creating /Users/sasha/Desktop/pyapp/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app/temp creating /Users/sasha/Desktop/pyapp/dist creating build/bdist.macosx-10.5-i386/python2.5-semi_standalone/app/ lib-dynload creating build/bdist.macosx-10.5-i386/python2.5-semi_standalone/app/ Frameworks Traceback (most recent call last): File "/Library/Python/2.5/site-packages/py2app-0.3.6-py2.5.egg/ py2app/build_app.py", line 548, in _run self.run_normal() File "/Library/Python/2.5/site-packages/py2app-0.3.6-py2.5.egg/ py2app/build_app.py", line 604, in run_normal self.process_recipes(mf, filters, flatpackages, loader_files) File "/Library/Python/2.5/site-packages/py2app-0.3.6-py2.5.egg/ py2app/build_app.py", line 518, in process_recipes rval = check(self, mf) File "/Library/Python/2.5/site-packages/py2app-0.3.6-py2.5.egg/ py2app/recipes/matplotlib.py", line 5, in check mf.import_hook('pytz.zoneinfo', m, ['UTC']) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/modulegraph/modulegraph.py", line 381, in import_hook m = self.load_tail(q, tail) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/modulegraph/modulegraph.py", line 444, in load_tail raise ImportError, "No module named " + mname ImportError: No module named pytz.zoneinfo > /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/ python/modulegraph/modulegraph.py(444)load_tail() -> raise ImportError, "No module named " + mname (Pdb) q i tried to copy a zipped file of my site packages into may.app/Contents/Resources/lib/python2.5/ but without succes :-( i installed py2app using easy_install on a mac osx 10.5.2 thanks for any help ! regards, Massimo Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com From jf at ai.univ-paris8.fr Mon May 19 14:43:44 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 19 May 2008 14:43:44 +0200 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: <73553A8B-759F-4E29-9590-FCFB399E2EB0@nrao.edu> References: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> <18422.12696.17942.906398@montanaro-dyndns-org.local> <47F74C20.8060706@gmail.com> <8AD00B62-E8C5-443A-A4D4-B3E426C20FCF@gmail.com> <73553A8B-759F-4E29-9590-FCFB399E2EB0@nrao.edu> Message-ID: >At 13:43 -0700 2008/05/14, Michael VanLandingham wrote: >>If you're not using Xcode, and instead are using gcc on the command line or makefile, then you need to add the right flags so that it can find the framework, etc. > >The Python framework that ships with OS X is already in the search path, so all you'd need is > -framework Python >added to your GCC command line. I'm using Python 2.5.2 at the moment, which is built as a framework at /opt/local/lib/Python.framework, so I use > -F/opt/local/lib -framework Python >and I'm good. Many thanks to Michael VanLandingham and Boyd Waters for the help: your advices worked nicely, both from Xcode and from gcc as command. -- Jym Feat ~ Paris FR 75018 From jnutting at gmail.com Mon May 19 15:15:38 2008 From: jnutting at gmail.com (Jack Nutting) Date: Mon, 19 May 2008 15:15:38 +0200 Subject: [Pythonmac-SIG] embed python in cocoa In-Reply-To: <3CDF557D-5593-42A9-B192-FDF78C17E1A0@gmx.de> References: <3CDF557D-5593-42A9-B192-FDF78C17E1A0@gmx.de> Message-ID: > Can anyone give me some advice how I wrap my cocoa classes to be able to > access them from within the python script? > > I found the examples on how to wrap c/c++ functions but nothing about > ObjectC. You'll want to use PyObjC: http://pyobjc.sourceforge.net/ Already included in Leopard, so you may not need to even download anything unless you need a newer version. -- // jack // http://www.nuthole.com From georg.seifert at gmx.de Mon May 19 15:25:03 2008 From: georg.seifert at gmx.de (Georg Seifert) Date: Mon, 19 May 2008 15:25:03 +0200 Subject: [Pythonmac-SIG] embed python in cocoa In-Reply-To: References: <3CDF557D-5593-42A9-B192-FDF78C17E1A0@gmx.de> Message-ID: I didn?t make myself clear what I want to do: I have a app written in ObjectC and want to embed python to be able to run scripts from within my app. The user should be abel to write his own scripts to modify the model data. So I need to expose the data- classes to python. for c++ it is described here: http://www.python.org/doc/ext/extending-with-embedding.html but how I do this with ObjectC classes? Thanks Georg Am 19.05.2008 um 15:15 schrieb Jack Nutting: >> Can anyone give me some advice how I wrap my cocoa classes to be >> able to >> access them from within the python script? >> >> I found the examples on how to wrap c/c++ functions but nothing about >> ObjectC. > > > You'll want to use PyObjC: > > http://pyobjc.sourceforge.net/ > > Already included in Leopard, so you may not need to even download > anything unless you need a newer version. > > -- > // jack > // http://www.nuthole.com From daniel at keystonewood.com Mon May 19 16:36:35 2008 From: daniel at keystonewood.com (Daniel Miller) Date: Mon, 19 May 2008 10:36:35 -0400 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> <5C67D425-FD29-404B-A0DB-12D7D6A5A7CC@mac.com> Message-ID: Ronald, > This version is now merged into urllib and commited as revision > 63159 in the trunk. Ahh, sorry I'm late. I was on vacation last week when you posted this. Here's an updated version with a bit less duplication (about 55 lines removed). This seems like it will be much easier to maintain (IMHO). Also, I'm sure you know what you're doing so I left the code as it was, but this line (and other related lines) looked suspicious to me: proxies["ftp"] = "http://%s:%i" % (proxy, port) Did you want the URL to be encoded with 'http://' on the front even though it is an FTP proxy? If not, simply use this in the attached script: proxies[protocol] = "%s://%s:%i" % (protocol, proxy, port) else: proxies[protocol] = "%s://%s" % (protocol, proxy) ~ Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: urllib_without_carbon.py Type: text/x-python-script Size: 4856 bytes Desc: not available URL: From ronaldoussoren at mac.com Mon May 19 18:53:49 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 19 May 2008 18:53:49 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> <5C67D425-FD29-404B-A0DB-12D7D6A5A7CC@mac.com> Message-ID: On 19 May, 2008, at 16:36, Daniel Miller wrote: > Ronald, > >> This version is now merged into urllib and commited as revision >> 63159 in the trunk. > > > Ahh, sorry I'm late. I was on vacation last week when you posted > this. Here's an updated version with a bit less duplication (about > 55 lines removed). This seems like it will be much easier to > maintain (IMHO). That version looks fine, I'll probably update urllib.py sometime tomorrow. > > > Also, I'm sure you know what you're doing so I left the code as it > was, but this line (and other related lines) looked suspicious to me: > > proxies["ftp"] = "http://%s:%i" % (proxy, port) > > Did you want the URL to be encoded with 'http://' on the front even > though it is an FTP proxy? That is indeed intentional. Most webproxies proxy FTP using ftp:// URLs, I haven't seen a "true" FTP proxy for a long time. BTW. the version of urllib in the stdlib is slightly newer than what I posted. I had to add annotations for argument- and result-types to ensure that the code works in 64-bit mode as well. Ronald From matsakis at mit.edu Mon May 19 19:04:37 2008 From: matsakis at mit.edu (Nicholas Matsakis) Date: Mon, 19 May 2008 13:04:37 -0400 (EDT) Subject: [Pythonmac-SIG] Using Mac system fonts with matplotlib? Message-ID: I'm looking for some guidance on using system-installed truetype fonts with matplotlib. I asked this question on the matplotlib mailing list, but it didn't garner any responses. Here's what I've found so far, using the PDF backend in matplotlib 0.91.2 on 10.5/leopard's native python 2.5 (installed using easy_install). Matplotlib itself is working well and with matplotlib.font_manager.OSXInstalledFonts() I can see that it seems to know what fonts I have on my system. I can even get it to find some of these fonts. However any attempts to use them results in errors when writing out the figure (I've included some stack traces below). Are there reasons to think another backend would work if PDF fails? Also, I'd be interested in an easy way to take a given font file and figure out whether it is of a type supported by MPL and what name I should give to MPL to find and use it. Nick Matsakis ------ an error using /Library/Fonts/tahoma.ttf Traceback (most recent call last): ...skipping some calls... File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backend_bases.py", line 1195, in print_figure **kwargs) File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 1969, in print_pdf file.close() File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 420, in close self.writeFonts() File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 490, in writeFonts fontdictObject = self.embedTTF(realpath, chars[1]) File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 859, in embedTTF ps_name = Name(font.get_sfnt()[(1,0,0,6)]) KeyError: (1, 0, 0, 6) ----- a different error using /System/Library/Fonts/AppleGothic.ttf ...skipping some calls... File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backend_bases.py", line 1195, in print_figure **kwargs) File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 1969, in print_pdf file.close() File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 420, in close self.writeFonts() File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 490, in writeFonts fontdictObject = self.embedTTF(realpath, chars[1]) File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 901, in embedTTF return embedTTFType3(font, characters, descriptor) File "/Library/Python/2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.5-ppc.e gg/matplotlib/backends/backend_pdf.py", line 689, in embedTTFType3 glyph_name = font.get_glyph_name(gind) RuntimeError: Face has no glyph names From isdale at avinc.com Tue May 20 02:15:46 2008 From: isdale at avinc.com (Jerry Isdale) Date: Mon, 19 May 2008 17:15:46 -0700 Subject: [Pythonmac-SIG] embed python in cocoa Message-ID: Georg wrote: > Hello, > > I want wo be able to make my program scriptable with python. > > My program is written in ObjectC in XCode 3 (target only for MacOSX > 10.5). > > I want to embed it and use > > Py_Initialize(); > PyRun_SimpleString("..... > > Can anyone give me some advice how I wrap my cocoa classes to be able > to access them from within the python script? > > I found the examples on how to wrap c/c++ functions but nothing about > ObjectC. > > Many thanks in advance > Georg I've started working on such a thing too and am a bit lost by the lack of documentation. I tried a more ambitious route first but then moved back to a simple case. Suppose I have a simple Obj-C class in the files MyClass.h/m: @interface MyClass : NSObject { float lat; float lon; float alt; } @property float lat; @property float lon; @property float alt; @end @implementation MyClass @synthesize lat; @synthesize lon; @synthesize alt; - (NSString *)description { return [NSString stringWithFormat:@"myClass lat(%f) lon(%f) alt(%f)", lat, lon, alt]; } @end Now I want a simple command line Obj-C tool that runs a python script that creates a MyClass and prints the description. I used XCode 3.0 on my Leopard box to create a Cocoa-Python application. I dont want all the window stuff, so I changed the main.py to simply: import objc from Foundation import * NSLog("Hello World! Running main.py.") and that works. Then I changed it to be... myInst = MyClass.alloc().init().description() NSLog("myInst is: %@",myInst.description()) and *that* worked.... note that I did Not import or otherwise bring in MyClass Trying this with my real classes off in a library also worked. so far that looks good and enough for today's effort. Next I'd like to write python scripts that would animate the values of MyClass - eg set lat/lon/alt in a loop that uses some sort of function. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Tue May 20 12:01:35 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 20 May 2008 12:01:35 +0200 Subject: [Pythonmac-SIG] py2app and bdist_mpkg on Linux? In-Reply-To: <200805132036.51901.arne_bab@web.de> References: <200805130115.31845.arne_bab@web.de> <200805132036.51901.arne_bab@web.de> Message-ID: <4C572627-4ED8-4803-9F4A-FD134223C77C@mac.com> On 13 May, 2008, at 20:36, Arne Babenhauserheide wrote: > The use of py2app on GNU/Linux is, that I want to distribute apps to > non-linux > users, but I don't have MacOSX running anywhere near. > > I develop on my Gentoo Box, and I want to be able to create programs > for > friends of mine who use MacOSX. > > Python is cross platform, but to really use that advantage, I need > to be able > to distribute Python programs for individual platforms easily. > > And I want to enable other Linux users to do the same. It should in theory be possible to enhance py2app to support this. The Carbon.File dependency is only needed for alias builds, and those are only useful during development anyway. I'd be surprised if this works out of the box though, first of all distutils isn't very well suited to cross-compilation anyway and py2app probably has hardcoded locations that won't exist on you're Gentoo box. And as a final observation: distributing builds without testing is wishful thinking. It would be much more worthwhile to ask one of you're friends if you can use their system to do the initial debugging on MacOSX and afterwards ask them to build the MacOSX binaries for you. Ronald > > > Best wishes, > Arne > > > El Tuesday, 13 de May de 2008 02:17:45 David Warde-Farley escribi?: >> I'm positively confused. What would be the use of py2app and >> bdst_mpkg >> on a platform other than the Mac? Are you trying to build apps for >> GNUstep or something? >> >> If that is your intention, chances are a lot of the NeXT-ish stuff >> available in GNUstep has diverged significantly from the same in OS >> X, >> and most packages that have those targets are not going to build >> properly on Linux without rewriting half the package itself. >> >> David >> >>> On Mon, May 12, 2008 at 7:15 PM, Arne Babenhauserheide >> > > wrote: >>>> Hi, >>>> >>>> I am trying to get py2app and bdst_mpkg to work in Gentoo GNU/Linux >>>> at the moment, and I wondered, if you could provide some >>>> information. >>>> >>>> The problems I'm stumbling upon are: >>>> * plistlib isn't avaible in my Python. It can be downloaded from >>>> SVn, >>>> though: -> >>>> >>>> http://svn.python.org/view/*checkout*/python/trunk/Lib/plistlib.py?rev >>>> =60173 >>>> >>>> * Carbon.File isn't avaible in my Python either. >>>> >>>> I'd be very thankful for help in getting it to work (and I'll try >>>> to >>>> contribute the findings at least into Gentoo, so other Gentoo users >>>> can use py2app and bdist_mpkg, too). >>>> >>>> Best wishes, >>>> Arne >>>> -- >>>> Unpolitisch sein >>>> Hei?t politisch sein >>>> Ohne es zu merken. >>>> - Arne Babenhauserheide ( http://draketo.de ) >>>> >>>> -- Weblog: http://blog.draketo.de >>>> -- Infinite Hands: http://infinite-hands.draketo.de - singing a >>>> part >>>> of the history of free software. >>>> -- Ein W?rfel System: http://1w6.org - einfach sauberere >>>> (Rollenspiel-) Regeln >>>> >>>> -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): >>>> http://draketo.de/inhalt/ich/pubkey.txt >>>> >>>> _______________________________________________ >>>> 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 > > > > -- > Unpolitisch sein > Hei?t politisch sein > Ohne es zu merken. > - Arne Babenhauserheide ( http://draketo.de ) > > -- Weblog: http://blog.draketo.de > -- Infinite Hands: http://infinite-hands.draketo.de - singing a part > of the > history of free software. > -- Ein W?rfel System: http://1w6.org - einfach sauberere > (Rollenspiel-) Regeln > > -- Mein ?ffentlicher Schl?ssel (PGP/GnuPG): > http://draketo.de/inhalt/ich/pubkey.txt > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From mailing-lists-1001 at anthonykozar.net Wed May 21 05:00:26 2008 From: mailing-lists-1001 at anthonykozar.net (Anthony Kozar) Date: Tue, 20 May 2008 23:00:26 -0400 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 Message-ID: Hello, I am a new member of the list and I joined because I am having trouble installing Tkinter with 2.3.5 on OS X 10.2.8. I have Jack's MacPython 2.3.5 installed and I downloaded and installed TclTk Aqua 8.4.6 today. But when I run the MacPython Package Manager, it displays an HTTP 404 error for the URL of the repository (some subdirectory of www.python.org/packman). In fact, I get a 404 error in my browser for that parent directory too, so it appears that all of the support for this Package Manager app is gone (??). I searched the wiki and mailing list and could discover no other repositories nor any recent information on alternatives. I am trying to develop a cross-platform GUI for an existing program written in Python. My machines run 10.2 and 9.1. It's a shame that this program requires Python 2.3 which has no Tkinter support on OS 9 or I would just use MacPython-OS9 2.2. I would also just upgrade my 10.2 machine to a newer Python but all of the 2.4 and 2.5 binary distributions appear to require 10.3. Is this correct? So I am wondering what my options are now for cross-platform GUI development with Python on 10.2? Can I get Tkinter installed somehow? Would wxPython work better? I am hoping for a solution that will be reliable and easily installed on Windows, Linux, and OS X. Thanks very much for your thoughts. Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ From kw at codebykevin.com Wed May 21 06:13:07 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 21 May 2008 00:13:07 -0400 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 In-Reply-To: References: Message-ID: <4833A153.7040706@codebykevin.com> Anthony Kozar wrote: > Hello, > > I am a new member of the list and I joined because I am having trouble > installing Tkinter with 2.3.5 on OS X 10.2.8. I have Jack's MacPython 2.3.5 > installed and I downloaded and installed TclTk Aqua 8.4.6 today. But when I > run the MacPython Package Manager, it displays an HTTP 404 error for the URL > of the repository (some subdirectory of www.python.org/packman). In fact, I > get a 404 error in my browser for that parent directory too, so it appears > that all of the support for this Package Manager app is gone (??). I > searched the wiki and mailing list and could discover no other repositories > nor any recent information on alternatives. > > I am trying to develop a cross-platform GUI for an existing program written > in Python. My machines run 10.2 and 9.1. It's a shame that this program > requires Python 2.3 which has no Tkinter support on OS 9 or I would just use > MacPython-OS9 2.2. I would also just upgrade my 10.2 machine to a newer > Python but all of the 2.4 and 2.5 binary distributions appear to require > 10.3. Is this correct? > > So I am wondering what my options are now for cross-platform GUI development > with Python on 10.2? Can I get Tkinter installed somehow? Would wxPython > work better? I am hoping for a solution that will be reliable and easily > installed on Windows, Linux, and OS X. > > Thanks very much for your thoughts. > > Anthony Kozar > mailing-lists-1001 AT anthonykozar DOT net > http://anthonykozar.net/ The Package Manager infrastructure is obsolete--no one has updated that stuff for years. In fact, the version of Python that runs on 10.2 is also obsolete, and not just because it's 2.3.x--Python on the Mac went through some pretty significant architectural changes to support universal binaries, i.e. PPC and Macintel. For instance, the WASTE text library (the basis for the old Python IDE, for instance) is no longer supported. As a side note, I'm not aware of any recent version of Tk which supports 10.2 (you need Tcl/Tk to install Tkinter); ditto for wxPython. My strong suggestion is to upgrade your system. I think 10.3.9 is the absolute minimum that is supported by universal versions of Python. You'd be in far better shape with 10.4, or 10.5. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From massimodisasha at yahoo.it Wed May 21 14:41:45 2008 From: massimodisasha at yahoo.it (Massimo Di Stefano) Date: Wed, 21 May 2008 14:41:45 +0200 Subject: [Pythonmac-SIG] need an help to use py2app In-Reply-To: References: Message-ID: <77ED5A1F-9109-4564-88FD-AF1758313AB4@yahoo.it> Hi i'm tring to use py2app on a paython script it create the executable myapp.app but when i try to launch it i've that it can't finde the modules needed by myapp.app liararies needed by myapp.py : #!/usr/bin/python import os from scipy import io, linalg from numpy import * from pylab import save import sys from PyQt4 import QtGui from PyQt4 import QtCore these what i tried : py2applet --make-setup myapp.py Wrote setup.py host716:py sasha$ python setup.py py2app -A running py2app creating /Users/sasha/Desktop/py/build creating /Users/sasha/Desktop/py/build/bdist.macosx-10.5-i386 creating /Users/sasha/Desktop/py/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone creating /Users/sasha/Desktop/py/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app creating /Users/sasha/Desktop/py/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app/collect creating /Users/sasha/Desktop/py/build/bdist.macosx-10.5-i386/ python2.5-semi_standalone/app/temp creating /Users/sasha/Desktop/py/dist creating build/bdist.macosx-10.5-i386/python2.5-semi_standalone/app/ lib-dynload creating build/bdist.macosx-10.5-i386/python2.5-semi_standalone/app/ Frameworks *** creating application bundle: degree *** host716:py sasha$ tring to run myapp.py i get : 5/21/08 12:56:59 PM mayapp[20272] myapp Error An unexpected error has occurred during execution of the main script ImportError: No module named scipy olease can you help me to learn how to include the external modules into myapp ? thanks for any help! Massimo. Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com From mailing-lists-1001 at anthonykozar.net Wed May 21 15:44:22 2008 From: mailing-lists-1001 at anthonykozar.net (Anthony Kozar) Date: Wed, 21 May 2008 09:44:22 -0400 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 In-Reply-To: <4833A153.7040706@codebykevin.com> Message-ID: Kevin Walzer wrote on 5/21/08 12:13 AM: > The Package Manager infrastructure is obsolete--no one has updated that > stuff for years. Sure, I understand that this PM isn't used in newer versions of MacPython, but shouldn't the packages remain available somewhere so that they can be downloaded? > In fact, the version of Python that runs on 10.2 is > also obsolete, and not just because it's 2.3.x--Python on the Mac went > through some pretty significant architectural changes to support > universal binaries, i.e. PPC and Macintel. Python 2.3 is the minimum requirement of the program (athenaCL) for which I am hoping to build a GUI, so I would prefer to develop targeting 2.3 if I can to ensure maximum compatibility for all users. And the PSF thinks that 2.3 is still relevant enough to have released a patch for it just two months ago. athenaCL is distributed as Python source code and run by double-clicking on a .py file. I expect to distribute the GUI in the same manner for Windows, Mac, and Linux, so it really doesn't matter that MacPython has undergone these changes. :) > For instance, the WASTE text > library (the basis for the old Python IDE, for instance) is no longer > supported. As a side note, I'm not aware of any recent version of Tk > which supports 10.2 (you need Tcl/Tk to install Tkinter); ditto for > wxPython. WASTE support is not an issue since this is not a Mac-only program and I think the 8.4.6 version of Tk is plenty recent enough. athenaCL has a very small user base so it is important to me that the GUI can run on almost any system that the underlying program can. (athenaCL even has an up-to-date Mac OS 9 package although I don't think I will be able to make the GUI work on OS 9 too ...) > My strong suggestion is to upgrade your system. I think 10.3.9 is the > absolute minimum that is supported by universal versions of Python. > You'd be in far better shape with 10.4, or 10.5. 10.5 is not an option as I still need Classic but I am considering 10.4 for a few reasons. Even if I upgrade, I will need to test this project on Python 2.3, I think. Thanks for the reply. However, my immediate need is to get Tkinter working on 10.2. Does anyone have the 2.3 Tkinter package for 10.2 or how can I compile it myself? Thanks. Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ From kw at codebykevin.com Wed May 21 16:17:06 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 21 May 2008 10:17:06 -0400 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 In-Reply-To: References: Message-ID: <48342EE2.20206@codebykevin.com> Anthony Kozar wrote: > > Thanks for the reply. However, my immediate need is to get Tkinter working > on 10.2. Does anyone have the 2.3 Tkinter package for 10.2 or how can I > compile it myself? Thanks. A bit more research shows this page: http://pythonmac.org/packages/legacy.html There's a link there for _tkinter.so. It says it's built for Panther (10.3). It may not work on your system, but that appears to be the only binary package still in existence. Building Python from source isn't that hard. Do you have the developer tools for Jaguar installed? If so, download the source code, follow the instructions, and you should be fine. If the binary I've pointed you to doesn't work, then building all of Python from source (including Tkinter) is your only option. Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From mailing-lists-1001 at anthonykozar.net Wed May 21 17:41:13 2008 From: mailing-lists-1001 at anthonykozar.net (Anthony Kozar) Date: Wed, 21 May 2008 11:41:13 -0400 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 In-Reply-To: <48342EE2.20206@codebykevin.com> Message-ID: Kevin Walzer wrote on 5/21/08 10:17 AM: > A bit more research shows this page: Thanks for the extra effort :) > http://pythonmac.org/packages/legacy.html > > There's a link there for _tkinter.so. It says it's built for Panther > (10.3). It may not work on your system, but that appears to be the only > binary package still in existence. Yes. I downloaded this yesterday and tried to run the installer -- it refuses to install on anything less than 10.3. I did search the Python site, the wiki, pythonmac.org, and this mailing list's archives for 5-6 hours yesterday before breaking down and posting. I was fairly certain that the 10.2 packages were gone but I was hoping ... > Building Python from source isn't that hard. Do you have the developer > tools for Jaguar installed? If so, download the source code, follow the > instructions, and you should be fine. If the binary I've pointed you to > doesn't work, then building all of Python from source (including > Tkinter) is your only option. I was really hoping not to have to rebuild all of Python (which I've never yet done) (1) but I have built fairly complex projects with many targets and dependencies before, so I can probably handle it. Oh well ... (2) Thanks again! Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ (1) Another reason that I am hesitant to roll my own Python is that I also sometimes build Csound packages for distribution, an open-source project with its own Python extensions. We have enough trouble with providing binary distributions on OS X that match pre-compiled versions of Python. (2) (From what I've read it looks like the latest versions of Python and Tcl/Tk can be compiled on 10.2 too -- makes me wonder why the packagers don't use the 10.2 SDK when compiling ...) From kw at codebykevin.com Wed May 21 19:42:44 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 21 May 2008 13:42:44 -0400 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 In-Reply-To: References: Message-ID: <48345F14.2090308@codebykevin.com> Anthony Kozar wrote: > (1) Another reason that I am hesitant to roll my own Python is that I also > sometimes build Csound packages for distribution, an open-source project > with its own Python extensions. We have enough trouble with providing > binary distributions on OS X that match pre-compiled versions of Python. I'm sympathetic to this, but that's why the option to build from source code exists--so you don't have to be tied to binary distributions. In this case, the platform you are supporting is considered by the community to be obsolete, and no effort is made to support it with current binary packages. Your only option, apparently, is to build from source. Understand, also, that anything you build on 10.2 won't be a universal binary and won't run on Intel except under Rosetta emulation--i.e., much slower. And if it somehow conflicts with a native version (i.e. it's a PPC dylib and the Intel exe is trying to load it), it might crash. > > (2) (From what I've read it looks like the latest versions of Python and > Tcl/Tk can be compiled on 10.2 too -- makes me wonder why the packagers > don't use the 10.2 SDK when compiling ...) Most likely because 10.2 is PPC only, and the standard for binary distributions these days is universal binary (Intel + PPC). It's possible to compile stuff so it runs natively on 10.2 (PPC) and Intel (10.3 +), but it's very complicated--most likely you'd have to use two separate versions of gcc, and then glue things together with the lipo tool. That's too much hassle for most people. You'd also be completely on your own in terms of debugging. The official Mac build of Python from Python.org supports (AFAIK) 10.3.9 and onward, for both PPC and Intel machines. This is built in an efficient manner using Apple's API's, using the standard configure-make-make-install dance, with the appropriate flags (--enable-framework/--enable-universalsdk). Boom, you have a Python that supports three versions of the OS and two processor architectures. That covers, most likely, 95% of the potential use cases for Python. Tcl/Tk can be built to support 10.2 with a universal binary structure, with "weak-linking," but I haven't tested this. When I build Tcl/Tk, I support 10.4 and up as a universal binary. Any reason you have to support 10.2, apart from the fact that it's what your machine runs? The user base for 10.2 is negligible. --Kevin -- -- Kevin Walzer Code by Kevin http://www.codebykevin.com From Chris.Barker at noaa.gov Wed May 21 20:33:09 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 21 May 2008 11:33:09 -0700 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 In-Reply-To: References: Message-ID: <48346AE5.5010709@noaa.gov> Anthony Kozar wrote: > I was really hoping not to have to rebuild all of Python (which I've never > yet done) When I was using 10.2, I used the Apple supplied python. The only issue I remember was that you had to hack a bit to get distutils to built things right, there was a spurious -x86 or something in the makefiles. some googling of the lists from that era should help you find it. I didn't use TkInter at the time, so I can't help there. Also, it may be worth a plea here to see if anyone has an archive of some of that old stuff. I do have the "MacPython-2.3" folder from Applications from my old machine, but no Tkinter. I don't even remember where that stuff got installed back then -- inside usr/lib somewhere? Ah -- I see. I've also got a Library/Python dir -- I think that's what site-packages was linked to. I've got Numeric, wxPython2.5.1.4, readline and waste in there. I'm not sure what Python it when with. No Tkinter though. IIRC, Tk didn't work all that well back then, anyway, do you need to use Tk? (wxPython never worked on OS-9, though). This is an awful lot of work to support a pretty old OS though.... -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From ronaldoussoren at mac.com Wed May 21 22:49:53 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 21 May 2008 22:49:53 +0200 Subject: [Pythonmac-SIG] Trouble installing Tkinter with 2.3.5/10.2 In-Reply-To: References: Message-ID: On 21 May, 2008, at 5:00, Anthony Kozar wrote: > I would also just upgrade my 10.2 machine to a newer > Python but all of the 2.4 and 2.5 binary distributions appear to > require > 10.3. Is this correct? That's correct, they require OSX 10.3.9 or later. There are two major reasons for that: first of all building universal binaries that support OSX 10.2 is much more involved than limiting support to 10.3.9 and later, and furthermore I don't have hardware that's capable of running 10.2 and therefore could not even test such a build if I did create it. You might have success in building a framework for OSX 10.2 from source. I don't think anyone has tried to do that for a while, but I see no reason why that shouldn't work (or could be made to work). Full disclosure: I build the python installers for OSX on www.python.org. > > > So I am wondering what my options are now for cross-platform GUI > development > with Python on 10.2? Can I get Tkinter installed somehow? Would > wxPython > work better? I am hoping for a solution that will be reliable and > easily > installed on Windows, Linux, and OS X. I'd drop support for 10.2. OSX 10.2 is very ancient and Xcode doesn't even ship with an 10.2 SDK these days Ronald From georg.seifert at gmx.de Thu May 22 12:09:54 2008 From: georg.seifert at gmx.de (Georg Seifert) Date: Thu, 22 May 2008 12:09:54 +0200 Subject: [Pythonmac-SIG] embed python in cocoa In-Reply-To: References: <3CDF557D-5593-42A9-B192-FDF78C17E1A0@gmx.de> <8C62197F-F4D1-4DFC-8E58-EEBA8D596995@gmx.de> Message-ID: <88FDE315-3C85-4A4D-9A2A-C8DBE76A486B@gmx.de> Michael, many thanks for you example. I found out, that I do not need to do anything. Because I can just call "NSDocumentController.sharedDocumentController().documents()" and I get what I need. It runs perfectly and out of the box. it is amazing. I need to recheck the pyOjcC bridge docs as it is some time since I used this but that will be easy. Many thanks for your detailed replies. Georg On 22.05.2008, at 05:15, Michael VanLandingham wrote: > Hi Georg, > > I've posted an example app up here: > PythonEmbedExample-ObjectPool > > cobbled together from some other projects where I've done this kind > of thing. A small explanation here: > http://blog.alienoverlord.com/?p=14 > > Hopefully that will give you some ideas on how to accomplish what > you wish to do. The method in the example has limitation/ > drawbacks, but it might be a good start. > > Best Wishes, > Michael > > > On Mon, May 19, 2008 at 6:45 PM, Georg Seifert > wrote: > > It becomes a little trickier if you want your scripts to have access > to instance variables. In that case, you must create a mechanism by > which you can find them (I've used a Singleton pattern for this). > > Can anyone give an example for this? > > Georg > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaharmi at jaharmi.com Thu May 22 16:37:16 2008 From: jaharmi at jaharmi.com (Jeremy Reichman) Date: Thu, 22 May 2008 10:37:16 -0400 Subject: [Pythonmac-SIG] Locale and number formatting Message-ID: I came across the locale module, which looks as if it will do what I want and perform number formatting (with groupings separated by commas) for a report I'm trying to generate. It always seems that there's a module for everything I want to do. I'm seeking output like: '1,234.56' '12,345,678,910,111,213,141,516' However, the default Python 2.5.1 in Leopard is not formatting numbers for me in a script. I've also seen the same results from the shell. For example: $ python -c 'import locale; print locale.getdefaultlocale(); print locale.format("%8.2f", 1234.56, 3)' ('en_US', 'UTF8') 1234.56 $ python -c 'import locale; print locale.getdefaultlocale(); print locale.format("%d", 12345678910111213141516, 3)' ('en_US', 'UTF8') 12345678910111213141516 I've tried this with and without a call to 'locale.setlocale(locale.LC_ALL, "")' as I have seen in some examples. I've seen some indication in the past (post from 2004) that Mac OS X didn't support the C locale APIs fully, but I don't know whether that is still the case or may be an issue here. Is there a way I can get locale to format numbers? Thanks! -- Jeremy From boyle5 at llnl.gov Thu May 22 17:45:30 2008 From: boyle5 at llnl.gov (James Boyle) Date: Thu, 22 May 2008 08:45:30 -0700 Subject: [Pythonmac-SIG] OS X python memory limits ? Message-ID: <8011EAC7-2112-49CE-A914-02DC05E64B75@llnl.gov> OS X 10.4.11 numpy 1.0 python 2.5.1 I have been running some data analyses and getting errors such as the following: python(22768) malloc: *** vm_allocate(size=14778368) failed (error code=3) python(22768) malloc: *** error: can't allocate region python(22768) malloc: *** set a breakpoint in szone_error to debug I have 2GB of memory in my machine, and physically I do not think that I should be running out of space. I vaguely recall some discussion of a hard limit to python memory allocation on OS X due to some operating system idiosyncrasy. I thought that the problem had been addressed in python 2.0 but I could be wrong. Before revamping my code to detect my probable screwup - I thought I would check this out. Thanks for any enlightenment. --Jim From dougfort at dougfort.com Thu May 22 18:06:40 2008 From: dougfort at dougfort.com (Doug Fort, Consulting Programmer) Date: Thu, 22 May 2008 12:06:40 -0400 Subject: [Pythonmac-SIG] py2app access modes Message-ID: <5db086ad0805220906h4461a161ncff1af11e6109576@mail.gmail.com> Hi, We use Py2App to distribute SpiderOak. We're getting complaints from users that when they install the product from an administrator account (which they must do to write to /Applications), they can't run the product from other accounts. Examination shows that the top level .app directory has access mode 755 $ ls -ld /Applications/SpiderOak.app/ drwxr-xr-x 3 dougfort admin 102 Mar 17 10:50 /Applications/SpiderOak.app/ However, lower level directories have access mode 700 $ ls -ld /Applications/SpiderOak.app/Contents/ drwx------ 7 dougfort admin 238 Mar 17 10:50 /Applications/SpiderOak.app/Contents/ When I run chmod -R 755 /Applications/SpiderOak.app/ I can run from the other users. Is there a way we can persuade Py2App, and/or setup to set these access modes? -- Doug Fort, Consulting Programmer http://www.dougfort.com From nad at acm.org Thu May 22 18:54:55 2008 From: nad at acm.org (Ned Deily) Date: Thu, 22 May 2008 09:54:55 -0700 Subject: [Pythonmac-SIG] Locale and number formatting References: Message-ID: In article , Jeremy Reichman wrote: > I came across the locale module, which looks as if it will do what I want > and perform number formatting (with groupings separated by commas) for a > report I'm trying to generate. It always seems that there's a module for > everything I want to do. > > I'm seeking output like: > > '1,234.56' > '12,345,678,910,111,213,141,516' > > However, the default Python 2.5.1 in Leopard is not formatting numbers for > me in a script. I've also seen the same results from the shell. For example: > > $ python -c 'import locale; print locale.getdefaultlocale(); print > locale.format("%8.2f", 1234.56, 3)' > ('en_US', 'UTF8') > 1234.56 > $ python -c 'import locale; print locale.getdefaultlocale(); print > locale.format("%d", 12345678910111213141516, 3)' > ('en_US', 'UTF8') > 12345678910111213141516 > > I've tried this with and without a call to 'locale.setlocale(locale.LC_ALL, > "")' as I have seen in some examples. It looks like you just need to set LC_NUMERIC, as in: Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin >>> import locale >>> print locale.localeconv() {'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, 'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127, 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []} >>> print locale.format("%8.2f", 1234.56, True) 1234.56 >>> locale.setlocale(locale.LC_NUMERIC, 'en_US') 'en_US' >>> print locale.localeconv() {'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, 'frac_digits': 127, 'thousands_sep': ',', 'n_sign_posn': 127, 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': [3, 3, 0]} >>> print locale.format("%8.2f", 1234.56, True) 1,234.56 >>> print locale.format("%8.2f", 1234.56, False) 1234.56 -- Ned Deily, nad at acm.org From georg.seifert at gmx.de Thu May 22 19:48:35 2008 From: georg.seifert at gmx.de (Georg Seifert) Date: Thu, 22 May 2008 19:48:35 +0200 Subject: [Pythonmac-SIG] what object I can assign to sys.stderr Message-ID: hello, with your kind help my project develops very well. I want to redirect the output (stdout and stderr) to a NSTextView. I found out that I can assign a file object to sys.stdout. How does an ObjectC object needs to looks like that I could use it as a "file object"? Thanks in advance Georg From jaharmi at jaharmi.com Fri May 23 04:14:37 2008 From: jaharmi at jaharmi.com (Jeremy Reichman) Date: Thu, 22 May 2008 22:14:37 -0400 Subject: [Pythonmac-SIG] Locale and number formatting In-Reply-To: Message-ID: On 5/22/2008 12:54:55 PM, "Ned Deily" wrote: > In article , > Jeremy Reichman wrote: > >> I came across the locale module, which looks as if it will do what I want >> and perform number formatting (with groupings separated by commas) for a >> report I'm trying to generate. It always seems that there's a module for >> everything I want to do. >> >> I'm seeking output like: >> >> '1,234.56' >> '12,345,678,910,111,213,141,516' >> >> However, the default Python 2.5.1 in Leopard is not formatting numbers for >> me in a script. I've also seen the same results from the shell. For example: >> >> $ python -c 'import locale; print locale.getdefaultlocale(); print >> locale.format("%8.2f", 1234.56, 3)' >> ('en_US', 'UTF8') >> 1234.56 >> $ python -c 'import locale; print locale.getdefaultlocale(); print >> locale.format("%d", 12345678910111213141516, 3)' >> ('en_US', 'UTF8') >> 12345678910111213141516 >> >> I've tried this with and without a call to 'locale.setlocale(locale.LC_ALL, >> "")' as I have seen in some examples. > > It looks like you just need to set LC_NUMERIC, as in: > > Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin >>>> import locale >>>> print locale.localeconv() > {'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, > 'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127, > 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, > 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', > 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], > 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []} >>>> print locale.format("%8.2f", 1234.56, True) > 1234.56 >>>> locale.setlocale(locale.LC_NUMERIC, 'en_US') > 'en_US' >>>> print locale.localeconv() > {'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, > 'frac_digits': 127, 'thousands_sep': ',', 'n_sign_posn': 127, > 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, > 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', > 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], > 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': [3, 3, 0]} >>>> print locale.format("%8.2f", 1234.56, True) > 1,234.56 >>>> print locale.format("%8.2f", 1234.56, False) > 1234.56 I later found that if I set LC_ALL (which I had tried) but specify "en_US" as my locale (which I hadn't), it worked, too. At some point I got an error about the C locale, and that's when I picked "en_US." >>> import locale >>> locale.getlocale() (None, None) >>> locale.format("%d", 12345678910111213141516, True) '12345678910111213141516' >>> locale.setlocale(locale.LC_ALL, "") 'en_US.UTF-8' >>> locale.getlocale() ('en_US', 'UTF8') >>> locale.format("%d", 12345678910111213141516, True) '12,345,678,910,111,213,141,516' >>> locale.setlocale(locale.LC_ALL, "en_US") 'en_US' >>> locale.getlocale() ('en_US', 'ISO8859-1') >>> locale.format("%d", 12345678910111213141516, True) '12,345,678,910,111,213,141,516' >>> locale.format("%8.2f", 1234.56, 3) '1,234.56' So, trying everything again, even the locale.setlocale(locale.LC_ALL, "") call helped, and locale.format() worked as expected afterwards -- but not before. I'm continually astounded by how much is in the standard library. -- Jeremy From jaharmi at jaharmi.com Fri May 23 16:50:49 2008 From: jaharmi at jaharmi.com (Jeremy Reichman) Date: Fri, 23 May 2008 10:50:49 -0400 Subject: [Pythonmac-SIG] Unicode and split Message-ID: I have some characters in line strings in a file I'm processing that appear to be Unicode. (When I print them to the shell from my script, they are Asian characters for files like fonts in the Mac OS X filesystem.) When I run a.split() on the affected line strings, they split on what I'm guessing is considered a Unicode whitespace character. Specifically, the culprit seems to be '\xe1': $ python -c 'print "\xe1"' ? I want to split only only ASCII spaces and tabs, however. Unfortunately, the line strings from the file may be split on space runs and/or tabs -- and I have no control over what was originally written to the source files -- so the defaults for a.split() are otherwise ideal. The split method works on most lines I'm processing perfectly well. I'd rather not have to import the 're' module to split on a regular expression. Does anyone have any suggestions on how to handle this? I'm in Apple's Python 2.5.1 in Leopard, and I'd also like to remain compatible with 2.3.x in Tiger. I'd appreciate advice, thanks! -- Jeremy From Chris.Barker at noaa.gov Fri May 23 18:16:26 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 23 May 2008 09:16:26 -0700 Subject: [Pythonmac-SIG] Unicode and split In-Reply-To: References: Message-ID: <4836EDDA.1010106@noaa.gov> Jeremy Reichman wrote: > I have some characters in line strings in a file I'm processing that appear > to be Unicode. (When I print them to the shell from my script, they are > Asian characters for files like fonts in the Mac OS X filesystem.) > > When I run a.split() on the affected line strings, they split on what I'm > guessing is considered a Unicode whitespace character. Specifically, the > culprit seems to be '\xe1': > > $ python -c 'print "\xe1"' > ? actually, u'xe1' is a lower case accented a: ? (if the unicode comes through email OK), so I doubt that python is splitting on that. Also, when you do the above, you're creating a regular string, not a unicode object. If you do: $ python -c 'print u"\xe1"' ? You may get the right thing, if you're terminal is set up right to display unicode. I suspect your problem is that you aren't decoding the input file correctly. The whole problem with unicode (and indeed, any non-ascii encoding), is that you need to know what encoding your data is, in order to use it. if it looks mostly OK when interpreted as ASCII, then in MIGHT be utf8, so try reading in your file and decoding it this way: contents = myfile.read().decode('utf8') Then do your splitting. If it's not utf8, then you'll need to figure out what it is. First, read this: http://www.joelonsoftware.com/articles/Unicode.html then take a look at some of the python unicode tutorials, this is only one of them: http://www.reportlab.com/i18n/python_unicode_tutorial.html there are other good ones. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From joaoleao at gmx.net Fri May 23 20:30:30 2008 From: joaoleao at gmx.net (=?ISO-8859-1?Q?Jo=E3o_Le=E3o?=) Date: Fri, 23 May 2008 19:30:30 +0100 Subject: [Pythonmac-SIG] Problem with CoreGraphics and py2app Message-ID: Hi I'm running Mac OS X 10.5.2 on a G4 MacBook and I didn't install any addons in what concerns Python. I was happy to see that apple is now including PyObjc and py2app. I tried to build applications with py2app from my old CoreGraphics scripts (made on 10.4 / python2.3) that used to work ok. py2app actually creates the application but when I run it, it unexpectedly quits. The Console spits this: 5/23/08 7:12:19 PM [0x0-0x85085].org.pythonmac.unspecified.Teste[647] Fatal Python error: Interpreter not initialized (version mismatch?) 5/23/08 7:12:36 PM com.apple.launchd[66] ([0x0-0x85085].org.pythonmac.unspecified.Test[647]) Exited abnormally: Abort trap Trying to exclude some error in my script, I tried this with one the Apple supplied examples under /Developer/Examples/Quartz/Python/. I ran py2app with the following "setup.py" (I chose the example "circle.py"): ### from distutils.core import setup import py2app setup( name='Test', app=["circle.py"], ) ### Incidentally, I discovered that my system isn't finding py2applet too: ibook-joao:Desktop joao$ py2applet --make-setup circle.py -bash: py2applet: command not found Finally, py2app seems to work ok with other scripts that don't use CoreGraphics. Thanks. Jo?o From joaoleao at gmx.net Fri May 23 20:39:59 2008 From: joaoleao at gmx.net (=?ISO-8859-1?Q?Jo=E3o_Le=E3o?=) Date: Fri, 23 May 2008 19:39:59 +0100 Subject: [Pythonmac-SIG] Fwd: Problem with CoreGraphics and py2app References: Message-ID: <265732AE-C520-4FDA-9780-CD6D01837FB5@gmx.net> Begin forwarded message: > Hi > > I'm running Mac OS X 10.5.2 on a G4 MacBook and I didn't install any > addons in what concerns Python. > I was happy to see that apple is now including PyObjc and py2app. > > I tried to build applications with py2app from my old CoreGraphics > scripts (made on 10.4 / python2.3) that used to work ok. py2app > actually creates the application but when I run it, it unexpectedly > quits. The Console spits this: Just to clarify. What unexpectedly quits is the application, not py2app. > > 5/23/08 7:12:19 PM > [0x0-0x85085].org.pythonmac.unspecified.Teste[647] Fatal Python > error: Interpreter not initialized (version mismatch?) > 5/23/08 7:12:36 PM com.apple.launchd[66] > ([0x0-0x85085].org.pythonmac.unspecified.Test[647]) Exited > abnormally: Abort trap > > Trying to exclude some error in my script, I tried this with one the > Apple supplied examples under /Developer/Examples/Quartz/Python/. > I ran py2app with the following "setup.py" (I chose the example > "circle.py"): > ### > from distutils.core import setup > import py2app > > setup( > name='Test', > app=["circle.py"], > ) > ### > > Incidentally, I discovered that my system isn't finding py2applet too: > ibook-joao:Desktop joao$ py2applet --make-setup circle.py > -bash: py2applet: command not found > > Finally, py2app seems to work ok with other scripts that don't use > CoreGraphics. > > Thanks. > Jo?o From jaharmi at jaharmi.com Fri May 23 20:52:41 2008 From: jaharmi at jaharmi.com (Jeremy Reichman) Date: Fri, 23 May 2008 14:52:41 -0400 Subject: [Pythonmac-SIG] Unicode and split In-Reply-To: <4836EDDA.1010106@noaa.gov> Message-ID: Thanks to everyone who replied! I'll take a further look into the encoding of the file because I'm interested in that for other reasons. In the output I saw, u"\xe1" (and a few others I found after sending my note) were prevalent around the splits. For the moment, though, I've solved my immediate difficulty by splitting twice. I really only need the space delimited fields that appear after a tab in each line, and the characters causing problems are always before that. I split by tab first and then a normal split of that gets me to the fields I need. -- Jeremy From stringfellow at sucs.org Tue May 27 16:10:48 2008 From: stringfellow at sucs.org (Steve Pike) Date: Tue, 27 May 2008 15:10:48 +0100 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules Message-ID: <37FA30A0-2BEC-40D7-ADEF-7F216906D540@sucs.org> Hello all, I hope this is the right place to ask such a question: I'm building a Python-Cocoa app in XCode 3, and it all works wonderfully except that I use the appscript module... And XCode doesn't include the module in the build. so, 2 things: - I was wondering if there is a way to make it do so - If not, I have been advised to use py2app, but again this seems not to work with the examples given on the site (crucially, it reports unable to load nib file: MainMenu (maybe because this is a xib file?) any help with those two questions would be much appreciated. Regards, Steve From joerg.birkhold at gmail.com Tue May 27 17:14:12 2008 From: joerg.birkhold at gmail.com (=?ISO-8859-1?Q?J=F6rg_Birkhold?=) Date: Tue, 27 May 2008 17:14:12 +0200 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules In-Reply-To: <37FA30A0-2BEC-40D7-ADEF-7F216906D540@sucs.org> References: <37FA30A0-2BEC-40D7-ADEF-7F216906D540@sucs.org> Message-ID: <2966E7C5-4328-434D-AA1D-59CBBA850A38@gmail.com> hi steve, sorry i can't help with your questions... but do you have a good starting point for python-cocoa with leopard? the apple tutorial is out of date and not working anymore :-(. best regards j?rg Am 27.05.2008 um 16:10 schrieb Steve Pike: > Hello all, > I hope this is the right place to ask such a question: > I'm building a Python-Cocoa app in XCode 3, and it all works > wonderfully except that I use the appscript module... And XCode > doesn't include the module in the build. > so, 2 things: > - I was wondering if there is a way to make it do so > - If not, I have been advised to use py2app, but again this seems > not to work with the examples given on the site (crucially, it > reports unable to load nib file: MainMenu (maybe because this is a > xib file?) > > any help with those two questions would be much appreciated. > > Regards, > Steve > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From daniellord at mac.com Tue May 27 19:00:32 2008 From: daniellord at mac.com (Daniel Lord) Date: Tue, 27 May 2008 10:00:32 -0700 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules In-Reply-To: <37FA30A0-2BEC-40D7-ADEF-7F216906D540@sucs.org> References: <37FA30A0-2BEC-40D7-ADEF-7F216906D540@sucs.org> Message-ID: <1C75580D-011A-1000-EF49-03277A1DA791-Webmail-10024@mac.com> On Tuesday, May 27, 2008, at 07:42AM, "Steve Pike" wrote: >Hello all, >I hope this is the right place to ask such a question: >I'm building a Python-Cocoa app in XCode 3, and it all works >wonderfully except that I use the appscript module... And XCode >doesn't include the module in the build. >so, 2 things: >- I was wondering if there is a way to make it do so >- If not, I have been advised to use py2app, but again this seems not >to work with the examples given on the site (crucially, it reports >unable to load nib file: MainMenu (maybe because this is a xib file?) There is an Xcode-users mailing list which might be a better place to ask this question. Not a few Apple people monitor that list so you have a good chance of getting some good leads on a solution. Send Xcode-users mailing list submissions to xcode-users at lists.apple.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.apple.com/mailman/listinfo/xcode-users or, via email, send a message with subject or body 'help' to xcode-users-request at lists.apple.com Daniel From pdorange at mac.com Tue May 27 19:24:39 2008 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Tue, 27 May 2008 19:24:39 +0200 Subject: [Pythonmac-SIG] Troubles with pygame and py2app Message-ID: <3781DDF8-1693-4D37-967A-30E241AF3327@mac.com> I'm new with python/pygame, i found it very nice. But i got a problem to create a bundle mac application I try several options but each build fail with pygame/py2app, event the alien sample setup.py... It fail during graphing a pygame file, here's the last lines in the console : My config : MacOS X 10.4.11 / imac intel Python 2.5.2 pygame 1.8rc5 for python 2.5 pyobjc 1.4 for python 2.5 -------------------------------------------- Graphing /Volumes/Documents/PAD/Dev/PyGame/MicroWar/Source/dist/ MicroWar.app/Contents/Resources/Python/lib-dynload/numpy/random/ mtrand.so (ppc) Graphing /Volumes/Documents/PAD/Dev/PyGame/MicroWar/Source/dist/ MicroWar.app/Contents/Resources/Python/lib-dynload/objc/_objc.so (ppc) Graphing /Volumes/Documents/PAD/Dev/PyGame/MicroWar/Source/dist/ MicroWar.app/Contents/Resources/Python/lib-dynload/pygame/ _numericsndarray.so (ppc) Traceback (most recent call last): File "setup.py", line 26, in setup_requires=["py2app"], File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/py2app/build_app.py", line 389, in run self._run() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/py2app/build_app.py", line 510, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/py2app/build_app.py", line 570, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/py2app/build_app.py", line 672, in create_binaries platfiles = mm.run() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/macholib/MachOStandalone.py", line 101, in run mm.run_file(fn) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/macholib/MachOGraph.py", line 67, in run_file m = MachO(pathname) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/macholib/MachO.py", line 254, in __init__ self.load() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/macholib/MachO.py", line 287, in load self.archs = self.load_fat(fat, fh) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/macholib/MachO.py", line 271, in load_fat archs.append(MachOArch(self.filename, archHeader.offset, endian="<")) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/macholib/MachO.py", line 59, in __init__ self.load(file(filename, "rb")) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/Py2App/macholib/MachO.py", line 92, in load raise ValueError, "Unknown load command: %d" % (cmd_load.cmd,) ValueError: Unknown load command: 27 ----------------------------------------------------------------- At the end, i got an application, but as it fail during building it's incomplete. It only run on my computer. Running on an other (without pygame installed) it fail at launch (can't fin SDL) PS : sorry for my poor english, i'm french -- Pierre-Alain Dorange Blog Citoyen de Cognac Le Retour de l'Autruche -------------- next part -------------- An HTML attachment was scrubbed... URL: From orestis at orestis.gr Tue May 27 23:01:55 2008 From: orestis at orestis.gr (Orestis Markou) Date: Tue, 27 May 2008 22:01:55 +0100 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules In-Reply-To: References: Message-ID: Hey Steve, > I hope this is the right place to ask such a question: you might be better off posting that question to pyobjc-devel (http://pyobjc.sourceforge.net ). > I'm building a Python-Cocoa app in XCode 3, and it all works > wonderfully except that I use the appscript module... And XCode > doesn't include the module in the build. > so, 2 things: > - I was wondering if there is a way to make it do so XCode by default will use the system supplied python. I think if you want to use external modules you have to include them directly in your project. Pyobjc-devel users will know more. > - If not, I have been advised to use py2app, but again this seems > not to work with the examples given on the site (crucially, it > reports unable to load nib file: MainMenu (maybe because this is a > xib file?) That is correct. Xib files have to be compiled to nib files. XCode does that for you, and you can use ibtool from the Terminal to compile it yourself. There is an outstanding issue about py2app about this, it should really invoke it for you. Hope that helped, Orestis -- Orestis Markou orestis at orestis.gr http://orestis.gr/ From hengist.podd at virgin.net Wed May 28 02:48:45 2008 From: hengist.podd at virgin.net (has) Date: Wed, 28 May 2008 01:48:45 +0100 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules In-Reply-To: References: Message-ID: Daniel Lord wrote: > On Tuesday, May 27, 2008, at 07:42AM, "Steve Pike" > wrote: >> Hello all, >> I hope this is the right place to ask such a question: >> I'm building a Python-Cocoa app in XCode 3, and it all works >> wonderfully except that I use the appscript module... And XCode >> doesn't include the module in the build. >> so, 2 things: >> - I was wondering if there is a way to make it do so >> - If not, I have been advised to use py2app, but again this seems not >> to work with the examples given on the site (crucially, it reports >> unable to load nib file: MainMenu (maybe because this is a xib file?) > > There is an Xcode-users mailing list which might be a better place > to ask this question. Xcode-users might be able to advise on its Python application templates; questions on py2app are definitely most appropriate to this list though. I've been trying to field the OP's questions over at , but I'm not the biggest expert on either Xcode or py2app. has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From daniellord at mac.com Wed May 28 05:04:38 2008 From: daniellord at mac.com (Daniel Lord) Date: Tue, 27 May 2008 20:04:38 -0700 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules (Cross posting a reply) In-Reply-To: References: Message-ID: On May 27, 2008, at 14:01 PM, Orestis Markou wrote: > Hey Steve, > >> I hope this is the right place to ask such a question: FYI, Bill B replied on the Xcode list with pretty much the same advice I gave for those of you who want to know: ---------- Forwarded message ---------- From: Bill Bumgarner To: Steve Pike Date: Tue, 27 May 2008 13:23:58 -0700 Subject: Re: Python-Cocoa include external modules? On May 27, 2008, at 11:42 AM, Steve Pike wrote: Hello all, I'm building a Python-Cocoa app in XCode 3, and it all works wonderfully except that I use the appscript module... And XCode doesn't include the module in the build. So I was wondering if there is a way to make it do so - can it incorporate egg files for example? py2app can handle this automatically, but there are other issues with it right now. If it is just one or two modules, then add a "copy files" build phase to your project that copies the module into the appropriate spot within your application. b.bum -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniellord at mac.com Wed May 28 04:58:42 2008 From: daniellord at mac.com (Daniel Lord) Date: Tue, 27 May 2008 19:58:42 -0700 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules In-Reply-To: References: Message-ID: <9AABB3D5-9E88-429C-90DF-C5FA169D1FAB@mac.com> On May 27, 2008, at 14:01 PM, Orestis Markou wrote: > XCode by default will use the system supplied python. I think if you > want to use external modules you have to include them directly in > your project. Pyobjc-devel users will know more. I sent Steve to the Xcode group for a reason: There are two camps IMHO for PyObjC development: 1) Xcode-Interface Builder and 2) Interface Builder - text editor - py2app He asked the question in a way that placed him in the first camp in my mind. Using Xcode and using Xcode is quite different from just using Interface Builder and py2app alone. I have abandoned Xcode itself for PyObjC because most of its great features are useless with PyObjC (like debugging) but to each his own. To the point: Xcode makes it pretty simple to add build phases to a target and one of the standard default phases is a file-copy phase which you could add to copy each resource you need (like an egg or other file). You can also add shell (or perl, python ruby) scripts as well to make pretty sophisticated builds and even save those as templates. The Xcode group would be best for advice for complex builds. If Orestis is right that adding the resources to the project auto-copies them, then that's great--haven't tried it myself--I thought that only happened for standard resources Xcode knew about. Apple has an example of using shell scripts to build a universal build of OpenSSL mostly using configure, make, and lipo via shell scripting. There are quite a few environment variables you can use which are documented in the Xcode 3.0 User Guide. From orestis at orestis.gr Wed May 28 10:14:21 2008 From: orestis at orestis.gr (Orestis Markou) Date: Wed, 28 May 2008 09:14:21 +0100 Subject: [Pythonmac-SIG] Python-Cocoa with XCode 3 - external modules In-Reply-To: <9AABB3D5-9E88-429C-90DF-C5FA169D1FAB@mac.com> References: <9AABB3D5-9E88-429C-90DF-C5FA169D1FAB@mac.com> Message-ID: <48E9A101-E621-4276-AF45-D5CD5BE194AE@orestis.gr> Thanks Daniel, I haven't used XCode that extensively myself, I will subscribe to the XCode list. For simple projects I've found XCode to be very easy to use, it's good to know it supports complex behviours too. Regards, -- Orestis Markou orestis at orestis.gr http://orestis.gr/ On 28 ??? 2008, at 3:58 ??, Daniel Lord wrote: > > On May 27, 2008, at 14:01 PM, Orestis Markou wrote: > >> XCode by default will use the system supplied python. I think if >> you want to use external modules you have to include them directly >> in your project. Pyobjc-devel users will know more. > > > I sent Steve to the Xcode group for a reason: > > There are two camps IMHO for PyObjC development: 1) Xcode-Interface > Builder and 2) Interface Builder - text editor - py2app > He asked the question in a way that placed him in the first camp in > my mind. > > Using Xcode and using Xcode is quite different from just using > Interface Builder and py2app alone. I have abandoned Xcode itself > for PyObjC because most of its great features are useless with > PyObjC (like debugging) but to each his own. > > To the point: Xcode makes it pretty simple to add build phases to a > target and one of the standard default phases is a file-copy phase > which you could add to copy each resource you need (like an egg or > other file). You can also add shell (or perl, python ruby) scripts > as well to make pretty sophisticated builds and even save those as > templates. The Xcode group would be best for advice for complex > builds. If Orestis is right that adding the resources to the > project auto-copies them, then that's great--haven't tried it > myself--I thought that only happened for standard resources Xcode > knew about. Apple has an example of using shell scripts to build a > universal build of OpenSSL mostly using configure, make, and lipo > via shell scripting. There are quite a few environment variables you > can use which are documented in the Xcode 3.0 User Guide. From Jack.Jansen at cwi.nl Wed May 28 23:03:44 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed, 28 May 2008 23:03:44 +0200 Subject: [Pythonmac-SIG] Is there still a good reason for separate macpython and pyobjc mailing lists? Message-ID: Now that pyobjc is a first-class citizen of MacPython, is there any reason to maintain two mailing lists? Are there any people who are on one of the lists and not the other? -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Chris.Barker at noaa.gov Thu May 29 00:50:22 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 28 May 2008 15:50:22 -0700 Subject: [Pythonmac-SIG] Is there still a good reason for separate macpython and pyobjc mailing lists? In-Reply-To: References: Message-ID: <483DE1AE.6050907@noaa.gov> Jack Jansen wrote: > Now that pyobjc is a first-class citizen of MacPython, is there any > reason to maintain two mailing lists? Are there any people who are on > one of the lists and not the other? yup -- I never touch pyObjC. However, I have no issue with sharing a list, unless there is a HUGE amount of PyObjC traffic! -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From garyrob at mac.com Thu May 29 13:53:41 2008 From: garyrob at mac.com (Gary Robinson) Date: Thu, 29 May 2008 07:53:41 -0400 Subject: [Pythonmac-SIG] shed skin vs macpython 2.5.2 Message-ID: <20080529075341538558.a829a1e0@mac.com> Hello, I recently started using Shed Skin, which is a Python-to-C++ compiler. It works great. On the functions I converted, I got an 18X speedup. However, at the time I did that work I was running the Python Apple supplies with Leopard. Last week I installed MacPython 2.5.2. Now, whenever I try to load a Shed Skin-generated module I immediately get Traceback (most recent call last): File "", line 1, in SystemError: dynamic module not initialized properly However, i can still run it under the Apple python just fine, by invoking usr/bin/python. I asked about this on the Shed Skin mail list and haven't gotten a response yet. Thought I'd ask about it here just in case anyone has an idea. Thanks, Gary -- Gary Robinson CTO Emergent Music, LLC personal email: garyrob at mac.com work email: grobinson at emergentmusic.com Company: http://www.emergentmusic.com Blog: http://www.garyrobinson.net From ronaldoussoren at mac.com Thu May 29 15:54:34 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 29 May 2008 15:54:34 +0200 Subject: [Pythonmac-SIG] [Pyobjc-dev] Is there still a good reason for separate macpython and pyobjc mailing lists? In-Reply-To: References: Message-ID: <4F5BDC5D-D1A1-4FD4-ADAD-12895C3C904F@mac.com> On 28 May, 2008, at 23:03, Jack Jansen wrote: > Now that pyobjc is a first-class citizen of MacPython, is there any > reason to maintain two mailing lists? Are there any people who are on > one of the lists and not the other? I'm on both lists and wouldn't mind closing down the pyobjc-dev list. There is much traffic on the pyobjc-dev list, and therefore little chance that other topics get hidden in pyobjc-related traffic. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From lydaque at yahoo.com Thu May 29 17:25:47 2008 From: lydaque at yahoo.com (Georg) Date: Thu, 29 May 2008 08:25:47 -0700 (PDT) Subject: [Pythonmac-SIG] (no subject) Message-ID: <296607.88819.qm@web52104.mail.re2.yahoo.com> Hello, I'm running Python under OS X 10.4 on a MacPro, and I'm running up against the limitations of a 32 bit address space (i.e., I can't use more than 4gb of space). I have 64 bit processors in my machine -- will upgrading to Leopard allow Python to use a 64 bit address space? sorry if this seems like a dumb/naive question, but I can't for the life of me figure this out by googling around. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From hengist.podd at virgin.net Thu May 29 17:36:20 2008 From: hengist.podd at virgin.net (has) Date: Thu, 29 May 2008 16:36:20 +0100 Subject: [Pythonmac-SIG] Is there still a good reason for separate macpython and pyobjc mailing lists? In-Reply-To: References: Message-ID: <2BFD93B2-2186-4F8D-A51A-9F2A1818F35D@virgin.net> Jack Jansen wrote: > Now that pyobjc is a first-class citizen of MacPython, is there any > reason to maintain two mailing lists? Are there any people who are > on one of the lists and not the other? +1 for combining them into a single list. I'm not on the PyObjC list, but only because I've not had much need to ask PyObjC-related questions to date. Neither list is high traffic so consolidating them into a single mailing list wouldn't be a problem. Doing so would reduce fragmentation of available resources, and provide OS X users with a clear, one-stop destination for obtaining Python-related help. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From nathan.stocks at gmail.com Thu May 29 17:53:55 2008 From: nathan.stocks at gmail.com (Nathan) Date: Thu, 29 May 2008 09:53:55 -0600 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: <296607.88819.qm@web52104.mail.re2.yahoo.com> References: <296607.88819.qm@web52104.mail.re2.yahoo.com> Message-ID: <96c9d6a80805290853p7e5a172eg7fab5cd4eda39d3b@mail.gmail.com> On Thu, May 29, 2008 at 9:25 AM, Georg wrote: > > Hello, > > I'm running Python under OS X 10.4 on a MacPro, and I'm running up against > the limitations of a 32 bit address space (i.e., I can't use more than 4gb > of space). I have 64 bit processors in my machine -- will upgrading to > Leopard allow Python to use a 64 bit address space? > > sorry if this seems like a dumb/naive question, but I can't for the life of > me figure this out by googling around. I don't know the answer exactly, but the maxint on my C2D MBPro running Leopard seems 32-bit-ish: $ python Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.maxint 2147483647 ...whereas my 64-bit Gentoo linux box seems more 64-bit-ish: # python Python 2.4.4 (#1, Dec 12 2007, 10:10:30) [GCC 4.1.2 (Gentoo 4.1.2 p1.0.1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.maxint 9223372036854775807 ~ Nathan From orestis at orestis.gr Thu May 29 19:44:01 2008 From: orestis at orestis.gr (Orestis Markou) Date: Thu, 29 May 2008 18:44:01 +0100 Subject: [Pythonmac-SIG] [Pyobjc-dev] Is there still a good reason for separate macpython and pyobjc mailing lists? In-Reply-To: <4F5BDC5D-D1A1-4FD4-ADAD-12895C3C904F@mac.com> References: <4F5BDC5D-D1A1-4FD4-ADAD-12895C3C904F@mac.com> Message-ID: Surely you mean there ISN'T much traffic on the pyobjc-dev? On Thu, May 29, 2008 at 2:54 PM, Ronald Oussoren wrote: > > On 28 May, 2008, at 23:03, Jack Jansen wrote: > > Now that pyobjc is a first-class citizen of MacPython, is there any >> reason to maintain two mailing lists? Are there any people who are on >> one of the lists and not the other? >> > > I'm on both lists and wouldn't mind closing down the pyobjc-dev list. > There is much traffic on the pyobjc-dev list, and therefore little chance > that other topics get hidden in pyobjc-related traffic. > > Ronald > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyobjc-dev mailing list > Pyobjc-dev at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > -- Orestis Markou orestis at orestis.gr http://orestis.gr -------------- next part -------------- An HTML attachment was scrubbed... URL: From lydaque at yahoo.com Thu May 29 22:18:58 2008 From: lydaque at yahoo.com (Georg) Date: Thu, 29 May 2008 13:18:58 -0700 (PDT) Subject: [Pythonmac-SIG] (no subject) Message-ID: <302611.62100.qm@web52111.mail.re2.yahoo.com> Thanks for the responses, I am trying to build a data structure in Python which exceeds 4GB in size (I have 10GB of RAM) and python exits with the following error when it hits 4GB: Python(23121) malloc: *** vm_allocate(size=262144) failed (error code=3) Python(23121) malloc: *** error: can't allocate region Python(23121) malloc: *** set a breakpoint in szone_error to debug My hope is that Leopard ships with a 64-bit version of Python, so that I can at least fill up the 10GB of RAM that I have. Thanks! ----- Original Message ---- From: Conrad Taylor To: Georg Sent: Thursday, May 29, 2008 11:14:17 AM Subject: Re: [Pythonmac-SIG] (no subject) You'll need to upgrade to Leopard as a first step. Could you post the detail issues that you're seeing? Do you have code that I can run to reproduce the issue? -Conrad Sent from my iPhone On May 29, 2008, at 8:25 AM, Georg wrote: Hello, I'm running Python under OS X 10.4 on a MacPro, and I'm running up against the limitations of a 32 bit address space (i.e., I can't use more than 4gb of space). I have 64 bit processors in my machine -- will upgrading to Leopard allow Python to use a 64 bit address space? sorry if this seems like a dumb/naive question, but I can't for the life of me figure this out by googling around. Thanks _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG at python.org http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: From larry.meyn at nasa.gov Thu May 29 22:45:56 2008 From: larry.meyn at nasa.gov (Larry Meyn) Date: Thu, 29 May 2008 13:45:56 -0700 Subject: [Pythonmac-SIG] Strange python behavior after upgrading to OS X 10.5.3 In-Reply-To: <302611.62100.qm@web52111.mail.re2.yahoo.com> Message-ID: I?ve been successfully using parallel python with a framework build of python 2.5.2 on an 8-core Mac Pro. After upgrading to OS X 10.5.3 yesterday my program quit working and the traceback indicated that it failed within PIL. However, my code does not import PIL and I don?t believe that parallel python uses it either. I removed PIL from the site-packages and the program failed within a different module. As I didn?t really have time to try and further diagnose the problem, I decided do a Time Machine restore from immediately before the 10.5.3 upgrade. This resolved the problem. I?m not totally sure that 10.5.3 was the source of the problem and I realize that I?m not providing enough detail for others to diagnose the problem if 10.5.3 was the source, but I thought some people might appreciate a heads up that upgrading to 10.5.3 might cause problems. Larry -------------- next part -------------- An HTML attachment was scrubbed... URL: From bwaters at nrao.edu Thu May 29 23:15:43 2008 From: bwaters at nrao.edu (Boyd Waters) Date: Thu, 29 May 2008 15:15:43 -0600 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: <302611.62100.qm@web52111.mail.re2.yahoo.com> References: <302611.62100.qm@web52111.mail.re2.yahoo.com> Message-ID: <2891371D-C5F6-496F-AE5C-81B7A9E2E3AF@nrao.edu> On May 29, 2008, at 2:18 PM, Georg wrote: > My hope is that Leopard ships with a 64-bit version of Python, so > that I can at least fill up the 10GB of RAM that I have. Nope... because Tcl/Tk isn't 64-bit! But I've got a MacPorts port that builds a quad-architecture Python. I wonder if that would work for you... $ file /usr/bin/python /usr/bin/python: Mach-O universal binary with 2 architectures /usr/bin/python (for architecture ppc7400): Mach-O executable ppc /usr/bin/python (for architecture i386): Mach-O executable i386 $ file $(which python) /opt/casa/core2-apple-darwin9/3rd-party/bin/python: Mach-O universal binary with 4 architectures /opt/casa/core2-apple-darwin9/3rd-party/bin/python (for architecture i386): Mach-O executable i386 /opt/casa/core2-apple-darwin9/3rd-party/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /opt/casa/core2-apple-darwin9/3rd-party/bin/python (for architecture ppc7400): Mach-O executable ppc /opt/casa/core2-apple-darwin9/3rd-party/bin/python (for architecture ppc64): Mach-O 64-bit executable ppc64 From schimaf at boulder.nist.gov Thu May 29 22:53:51 2008 From: schimaf at boulder.nist.gov (Frank Schima) Date: Thu, 29 May 2008 14:53:51 -0600 Subject: [Pythonmac-SIG] (no subject) In-Reply-To: <302611.62100.qm@web52111.mail.re2.yahoo.com> References: <302611.62100.qm@web52111.mail.re2.yahoo.com> Message-ID: On May 29, 2008, at 2:18 PM, Georg wrote: > I am trying to build a data structure in Python which exceeds 4GB in > size (I have 10GB of RAM) and python exits with the following error > when it hits 4GB: > > Python(23121) malloc: *** vm_allocate(size=262144) failed (error > code=3) > Python(23121) malloc: *** error: can't allocate region > Python(23121) malloc: *** set a breakpoint in szone_error to debug > > My hope is that Leopard ships with a 64-bit version of Python, so > that I can at least fill up the 10GB of RAM that I have. I have the latest Mac Pro with 10.5.3. I ran the sys.maxint test and got the 32-bit result. I tried both the Apple python and the MacPorts python 2.5.2. Cheers! Frank Schima Boulder, CO schimaf at boulder.nist.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: From schimaf at boulder.nist.gov Fri May 30 01:02:22 2008 From: schimaf at boulder.nist.gov (Frank Schima) Date: Thu, 29 May 2008 17:02:22 -0600 Subject: [Pythonmac-SIG] 64-bit Python? In-Reply-To: References: <302611.62100.qm@web52111.mail.re2.yahoo.com> Message-ID: <9CFB46B3-F45B-4254-80DD-861B4D19E240@boulder.nist.gov> On May 29, 2008, at 4:13 PM, Boyd Waters wrote: > > On May 29, 2008, at 2:53 PM, Frank Schima wrote: > >> I have the latest Mac Pro with 10.5.3. I ran the sys.maxint test >> and got the 32-bit result. I tried both the Apple python and the >> MacPorts python 2.5.2. > > > The MacPorts 2.5.2 doesn't have my 64-bit hacks in it. I'm not sure > what the consequences of 64-bit Python will be with respect to other > Python packages, so I haven't committed the changes. And I ran into > a problem compiling this on Tiger with GNU (non-Apple-patched) GCC > 4.2.1. > > But it's really 64-bit Python here, I think: > > $ /usr/bin/python -c 'import sys; print sys.maxint' > 2147483647 > > $ /opt/casa/core2-apple-darwin9/3rd-party/bin/python -c 'import sys; > print sys.maxint' > 9223372036854775807 > > > Here's the MacPorts port: > > That's awesome. I, for one, will give it a try. Thanks for sharing! Frank Schima Boulder, CO schimaf at boulder.nist.gov From ronaldoussoren at mac.com Fri May 30 07:55:57 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 30 May 2008 07:55:57 +0200 Subject: [Pythonmac-SIG] [Pyobjc-dev] Is there still a good reason for separate macpython and pyobjc mailing lists? In-Reply-To: References: <4F5BDC5D-D1A1-4FD4-ADAD-12895C3C904F@mac.com> Message-ID: <55884BB7-4604-4B73-96E9-1A1330301359@mac.com> Oops. Right, I meant 'not much traffic', the "not" got removed while editing :-( Ronald On 29 May, 2008, at 19:44, Orestis Markou wrote: > Surely you mean there ISN'T much traffic on the pyobjc-dev? > > On Thu, May 29, 2008 at 2:54 PM, Ronald Oussoren > wrote: > > On 28 May, 2008, at 23:03, Jack Jansen wrote: > > Now that pyobjc is a first-class citizen of MacPython, is there any > reason to maintain two mailing lists? Are there any people who are on > one of the lists and not the other? > > I'm on both lists and wouldn't mind closing down the pyobjc-dev > list. There is much traffic on the pyobjc-dev list, and therefore > little chance that other topics get hidden in pyobjc-related traffic. > > Ronald > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyobjc-dev mailing list > Pyobjc-dev at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > > > -- > Orestis Markou > orestis at orestis.gr > http://orestis.gr -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From anand.prabhakar.patil at gmail.com Fri May 30 09:10:39 2008 From: anand.prabhakar.patil at gmail.com (Anand Patil) Date: Fri, 30 May 2008 08:10:39 +0100 Subject: [Pythonmac-SIG] MACOSX_DEPLOYMENT_TARGET with Leopard system Python Message-ID: <2bc7a5a50805300010r185940daie74fa1c73c1c8274@mail.gmail.com> Hi all, This languished on comp.lang.python, sorry about the cross-post. I'm getting the following error: distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure on Leopard using system Python when trying to compile some third-party modules but not others. I've set MACOSX_DEPLOYMENT_TARGET to 10.5 to no avail. It looks like lots of people have seen similar problems, but the fixes seem to involve running configure, which means a new Python build. Is it possible to fix the problem and still use the system Python? Thanks, Anand Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From anand.prabhakar.patil at gmail.com Fri May 30 11:00:36 2008 From: anand.prabhakar.patil at gmail.com (Anand Patil) Date: Fri, 30 May 2008 10:00:36 +0100 Subject: [Pythonmac-SIG] MACOSX_DEPLOYMENT_TARGET with Leopard system Python In-Reply-To: <2bc7a5a50805300010r185940daie74fa1c73c1c8274@mail.gmail.com> References: <2bc7a5a50805300010r185940daie74fa1c73c1c8274@mail.gmail.com> Message-ID: <2bc7a5a50805300200y1aa71067n2108d2ead7674de9@mail.gmail.com> On Fri, May 30, 2008 at 8:10 AM, Anand Patil < anand.prabhakar.patil at gmail.com> wrote: > Hi all, > This languished on comp.lang.python, sorry about the cross-post. I'm > getting the following error: > > distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET > mismatch: now "10.3" but "10.5" during configure > > on Leopard using system Python when trying to compile some third-party > modules but not others. I've set MACOSX_DEPLOYMENT_TARGET to 10.5 to no > avail. It looks like lots of people have seen similar problems, but the > fixes seem to involve running configure, which means a new Python build. Is > it possible to fix the problem and still use the system Python? > > Thanks, > Anand Patil > Just to check, I downloaded the Python.org 2.5.2 distribution. Now when I try to compile numpy I get the following. It works with gcc 4.0 but not gcc 4.2... but I need to use gcc 4.2 later on, so I want to get Python to play nicely with it. How can I do that? Thanks, Anand sihpc03:numpy anand$ python setup.py build Running from numpy source directory. non-existing path in 'numpy/distutils': 'site.cfg' F2PY Version 2_5245 blas_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers'] lapack_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3'] running build running scons customize UnixCCompiler Found executable /usr/bin/gcc customize NAGFCompiler Could not locate executable f95 customize AbsoftFCompiler Could not locate executable f90 Could not locate executable f77 customize IBMFCompiler Could not locate executable xlf90 Could not locate executable xlf customize IntelFCompiler Could not locate executable ifort Could not locate executable ifc customize GnuFCompiler Could not locate executable g77 customize Gnu95FCompiler Found executable /usr/local/bin/gfortran customize Gnu95FCompiler customize UnixCCompiler customize UnixCCompiler using scons running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src building py_modules sources creating build creating build/src.macosx-10.3-i386-2.5 creating build/src.macosx-10.3-i386-2.5/numpy creating build/src.macosx-10.3-i386-2.5/numpy/distutils building extension "numpy.core.multiarray" sources creating build/src.macosx-10.3-i386-2.5/numpy/core Generating build/src.macosx-10.3-i386-2.5/numpy/core/config.h customize NAGFCompiler customize AbsoftFCompiler customize IBMFCompiler customize IntelFCompiler customize GnuFCompiler customize Gnu95FCompiler customize Gnu95FCompiler customize Gnu95FCompiler using config C compiler: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 compile options: '-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -Inumpy/core/src -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c' gcc: _configtest.c powerpc-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" i686-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" lipo: can't figure out the architecture type of: /var/folders/y4/y4M-NZ0GELKlXr2RyIgYgU+++TI/-Tmp-//ccwKb2oD.out powerpc-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" i686-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" lipo: can't figure out the architecture type of: /var/folders/y4/y4M-NZ0GELKlXr2RyIgYgU+++TI/-Tmp-//ccwKb2oD.out failure. removing: _configtest.c _configtest.o Traceback (most recent call last): File "setup.py", line 96, in setup_package() File "setup.py", line 89, in setup_package configuration=configuration ) File "/Users/anand/working copies/numpy/numpy/distutils/core.py", line 184, in setup return old_setup(**new_attr) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/Users/anand/working copies/numpy/numpy/distutils/command/build.py", line 40, in run old_build.run(self) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/build.py", line 112, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 130, in run self.build_sources() File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 147, in build_sources self.build_extension_sources(ext) File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 250, in build_extension_sources sources = self.generate_sources(sources, ext) File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 307, in generate_sources source = func(extension, build_dir) File "numpy/core/setup.py", line 83, in generate_config_h raise SystemError,"Failed to test configuration. "\ SystemError: Failed to test configuration. See previous error messages for more information. sihpc03:numpy anand$ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Larry.Meyn at nasa.gov Fri May 30 16:59:48 2008 From: Larry.Meyn at nasa.gov (Larry Meyn) Date: Fri, 30 May 2008 07:59:48 -0700 Subject: [Pythonmac-SIG] Strange python behavior after upgrading to OS X 10.5.3 In-Reply-To: References: Message-ID: <917629CA-D531-4403-93AD-A2A3F8C6483E@nasa.gov> I had the same problem on another Mac just upgraded to 10.5.3 from 10.5.2. This time the traceback was a little more helpful and the error occurred after opening a .pyc file. The solution was to delete all the .pyc files used and the newly regenerated ones worked fine. Larry On May 29, 2008, at 1:45 PM, Larry Meyn wrote: > I?ve been successfully using parallel python with a framework build > of python 2.5.2 on an 8-core Mac Pro. After upgrading to OS X > 10.5.3 yesterday my program quit working and the traceback indicated > that it failed within PIL. However, my code does not import PIL and > I don?t believe that parallel python uses it either. I removed PIL > from the site-packages and the program failed within a different > module. As I didn?t really have time to try and further diagnose > the problem, I decided do a Time Machine restore from immediately > before the 10.5.3 upgrade. This resolved the problem. I?m not > totally sure that 10.5.3 was the source of the problem and I realize > that I?m not providing enough detail for others to diagnose the > problem if 10.5.3 was the source, but I thought some people might > appreciate a heads up that upgrading to 10.5.3 might cause problems. > > Larry -------------- next part -------------- An HTML attachment was scrubbed... URL: From bwaters at nrao.edu Fri May 30 00:13:39 2008 From: bwaters at nrao.edu (Boyd Waters) Date: Thu, 29 May 2008 16:13:39 -0600 Subject: [Pythonmac-SIG] 64-bit Python? In-Reply-To: References: <302611.62100.qm@web52111.mail.re2.yahoo.com> Message-ID: On May 29, 2008, at 2:53 PM, Frank Schima wrote: > I have the latest Mac Pro with 10.5.3. I ran the sys.maxint test and > got the 32-bit result. I tried both the Apple python and the > MacPorts python 2.5.2. The MacPorts 2.5.2 doesn't have my 64-bit hacks in it. I'm not sure what the consequences of 64-bit Python will be with respect to other Python packages, so I haven't committed the changes. And I ran into a problem compiling this on Tiger with GNU (non-Apple-patched) GCC 4.2.1. But it's really 64-bit Python here, I think: $ /usr/bin/python -c 'import sys; print sys.maxint' 2147483647 $ /opt/casa/core2-apple-darwin9/3rd-party/bin/python -c 'import sys; print sys.maxint' 9223372036854775807 Here's the MacPorts port: -------------- next part -------------- A non-text attachment was scrubbed... Name: python25.tbz Type: application/octet-stream Size: 47056 bytes Desc: not available URL: -------------- next part -------------- You might unpack this thing into your MacPorts tree like this: tar xjvf ~/Downloads/python25.tbz -C $(port dir python25)/.. and then do a port update python25 ... but I haven't tested that path. I can post a binary on a web site if anyone is interested in testing this; it's a quad-architecture Framework build. Be careful out there... - boyd Boyd Waters Scientific Programmer National Radio Astronomy Observatory Socorro, New Mexico