From r_e_h at mac.com Mon Mar 2 20:04:43 2009 From: r_e_h at mac.com (REH) Date: Mon, 02 Mar 2009 14:04:43 -0500 Subject: [Pythonmac-SIG] Macintosh Native Python Install Message-ID: Hello All, Using the Mac Leopard NATIVE installation of the Python 2.5 interpreter, called out of the Terminal UNIX command line (i.e. NOT through the X-code machinery), is it possible to pipe or pass in a text file containing Python code? Or is this literally a type-as-you- go-only interpreter? Alternative 1: Is there a SIMPLE was to use the X-code framework to create a command-line type program, without all the GUI machinery? Alternative 2: If Python.org distributions are the best way to go, any recommendations on 2.5 vs. 2.6 vs. 3.x? I saw somewhere on the website that 2.6 was crashing on Macs. Thanks in advance for any help... Richard From dave.opstad at monotypeimaging.com Mon Mar 2 21:12:34 2009 From: dave.opstad at monotypeimaging.com (Dave Opstad) Date: Mon, 02 Mar 2009 12:12:34 -0800 Subject: [Pythonmac-SIG] Macintosh Native Python Install In-Reply-To: Message-ID: REH wrote: > Hello All, > > Using the Mac Leopard NATIVE installation of the Python 2.5 > interpreter, called out of the Terminal UNIX command line (i.e. NOT > through the X-code machinery), is it possible to pipe or pass in a > text file containing Python code? Or is this literally a type-as-you- > go-only interpreter? You can certainly pipe to python on Mac OS X: $ echo "print 'Hi there!'" | python Hi there! Or were you referring to something more elaborate? Dave From Chris.Barker at noaa.gov Mon Mar 2 21:21:35 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 02 Mar 2009 12:21:35 -0800 Subject: [Pythonmac-SIG] Macintosh Native Python Install In-Reply-To: References: Message-ID: <49AC3FCF.7070809@noaa.gov> REH wrote: > Using the Mac Leopard NATIVE installation of the Python 2.5 interpreter, > called out of the Terminal UNIX command line (i.e. NOT through the > X-code machinery), is it possible to pipe or pass in a text file > containing Python code? the Apple one is a normal old python install -- just a particular version, so you can do all the same things with it. > Or is this literally a type-as-you-go-only interpreter? Of course not: python NameOfScript.py will run the script. python -c "print 'something' " will run python code directly. or you can put a #! line at the top of your main python file: #!/usr/bin/env python and make it executable: chmod a+x ThePythonFile.py and you can just run it: ./ThePythonFile.py > Alternative 2: If Python.org distributions are the best way to go, they aren't any different in that sense, but you do get Unversal support and newer version, and more packages have binaries built for them. > recommendations on 2.5 very robust, stable and well supported by external packages vs. 2.6 Almost as godo, but I think there are still some external packages not supported (is there a binary PIL anywhere, for instance?) > vs. 3.x? Still pretty new -- it's probably robust, but there are many fewer external packages supported. -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 janssen at parc.com Wed Mar 4 04:55:48 2009 From: janssen at parc.com (Bill Janssen) Date: Tue, 3 Mar 2009 19:55:48 PST Subject: [Pythonmac-SIG] appscript path issue Message-ID: <44413.1236138948@parc.com> I'm trying to write this scrap of Applescript in Python appscript: on run tell application "Microsoft PowerPoint" set this_item to path of active presentation end tell set unix_item to POSIX path of this_item display dialog of unix_item end run which yields "/tilde/janssen/Documents", an NFS-mounted location. I've got this: from appscript import * from mactypes import * print File.makewithhfspath(app("Microsoft PowerPoint").active_presentation.path()).path However, in this case, I get "/janssen/Documents", which is wrong. So, how do I get the effect of "POSIX path of" in appscriptpt? This is appscript 0.19.0 on 10.5.6, with /usr/bin/python. Bill From janssen at parc.com Wed Mar 4 21:56:50 2009 From: janssen at parc.com (Bill Janssen) Date: Wed, 4 Mar 2009 12:56:50 PST Subject: [Pythonmac-SIG] appscript path issue In-Reply-To: <44413.1236138948@parc.com> References: <44413.1236138948@parc.com> Message-ID: <55018.1236200210@parc.com> Bill Janssen wrote: > I'm trying to write this scrap of Applescript in Python appscript: > > on run > tell application "Microsoft PowerPoint" > set this_item to path of active presentation > end tell > set unix_item to POSIX path of this_item > display dialog of unix_item > end run > > which yields "/tilde/janssen/Documents", an NFS-mounted location. > > I've got this: > > from appscript import * > from mactypes import * > print File.makewithhfspath(app("Microsoft PowerPoint").active_presentation.path()).path > > However, in this case, I get "/janssen/Documents", which is wrong. > > So, how do I get the effect of "POSIX path of" in appscriptpt? > > This is appscript 0.19.0 on 10.5.6, with /usr/bin/python. And osascript seems to get this right, too: % osascript -e 'POSIX path of "janssen:Documents"' /tilde/janssen/Documents % Bill From traversos at gmail.com Wed Mar 4 20:08:00 2009 From: traversos at gmail.com (Dario Traverso) Date: Wed, 4 Mar 2009 14:08:00 -0500 Subject: [Pythonmac-SIG] Pyobjc ---- XCode development help ----- NSInternalInconsistencyException Message-ID: Greetings, I'm currently running into some confusing issues developing a pyobjc application on Apple's MacOS 10.5 Leopard platform. I've tried emailing Apple's developer mailing lists to no avail thus far, and was hoping someone here might have some suggestions? My problem is as follows: I'm writing a simple image filter application, that denoises an image. I've using two python libraries: Python Image Library - http://www.pythonware.com/products/pil/ Python Wavelet Library - http://wavelets.scipy.org/moin/ They both install and function correctly. When I call my denoise.py module from the command line, it correctly denoises and displays the image @ the specified file path. So I know, that strictly as a python module, it works. However, when I build a pyobjc application in XCode (Apple's IDE) and integrate my previously functioning python module into it with a simple GUI, I run into problems building the pyobjc app. XCode states an unchecked exception NSInternalInconsistencyException, which is defined by Apple as: NSInternalInconsistencyException Name of an exception that occurs when an internal assertion fails and implies an unexpected condition within the called code. Available in Mac OS X v10.0 and later. Declared in NSException.h. So, not exactly a very helpful or specific exception. Specifically, it is complaining about when I import the denoise.py module I created, which works perfectly outside of XCode. I've gone through it line-by- line, and am now convinced that it is unlikely the issue is within the module itself. I think there is some sort of python language configuration issue going on. I'm using my new MacBookPro, with Leopard 10.5 and it came with Python, pyobjc, Xcode, etc. Confusing why it would work from terminal, but not Xcode, aren't they using the same build of Python, the one that came with my Mac? Thank you for any assistance / insight you can provide! -------------- next part -------------- An HTML attachment was scrubbed... URL: From hengist.podd at virgin.net Thu Mar 5 19:32:33 2009 From: hengist.podd at virgin.net (has) Date: Thu, 5 Mar 2009 18:32:33 +0000 Subject: [Pythonmac-SIG] appscript path issue In-Reply-To: References: Message-ID: <9DBA55AE-3EAD-4F19-9992-C54EDFD70CCD@virgin.net> Bill Janssen wrote: > I'm trying to write this scrap of Applescript in Python appscript: > > on run > tell application "Microsoft PowerPoint" > set this_item to path of active presentation > end tell > set unix_item to POSIX path of this_item > display dialog of unix_item > end run > > which yields "/tilde/janssen/Documents", an NFS-mounted location. Is that correct? Shouldn't the volume appear under /Volumes? Is the volume identified by this path mounted at the time you run this code? If not, try it and see what happens. I'm not an expert on Unix mounting points, but my impression is that that is where they normally go. I've also noticed that HFS<->POSIX path conversions only produce a path beginning with /Volumes when the volume is mounted. I suspect the result given when the volume isn't mounted is wrong/undefined, but as I say I'm no expert in this area. > I've got this: > > from appscript import * > from mactypes import * > print File.makewithhfspath(app("Microsoft > PowerPoint").active_presentation.path()).path > > However, in this case, I get "/janssen/Documents", which is wrong. Appscript uses CFURL functions to convert POSIX to HFS paths and vice- versa. (I'd have thought AS would use the same functions, but maybe not.) The relevant code is in the ae.c file for your reference. If you find a problem in the way that HFS<->POSIX paths are converted, I'd suggest writing up a test case in C to confirm the same behaviour there, then submit a bug report to Apple on it as its their APIs that are responsible for it. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From janssen at parc.com Thu Mar 5 19:55:18 2009 From: janssen at parc.com (Bill Janssen) Date: Thu, 5 Mar 2009 10:55:18 PST Subject: [Pythonmac-SIG] appscript path issue In-Reply-To: <9DBA55AE-3EAD-4F19-9992-C54EDFD70CCD@virgin.net> References: <9DBA55AE-3EAD-4F19-9992-C54EDFD70CCD@virgin.net> Message-ID: <68185.1236279318@parc.com> has wrote: > Bill Janssen wrote: > > > I'm trying to write this scrap of Applescript in Python appscript: > > > > on run > > tell application "Microsoft PowerPoint" > > set this_item to path of active presentation > > end tell > > set unix_item to POSIX path of this_item > > display dialog of unix_item > > end run > > > > which yields "/tilde/janssen/Documents", an NFS-mounted location. > > Is that correct? Shouldn't the volume appear under /Volumes? Is the > volume identified by this path mounted at the time you run this code? > If not, try it and see what happens. Yes, it's correct, and yes, the volume is mounted -- the code is running out of it, in fact. It's my home directory. The automounter mounts these NFS shares automatically under "/tilde" if they come from the "mount.byname" YP map. They don't show up under /Volumes at all. > Appscript uses CFURL functions to convert POSIX to HFS paths and vice- > versa. (I'd have thought AS would use the same functions, but maybe > not.) The relevant code is in the ae.c file for your reference. Yes, I found it. I've been playing around with that code using Carbon.File... I was kind of hoping that this would do it Carbon.File.FSMakeFSSpec(0, 0, "janssen:Documents").FSpMakeFSRef().as_pathname() but not so -- maybe that's the same bug that shows up in CFURLCreateWithFilesystemPath. I think what one has to do is to enumerate the volumes, identify the one labelled as "janssen", and then use that volume ID as the parent to Carbon.File.FSMakeFSSpec(volumeID, 0, "Documents").FSpMakeFSRef().as_pathname() (I think enumeration is necessary -- at least, I don't see any call that says, "give me the volumeID of the volume known as 'janssen'".) > If you > find a problem in the way that HFS<->POSIX paths are converted, I'd > suggest writing up a test case in C to confirm the same behaviour > there, then submit a bug report to Apple on it as its their APIs that > are responsible for it. Sure. But I'm guessing that they don't actually use CFURLCreateWithFilesystemPath... And until the bug is fixed, I'd like to find a workaround for appscript to use. Sure like to know how "POSIX path of" does it... Bill From Jack.Jansen at cwi.nl Thu Mar 5 20:59:48 2009 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu, 5 Mar 2009 20:59:48 +0100 Subject: [Pythonmac-SIG] appscript path issue In-Reply-To: <68185.1236279318@parc.com> References: <9DBA55AE-3EAD-4F19-9992-C54EDFD70CCD@virgin.net> <68185.1236279318@parc.com> Message-ID: <50F38778-0C4A-4E5E-B032-7F2EF209D39D@cwi.nl> I wouldn't be surprised if the root of the problem is with PowerPoint. It started its life as an OS9 application, so if it still thinks it lives in an OS9 world with FSSpecs and colon-separated pathnames, it could be trying to do the conversion to posix paths itself. And such a conversion might well fail for hand-mounted NFS shares in non-standard locations... -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From janssen at parc.com Thu Mar 5 22:01:21 2009 From: janssen at parc.com (Bill Janssen) Date: Thu, 5 Mar 2009 13:01:21 PST Subject: [Pythonmac-SIG] appscript path issue In-Reply-To: <50F38778-0C4A-4E5E-B032-7F2EF209D39D@cwi.nl> References: <9DBA55AE-3EAD-4F19-9992-C54EDFD70CCD@virgin.net> <68185.1236279318@parc.com> <50F38778-0C4A-4E5E-B032-7F2EF209D39D@cwi.nl> Message-ID: <70760.1236286881@parc.com> Jack Jansen wrote: > I wouldn't be surprised if the root of the problem is with > PowerPoint. It started its life as an OS9 application, so if it still > thinks it lives in an OS9 world with FSSpecs and colon-separated > pathnames, it could be trying to do the conversion to posix paths > itself. No, it continues to deal with HFS paths. What I'm getting from it is "janssen:Documents" as the directory for the presentation. Which implies a disk called "janssen", and a top-level directory called "Documents", which is pretty much what's there. And osascript processes it correctly, so... Bill From janssen at parc.com Fri Mar 6 19:55:57 2009 From: janssen at parc.com (Bill Janssen) Date: Fri, 6 Mar 2009 10:55:57 PST Subject: [Pythonmac-SIG] appscript path issue In-Reply-To: <70760.1236286881@parc.com> References: <9DBA55AE-3EAD-4F19-9992-C54EDFD70CCD@virgin.net> <68185.1236279318@parc.com> <50F38778-0C4A-4E5E-B032-7F2EF209D39D@cwi.nl> <70760.1236286881@parc.com> Message-ID: <84149.1236365757@parc.com> > Jack Jansen wrote: > > > I wouldn't be surprised if the root of the problem is with > > PowerPoint. It started its life as an OS9 application, so if it still > > thinks it lives in an OS9 world with FSSpecs and colon-separated > > pathnames, it could be trying to do the conversion to posix paths > > itself. > > No, it continues to deal with HFS paths. What I'm getting from it > is "janssen:Documents" as the directory for the presentation. > > Which implies a disk called "janssen", and a top-level directory called > "Documents", which is pretty much what's there. > > And osascript processes it correctly, so... > > Bill So, I thought I'd use FileManager to deal with this, by enumerating the volumes and their names. Here's the program I wrote: #include int main(int ac, char **av) { /* compile this with: cc -o test -framework CoreServices test.c */ OSErr err = 0; FSVolumeRefNum actualVolume; FSVolumeInfoBitmap whichInfo; FSVolumeInfo info; HFSUniStr255 volumeName; FSRef rootDirectory; int i; for (i = 1; err != nsvErr; i++) { volumeName.length = 0; err = FSGetVolumeInfo (kFSInvalidVolumeRefNum, i, &actualVolume, kFSVolInfoGettableInfo, &info, &volumeName, &rootDirectory); if (err >= 0) { char buf[512]; CFStringRef strRef = CFStringCreateWithCharacters(NULL, // use default allocator volumeName.unicode, volumeName.length); CFStringGetCString(strRef, buf, sizeof(buf), kCFStringEncodingNonLossyASCII); printf("%d: %s\n", actualVolume, buf); } else if (err != nsvErr) { printf("err %d accessing volume %d\n", err, i); } } } When I run it on my machine, with about 15 NFS-mounted volues on it (according to the "mount" command), it only shows the two actual hard disks on the machine! The FileManager reference is pretty unclear about this; it says "only physical volumes", but discusses AFP and NFS volumes in talking about FSGetVolumeInfo. Bill From rowen at u.washington.edu Tue Mar 10 18:04:22 2009 From: rowen at u.washington.edu (Russell E. Owen) Date: Tue, 10 Mar 2009 10:04:22 -0700 Subject: [Pythonmac-SIG] Uninstalling Python 2.6? References: Message-ID: In article , Idan Gazit wrote: > Hi Folks, > > So a while back I tried installing (mac) python 2.6 on my leopard > machine, mainly to poke around. > > Today I'm trying out some xcode/pyobjc stuff and I've been tearing my > hair out wondering why nothing works as advertised. Turns out that > xcode was building against python 2.6, which doesn't have the relevant > modules in its classpath (objc, for example). > > A little bit of digging later and it seems that the *only* version of > python listed in /Library/Frameworks/Python.framework is 2.6. Oh noes! > > So my plea: > > * How do I cleanly remove the 2.6 (installed using the provided > installer) installation such that I'm left with my leopard-vanilla 2.5? > * What should I do about the Python.framework? I imagine that PyObjC > apps require at least one version there. Did 2.6 overwrite the > existing one? Can anybody tell me how to get it back or how to install > the 2.5 version? You can safely delete /Library/Frameworks/Python.Framework Also look in /usr/local/bin for any files whose names start with "python"; delete those. The system python is in /System/Frameworks and is safe from your changes. Note that multiple versions of user-installed python can coexist. If so you may want to delete something inside of /Library/Frameworks/Python.Framework instead, but that doesn't appear to be your case. (Also if you are otherwise happy with Python 2.6 you could just use it to install the other packages you are missing. Personally I prefer using a user-installed Python for my own work, rather than cluttering up the system python with user-installed packages.) -- Russell From martin.laloux at gmail.com Wed Mar 11 11:02:55 2009 From: martin.laloux at gmail.com (genemartin) Date: Wed, 11 Mar 2009 03:02:55 -0700 (PDT) Subject: [Pythonmac-SIG] PyGTK on OSX? In-Reply-To: <5465ee790812271021q693e822em105adfef75dc7651@mail.gmail.com> References: <5465ee790812271021q693e822em105adfef75dc7651@mail.gmail.com> Message-ID: <22451916.post@talk.nabble.com> I managed to install pygtk (not the last version)on my mac with framework of http://www.gtk-osx.org/ using following procedures: (from http://developer.imendio.com/node/264) 1) install pycairo 1.6.4 (working well with the framework) PKG_CONFIG_PATH=/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig ./configure --prefix=/Library/Frameworks/Python.framework/Versions/2.5 make make install (installs in site-packages of the Python framework) 2) install pygobject 2.12.3 (working well with the framework) PKG_CONFIG_PATH=/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig ./configure --prefix=/Library/Frameworks/Python.framework/Versions/2.5 make make install 3 install pygtk 2.10.14 (working well with the framework) PKG_CONFIG_PATH=/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig ./configure --prefix=/Library/Frameworks/Python.framework/Versions/2.5 in doing so, there is a problem : "checking for PYGOBJECT... configure: error: Package requirements (pygobject-2.0 >= 2.12.1) were not met: No package 'pygobject-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix" i see that pygobject installs a gobject folder in gtk-2.0 folder in site-packages and a pygobject2.0.pc in lib/pkgconfig using : PKG_CONFIG_PATH=/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig: path_to_your_folder/pkgconfig ./configure --prefix=/Library/Frameworks/Python.framework/Versions/2.5 pygtk works very well, all the demos etc.. except anything that relates to glade that have yet to install -- View this message in context: http://www.nabble.com/PyGTK-on-OSX--tp21186327p22451916.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From david.manthey at request.com Wed Mar 11 15:24:20 2009 From: david.manthey at request.com (David Manthey) Date: Wed, 11 Mar 2009 10:24:20 -0400 Subject: [Pythonmac-SIG] selecting wxpython version with py2app Message-ID: <1236781460.23270.4.camel@localhost.localdomain> Hi there, I am using OS-X 10.5 (Leopard) with a wxPython program, and I want to bundle it into an application using py2app. I currently have wx version 2.8.9.2 installed, and when I run my python program on the command line, it works faultlessly. When I bundle it with py2app, it uses the system framework version of wx (2.8.4.0), and, unfortunately, my program doesn't work because I've used newer features of wx. How do I instruct py2app to NOT use the system framework version of wx? Or, alternately, how do I upgrade the system framework version of wx? Many thanks. - David -- David Manthey, programmer ReQuest - Serious Play w: 518.490.6140 david.manthey at request.com From Chris.Barker at noaa.gov Wed Mar 11 17:20:39 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 11 Mar 2009 09:20:39 -0700 Subject: [Pythonmac-SIG] selecting wxpython version with py2app In-Reply-To: <1236781460.23270.4.camel@localhost.localdomain> References: <1236781460.23270.4.camel@localhost.localdomain> Message-ID: <49B7E4D7.7000407@noaa.gov> David Manthey wrote: > I am using OS-X 10.5 (Leopard) with a wxPython program, and I want to > bundle it into an application using py2app. I currently have wx version > 2.8.9.2 installed, and when I run my python program on the command line, > it works faultlessly. What python are you using? Apple's? If so, there may be some confusion as to what to include and what not to -- I think py2app does not include the system python in the bundle, as that is expected to be there (It'll only run on 10.5 in that case) -- I"m not sure what it does with system packages, like wx2.8.4.0. You might try using wxversion in your setup.py: import wxversion wxversion.select('2.8') at the top. Some of the confusion may be due to how Robin has built wxPython so that is will work with either Apple's or python.org's python -- all the real package is in /usr/local, and in site-packages, there are *.pth files that do the tricks required. As a last resort, you might try manually including the wxPython package, and maybe even manually removing the old one. If you are using a non-apple python, make sure that you are running py2app with that version. In fact, you may want to use a python.org python anyway, a py2app bundle built on 10.5 will only work on 10.5. > Or, alternately, how do I upgrade the system framework version of wx? You don't want to do that -- never mess with something Apple has installed, there is no telling what may use it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From massimodisasha at yahoo.it Fri Mar 13 08:58:58 2009 From: massimodisasha at yahoo.it (massimo di stefano) Date: Fri, 13 Mar 2009 08:58:58 +0100 Subject: [Pythonmac-SIG] Build problem : Pyqt-4.5 on mac osx Leopard Message-ID: Hi All, I'm tring to install pyqt4.5 on mac osx leopard (10.5.6) these the procedure i follow to build it : sip: export MACOSX_DEPLOYMENT_TARGET=10.5 python configure.py -n -d /Library/Python/2.5/site-packages \ -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip \ -s MacOSX10.5.sdk make sudo make install pyqt: export QTDIR=/Developer/Applications/Qt python configure.py -d /Library/Python/2.5/site-packages \ -b /usr/local/bin make sudo make install unluky it fails with these error : .... ..... g++ -headerpad_max_install_names -bundle -undefined dynamic_lookup - arch ppc -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -o QtHelp.so sipQtHelpcmodule.o sipQtHelpQMap.o sipQtHelpQList.o sipQtHelpQHelpSearchResultWidget.o sipQtHelpQHelpSearchQueryWidget.o sipQtHelpQHelpSearchEngine.o sipQtHelpQHelpSearchQuery.o sipQtHelpQHelpIndexWidget.o sipQtHelpQHelpIndexModel.o sipQtHelpQHelpEngineCore.o sipQtHelpQHelpEngine.o sipQtHelpQHelpContentWidget.o sipQtHelpQHelpContentModel.o sipQtHelpQHelpContentItem.o -F/Library/Frameworks -L/Library/ Frameworks -framework QtHelp -lQtCLucene -framework QtSql -framework QtXml -framework QtGui -framework Carbon -framework AppKit -framework QtNetwork -framework SystemConfiguration -framework QtCore -lz -lm - framework ApplicationServices -framework QtGui -framework Carbon - framework AppKit -framework QtCore -lz -lm -framework ApplicationServices -framework QtCore -lz -lm -framework ApplicationServices ld: library not found for -lQtCLucene collect2: ld returned 1 exit status ld: library not found for -lQtCLucene collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/15/15zQj3qeHemLNapL-foqC+++ +TI/-Tmp-//ccm0K1y8.out (No such file or directory) make[1]: *** [QtHelp.so] Error 1 make: *** [all] Error 2 at these link a text file with the complete log fro sip and pyqt build : http://www.geofemengineering.it/data/pyqt_osx_build.log thanks to a friend helped me, he suggest me to create a simlink : sudo ln -s /usr/lib/libQtLucene.dylib /Developer/SDKs/MacOSX10.4u.sdk/ usr/lib sudo ln -s /usr/lib/libQtLucene.dylib /Developer/SDKs/MacOSX10.5.sdk/ usr/lib the simlink did the job :-) now qt-4.5 sip-4.8-snapshot-20090311 PyQt-mac-gpl-4.5-snapshot-20090311 are compiled on osx. without errors, but unlucky they don't works :-( running any pyqt4.5 example give me these error : ImportError: dlopen(/Library/Python/2.5/site-packages/PyQt4/QtCore.so, 2): Symbol not found: _sipQtConnect Referenced from: /Library/Python/ 2.5/site-packages/PyQt4/QtCore.so Expected in: dynamic lookup have you any suggestion ? thanks a lot for any help! regards, Massimo Di Stefano massimodisasha at yahoo.it epifanio on irc.freenode.net /join gfoss -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Fri Mar 13 17:02:01 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 13 Mar 2009 09:02:01 -0700 Subject: [Pythonmac-SIG] PyEnchant on (Universal) OS-X Message-ID: <49BA8379.8040203@noaa.gov> Hi folks, Has anyone gotten PyEnchant (spell checker) working on OS-X? preferably with aspell, and a Universal build, but I'll take any success stories I can get. If so, how? thanks, -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.van.bael at gmail.com Fri Mar 13 20:39:06 2009 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Fri, 13 Mar 2009 20:39:06 +0100 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard Message-ID: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> Hi, I want to port an application that runs on Linux and Windows perfectly to OSX. We use Python 2.5, PyGame, PyGTK and SQLAlchemy for it. Now I have a system with Leopard on it, but want to make sure what would be the best solution to get these dependencies installed on it. I remember reading on this mailinglist that there were some problems with the python included in Leopard. I was able to compile PyGTK with the included python, now I tried to install PyGame 1.8.1 on it but all partitions are red. Do I need to install another Python alongside the included python (or should I replace it)? Thanks for the help. From jarkko.laiho at iki.fi Sat Mar 14 16:19:01 2009 From: jarkko.laiho at iki.fi (Jarkko Laiho) Date: Sat, 14 Mar 2009 17:19:01 +0200 Subject: [Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error Message-ID: Hi all, I'm writing a simple daemon to test out a web application that receives messages via HTTP, using urllib2 for the HTTP connections. The program daemonizes nicely and sends the messages just fine, but when it's sending the first message (which takes place 2-12 seconds after starting the program, since the send interval is randomized), the terminal I started the program from prints out: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug. ...repeating it several dozen times. The execution of the program seems to run normally regardless, at least the messages arrive to the HTTP server just fine. I'm running OS X Leopard 10.5.6, the system default Python 2.5.1, and using this daemonizing code: http://code.activestate.com/recipes/278731/ The actual offending bit in my own code is inside __main__, and occurs in the main loop of the program, right after the daemonization has taken place: [...code...] while True: time.sleep(int(random.random() * 10 + 2)) params = urllib.urlencode({'json': json.dumps({'msg': random_items(phrases)[0][1], 'chan': '07101237-20ad-4229-b663-0c3dd46b8706'} ) }) req = urllib2.Request('http://localhost:8000/json/new_msg/', params, headers) try: fd = urllib2.urlopen(req) # THIS PRODUCES THE ERROR response = fd.read() except urllib2.HTTPError, e: sys.exit(1) [...more code...] I commented and gradually uncommented bunches of code until the error disappeared, and I narrowed it down to the urllib2.urlopen call: if it (and the next row that depends on it) are commented out, the error doesn't appear. Googling the error revealed this Leopard release notes document from Apple: http://developer.apple.com/releasenotes/CoreFoundation/CoreFoundation.html Relevant quote: ---- "CoreFoundation and fork() Due to the behavior of fork(), CoreFoundation cannot be used on the child-side of fork(). If you fork(), you must follow that with an exec*() call of some sort, and you should not use CoreFoundation APIs within the child, before the exec*(). The applies to all higher-level APIs which use CoreFoundation, and since you cannot know what those higher-level APIs are doing, and whether they are using CoreFoundation APIs, you should not use any higher-level APIs either. This includes use of the daemon() function. Additionally, per POSIX, only async-cancel-safe functions are safe to use on the child side of fork(), so even use of lower-level libSystem/BSD/UNIX APIs should be kept to a minimum, and ideally to only async-cancel-safe functions. This has always been true, and there have been notes made of this on various Cocoa developer mailling lists in the past. But CoreFoundation is taking some stronger measures now to "enforce" this limitation, so we thought it would be worthwhile to add a release note to call this out as well. A message is written to stderr when something uses API which is definitely known not to be safe in CoreFoundation after fork(). If file descriptor 2 has been closed, however, you will get no message or notice, which is too bad. We tried to make processes terminate in a very recognizable way, and did for a while and that was very handy, but backwards binary compatibility prevented us from doing so." ---- Now, I know nothing about CoreFoundation and just about nothing about the Unix side of things (fork/exec etc.), but it appears that urllib2.urlopen is somehow dependent on some CoreFoundation code and thus doesn't play well with fork(). If one of the os.exec* functions need to be used, like the release notes suggest, I have no idea how and where. Is this a bug that should be reported either to Apple or to the Python people, or do I simply need a different type of forking semantic in a Leopard system? Any advice will be much appreciated. - Jarkko Laiho From anuheagreen at yahoo.com Sat Mar 14 19:07:50 2009 From: anuheagreen at yahoo.com (Samantha Bess) Date: Sat, 14 Mar 2009 11:07:50 -0700 (PDT) Subject: [Pythonmac-SIG] How to use pythonw on Mac OS X Message-ID: <438467.23658.qm@web63903.mail.re1.yahoo.com> To whom it may concern: I'm hoping you can help me. I recently purchased a screensaver called Paper Pilots. When I tried to install it, a message popped up that said, "This program needs access to the screen. Please run with 'pythonw',". Can anyone help me? I'm not sure what I need to do next. How do I run the screen saver with "pythonw"? Thanks a lot for any help, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary.pincus at yale.edu Sun Mar 15 19:05:32 2009 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Sun, 15 Mar 2009 14:05:32 -0400 Subject: [Pythonmac-SIG] How to use pythonw on Mac OS X In-Reply-To: <438467.23658.qm@web63903.mail.re1.yahoo.com> References: <438467.23658.qm@web63903.mail.re1.yahoo.com> Message-ID: <0B76B376-8B50-48DF-9BEA-EBE5AE0A7181@yale.edu> Hi Samantha, You should probably direct your query to the creators of the software you purchased... they're the most likely to be able to get this working for you as soon as possible: http://www.paperpilots.com/pp_contact.html Zach On Mar 14, 2009, at 2:07 PM, Samantha Bess wrote: > To whom it may concern: > > I'm hoping you can help me. I recently purchased a screensaver > called Paper Pilots. When I tried to install it, a message popped > up that said, "This program needs access to the screen. Please run > with 'pythonw',". Can anyone help me? I'm not sure what I need to > do next. How do I run the screen saver with "pythonw"? > > Thanks a lot for any help, > > Sam > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From janssen at parc.com Sun Mar 15 20:13:35 2009 From: janssen at parc.com (Bill Janssen) Date: Sun, 15 Mar 2009 12:13:35 PDT Subject: [Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error In-Reply-To: References: Message-ID: <16337.1237144415@parc.com> You need to do an "exec" after doing a "fork". /usr/bin/python on OS X is a "framework build", and some (most?) of the OS X frameworks just don't work after doing a fork. You have to restart with an "exec". It's hard to say just what is using CF; I see you're importing some external packages ("json" doesn't come with 2.5.1 on OS X), so it might be one of them, instead of urllib2. But it's probably the "urllib" module, which uses CF to call into the SystemConfiguration system on the Mac to look up proxies and such. It would make sense that the error is triggered just when you call urlopen(). Bill From jarkko.laiho at iki.fi Mon Mar 16 08:42:26 2009 From: jarkko.laiho at iki.fi (Jarkko Laiho) Date: Mon, 16 Mar 2009 09:42:26 +0200 Subject: [Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error In-Reply-To: <16337.1237144415@parc.com> References: <16337.1237144415@parc.com> Message-ID: On Sun, Mar 15, 2009 at 9:13 PM, Bill Janssen wrote: > You need to do an "exec" after doing a "fork". ?/usr/bin/python on OS X > is a "framework build", and some (most?) of the OS X frameworks just > don't work after doing a fork. ?You have to restart with an "exec". All right, but how is this done? I'll refer to the code I'm using: http://code.activestate.com/recipes/278731/ The first fork happens at line 55, and the second at line 103. As said, I really don't understand this fork/exec business so I don't know what I should do. Which of the many exec* functions in the os module should I run, and with what parameters? The forking without exec already does everything I need it to do daemonizing-wise (except satisfy CoreFoundation), so what am I trying to accomplish? What does CF actually require me to do, and does it mess up or require further changes in the forking methodology I'm using? - Jarkko L. From janssen at parc.com Mon Mar 16 17:13:32 2009 From: janssen at parc.com (Bill Janssen) Date: Mon, 16 Mar 2009 09:13:32 PDT Subject: [Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error In-Reply-To: References: <16337.1237144415@parc.com> Message-ID: <28048.1237220012@parc.com> Jarkko Laiho wrote: > On Sun, Mar 15, 2009 at 9:13 PM, Bill Janssen wrote: > > You need to do an "exec" after doing a "fork". ?/usr/bin/python on OS X > > is a "framework build", and some (most?) of the OS X frameworks just > > don't work after doing a fork. ?You have to restart with an "exec". > > All right, but how is this done? > > I'll refer to the code I'm using: > > http://code.activestate.com/recipes/278731/ > > The first fork happens at line 55, and the second at line 103. As > said, I really don't understand this fork/exec business so I don't > know what I should do. Which of the many exec* functions in the os > module should I run, and with what parameters? The forking without > exec already does everything I need it to do daemonizing-wise (except > satisfy CoreFoundation), so what am I trying to accomplish? What does > CF actually require me to do, and does it mess up or require further > changes in the forking methodology I'm using? So, that recipe is inadequate on OS X -- you pretty much have to do an exec after the fork. Doesn't matter which of the exec functions you use -- use the most convenient one. What you're trying to accomplish is re-initialization of some of the memory structures of your process. http://en.wikipedia.org/wiki/Fork-exec Bill From Chris.Barker at noaa.gov Mon Mar 16 17:31:35 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 16 Mar 2009 09:31:35 -0700 Subject: [Pythonmac-SIG] How to use pythonw on Mac OS X In-Reply-To: <438467.23658.qm@web63903.mail.re1.yahoo.com> References: <438467.23658.qm@web63903.mail.re1.yahoo.com> Message-ID: <49BE7EE7.9030404@noaa.gov> Samantha Bess wrote: > I'm hoping you can help me. I recently purchased a screensaver called > Paper Pilots. When I tried to install it, a message popped up that > said, "This program needs access to the screen. Please run with > 'pythonw',". This is no longer required for recent versions of Python. What version of OS-X are you running? Which python? how are you starting the program? -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 Mon Mar 16 17:37:11 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 16 Mar 2009 09:37:11 -0700 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> Message-ID: <49BE8037.5000305@noaa.gov> Chris Van Bael wrote: > I want to port an application that runs on Linux and Windows perfectly to OSX. > We use Python 2.5, PyGame, PyGTK and SQLAlchemy for it. > Now I have a system with Leopard on it, but want to make sure what > would be the best solution to get these dependencies installed on it. > I remember reading on this mailinglist that there were some problems > with the python included in Leopard. some, but it mostly works well -- the biggest issues to decide are: D you want to build stand-alone executables that will run on pre-leopard systems? Do the big packages you need come as binaries -- if so, for which python? That being said, I'd go with the python from python.org -- more ups to date, and usually better support by third party packages. > Do I need to install another Python alongside the included python (or > should I replace it)? Do not replace it -- the python.org python can be installed in addition to it, outside of system directories. As for pyGTK -- another option is a fink or macports python -- these sometimes support the "unix-y" stuff better. I know it's a mess! -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 jarkko.laiho at iki.fi Mon Mar 16 17:45:23 2009 From: jarkko.laiho at iki.fi (Jarkko Laiho) Date: Mon, 16 Mar 2009 18:45:23 +0200 Subject: [Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error In-Reply-To: <28048.1237220012@parc.com> References: <16337.1237144415@parc.com> <28048.1237220012@parc.com> Message-ID: >> http://code.activestate.com/recipes/278731/ > So, that recipe is inadequate on OS X -- you pretty much have to do an > exec after the fork. ?Doesn't matter which of the exec functions you > use -- use the most convenient one. ?What you're trying to accomplish > is re-initialization of some of the memory structures of your process. All right, that's good to know, but I'm probably not communicating the level of my confusion very well here :-). I have NO IDEA what the exec() call should contain (and thus, no idea which one is "the most convenient"). >From the Python documentation for the exec*() functions: "These functions all execute a new program, replacing the current process; they do not return." I don't want to "execute a new program". I just want to daemonize the one that's running. So ultimately the question is: how should the forking code in the recipe be modified, so that it satisfies the requirements of OS X? What does an actual, concrete exec() call look like in this case, and at what point in the code should it occur? - Jarkko L. From janssen at parc.com Mon Mar 16 18:26:33 2009 From: janssen at parc.com (Bill Janssen) Date: Mon, 16 Mar 2009 10:26:33 PDT Subject: [Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error In-Reply-To: References: <16337.1237144415@parc.com> <28048.1237220012@parc.com> Message-ID: <39487.1237224393@parc.com> Jarkko Laiho wrote: > So ultimately the question is: how should the forking code in the > recipe be modified, so that it satisfies the requirements of OS X? > What does an actual, concrete exec() call look like in this case, and > at what point in the code should it occur? I don't know -- you didn't post your entire program. Read the Wikipedia page and follow the refs. Here's an example: def daemon (): try: pid = os.fork() if pid > 0: sys.exit(0) # parent except OSError, e: msg = "fork #1 failed: (%d) %s\n" % (e.errno, e.strerror) sys.stderr.write(msg) sys.exit(1) os.umask(0) # now create a new session os.setsid() # and fork into the new session try: pid = os.fork() if pid > 0: sys.exit(0) # session leader exits here except OSError, e: msg = "fork #2 failed: (%d) %s\n" % (e.errno, e.strerror) sys.stderr.write(msg) sys.exit(1) # here you could make any changes you need to the "env", like setting "PYTHONPATH" env = os.environ.copy() # figure out how to invoke the actual program args = [sys.executable, "-c", "import mycode;" + "mycode.realmain()" ] os.execve(sys.executable, args, env) def realmain(): start_server() # the real "main"... # this is basically just an event-handling loop while True: try: asyncore.loop() except (KeyboardInterrupt, SystemExit), x: note(4, "Exited from main loop due to exception:\n%s", ''.join(traceback.format_exception(*sys.exc_info()))) raise except: note(0, "Exited from main loop due to exception:\n%s", ''.join(traceback.format_exception(*sys.exc_info()))) if __name__ == "__main__" and (not sys.platform.lower().startswith("win")): daemon() From jarkko.laiho at iki.fi Mon Mar 16 20:06:37 2009 From: jarkko.laiho at iki.fi (Jarkko Laiho) Date: Mon, 16 Mar 2009 21:06:37 +0200 Subject: [Pythonmac-SIG] urllib2.urlopen fails in a forked daemon with a CoreFoundation error In-Reply-To: <39487.1237224393@parc.com> References: <16337.1237144415@parc.com> <28048.1237220012@parc.com> <39487.1237224393@parc.com> Message-ID: >> What does an actual, concrete exec() call look like in this case, and >> at what point in the code should it occur? > I don't know -- you didn't post your entire program. ?Read the Wikipedia > page and follow the refs. I did and understood just about none of it. Way over my head. But: > Here's an example: > [...] > ? ?# figure out how to invoke the actual program > ? ?args = [sys.executable, "-c", > ? ? ? ? ? ?"import mycode;" + > ? ? ? ? ? ?"mycode.realmain()" > ? ? ? ? ? ?] > ? ?os.execve(sys.executable, args, env) >[...] There's a technique I didn't know about. I didn't think there was any way of making an exec() call fit the existing code, but that might just do the trick. I'm pretty sure I can work with that. Thanks for your patient advice! - Jarkko L. From Chris.Barker at noaa.gov Mon Mar 16 20:41:31 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 16 Mar 2009 12:41:31 -0700 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> Message-ID: <49BEAB6B.2070301@noaa.gov> (make sure to reply to the list, for the archives...) Chris Van Bael wrote: > Yes, I absolutely do want to buil binaries that can run on 10.3.9 and 10.4! > This is very important. Then you want the python.org python. > Do you have the paths for the system python and the installation from > python.org? system python is in: /Library/Frameworks/Python.framework/ python.org goes into: /Library/Frameworks/Python.framework/ > My problem with Mac installers is that they just ask a partition in > which to install the software. > But I want to be sure that they install the packages into the correct > python installation. (the one from python.org) If you are using an installer, then it has to be built for the python you want. Most only target one -- wxPython targets both python.org and Apple's (for Python 2.5) if you use easy_install or setup.py, be sure to run them with the python you want to use. -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.van.bael at gmail.com Tue Mar 17 09:18:37 2009 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Tue, 17 Mar 2009 09:18:37 +0100 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: <49BEAB6B.2070301@noaa.gov> References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> <49BEAB6B.2070301@noaa.gov> Message-ID: <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> On Mon, Mar 16, 2009 at 8:41 PM, Christopher Barker wrote: > > (make sure to reply to the list, for the archives...) > > Chris Van Bael wrote: >> >> Yes, I absolutely do want to buil binaries that can run on 10.3.9 and >> 10.4! >> This is very important. > > Then you want the python.org python. OK, I'll keep that in mind. >> Do you have the paths for the system python and the installation from >> python.org? > > system python is in: > /Library/Frameworks/Python.framework/ > > python.org goes into: > > /Library/Frameworks/Python.framework/ Those seem to be the same, is that intentional? > > >> My problem with Mac installers is that they just ask a partition in >> which to install the software. >> But I want to be sure that they install the packages into the correct >> python installation. (the one from python.org) > > If you are using an installer, then it has to be built for the python you > want. Most only target one -- wxPython targets both python.org and Apple's > (for Python 2.5) So if it says blabla_python2.5_osx10.5. and I have installed Python 2.5 next to the systems' 2.5, it will install it in Python 2.5 from Python.org? Chris From ronaldoussoren at mac.com Tue Mar 17 10:12:37 2009 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 17 Mar 2009 10:12:37 +0100 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> <49BEAB6B.2070301@noaa.gov> <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> Message-ID: On 17 Mar, 2009, at 9:18, Chris Van Bael wrote: >>> >> >> system python is in: >> /Library/Frameworks/Python.framework/ >> >> python.org goes into: >> >> /Library/Frameworks/Python.framework/ > > Those seem to be the same, is that intentional? The system python is in /System/Library/... Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From Chris.Barker at noaa.gov Tue Mar 17 17:18:27 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 17 Mar 2009 09:18:27 -0700 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> <49BEAB6B.2070301@noaa.gov> <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> Message-ID: <49BFCD53.9040407@noaa.gov> Ronald Oussoren wrote: > The system python is in /System/Library/... ooops, sorry about that -- copy&paste error. I hope that didn't cause too much confusion. -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 Tue Mar 17 17:21:28 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 17 Mar 2009 09:21:28 -0700 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> <49BEAB6B.2070301@noaa.gov> <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> Message-ID: <49BFCE08.6020409@noaa.gov> Chris Van Bael wrote: > So if it says blabla_python2.5_osx10.5. > and I have installed Python 2.5 next to the systems' 2.5, it will > install it in Python 2.5 from Python.org? Probably, but the only way top know is to read the docs that came with it (or try it and see what happens). If it says os-X10.5 there is a good chance it's for the system python, as the python-org one is not 10.5 dependent. However, you can build a 10.5-only extension for the python.org python, so really, the only way to know is to see what the person that built it says it is for. -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 Tue Mar 17 22:45:14 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 17 Mar 2009 14:45:14 -0700 Subject: [Pythonmac-SIG] [Fwd: [Image-SIG] ANN: PIL 1.1.7 alpha 1 (March 17, 2009)] Message-ID: <49C019EA.9070700@noaa.gov> Hi folks, It looks like we'll be getting a new PIL soon. Anyone that is set up to compile it -- please test! It would also be nice if we could figure out how to do a nice binary build, as a community. -Chris -------- Original Message -------- Subject: [Image-SIG] ANN: PIL 1.1.7 alpha 1 (March 17, 2009) Date: Tue, 17 Mar 2009 22:22:01 +0100 From: Fredrik Lundh To: image-sig at python.org The first official alpha of PIL 1.1.7 is now available; you can get source archives from http://bitbucket.org/effbot/pil-2009-raclette/src/pil-117-20090317 (use the download >> menu in the right corner). Alternatively, you can check out the alpha using Mercurial: $ hg clone -r pil-117-20090317 http://bitbucket.org/effbot/pil-2009-raclette/ or Subversion: $ svn co http://svn.effbot.org/public/tags/pil-1.1.7a1-20090317/ (note that the main HG repo contains a few odd heads and most likely a bunch of changes done after the alpha was cut) I hope to have (some) Windows builds available early next week, at the latest. -- 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 Thu Mar 19 11:24:08 2009 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 19 Mar 2009 11:24:08 +0100 Subject: [Pythonmac-SIG] MacPython sprint at PyCon Message-ID: Chris' mail about creating a binary build for PIL 1.1.7 helped to remind me to reannounce the MacPython sprint at PyCon'09. I'll be sprinting on MacPython related topics at PyCon, there's even a page on PyCon's wiki for this: http://us.pycon.org/2009/sprints/projects/macpython/ . Current topics for the sprint: * Getting py2app into a better shap (adding testsuite, adding better setuptools support, ...) * Improvements for the Python.org tree (bugfixes, work on the installer, ...) * Discus how to create binaries for extensions, especially those linking to non-system libraries (PIL, lxml, ...) The above list is not carved in stone and can be changed if there are other interesting topics. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From akos at pipacs.com Thu Mar 19 19:27:16 2009 From: akos at pipacs.com (Akos Polster) Date: Thu, 19 Mar 2009 19:27:16 +0100 Subject: [Pythonmac-SIG] py2app KeyError Message-ID: <49C28E84.1030403@pipacs.com> Hi, I'm getting KeyError in py2app since I've upgraded Qt to 4.5 plus sip and PyQt to the latest nightbuilds. The OS is 10.4,11. This is of course most likely related to the changes in Qt etc. but I don't even know where to look. Any ideas? Thanks ~ Akos. linking /Users/polster/workspace/vpntool/dist/vpntool.app/Contents/Frameworks/QtGui.framework/Versions/Current -> 4 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 587, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 658, 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-0.4.2-py2.5.egg/py2app/build_app.py", line 775, in create_binaries platfiles = mm.run() File "build/bdist.macosx-10.3-fat/egg/macholib/MachOStandalone.py", line 108, in run mm.run_file(fn, caller=ref) File "build/bdist.macosx-10.3-fat/egg/macholib/MachOGraph.py", line 66, in run_file m = self.createNode(MachO, pathname) File "build/bdist.macosx-10.3-fat/egg/macholib/MachOStandalone.py", line 23, in createNode res = super(FilteredMachOGraph, self).createNode(cls, name) File "build/bdist.macosx-10.3-fat/egg/altgraph/ObjectGraph.py", line 148, in createNode m = cls(name, *args, **kw) File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 63, in __init__ self.load(file(filename, 'rb')) File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 73, in load self.load_fat(fh) File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 84, in load_fat self.load_header(fh, arch.offset, arch.size) File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 108, in load_header hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian) File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 148, in __init__ self.load(fh) File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 169, in load self.filetype = MH_FILETYPE_SHORTNAMES[header.filetype] KeyError: 10L > /Users/polster/workspace/vpntool/build/bdist.macosx-10.3-fat/egg/macholib/MachO.py(169)load() -- Akos Polster mailto:akos at pipacs.com http://akos.pipacs.com From chris.van.bael at gmail.com Sun Mar 22 14:22:56 2009 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Sun, 22 Mar 2009 14:22:56 +0100 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: <49BFCE08.6020409@noaa.gov> References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> <49BEAB6B.2070301@noaa.gov> <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> <49BFCE08.6020409@noaa.gov> Message-ID: <5465ee790903220622m7897dfcch7e8d838e6b4292bc@mail.gmail.com> Hi, some simple questions: - if I installed another Python, how can I start it? Whenever I open a terminal and type "python", I get Python 2.5.1, which I assume is the Python from Apple. - On Windows there is the directory /Lib/site-packages, I can't find this one on my Mac. Spotlight isn't much help there either, do I have to change anything in it so that it will find those directories? Thanks, Chris On Tue, Mar 17, 2009 at 5:21 PM, Christopher Barker wrote: > Chris Van Bael wrote: >> >> So if it says blabla_python2.5_osx10.5. >> and I have installed Python 2.5 next to the systems' 2.5, it will >> install it in Python 2.5 from Python.org? > > Probably, but the only way top know is to read the docs that came with it > (or try it and see what happens). > > If it says os-X10.5 there is a good chance it's for the system python, as > the python-org one is not 10.5 dependent. However, you can build a 10.5-only > extension for the python.org python, so really, the only way to know is to > see what the person that built it says it is for. > > -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 nad at acm.org Sun Mar 22 20:23:54 2009 From: nad at acm.org (Ned Deily) Date: Sun, 22 Mar 2009 12:23:54 -0700 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> <49BEAB6B.2070301@noaa.gov> <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> <49BFCE08.6020409@noaa.gov> <5465ee790903220622m7897dfcch7e8d838e6b4292bc@mail.gmail.com> Message-ID: In article <5465ee790903220622m7897dfcch7e8d838e6b4292bc at mail.gmail.com>, Chris Van Bael wrote: > some simple questions: > - if I installed another Python, how can I start it? Whenever I open > a terminal and type "python", I get Python 2.5.1, which I assume is > the Python from Apple. > - On Windows there is the directory /Lib/site-packages, I can't find > this one on my Mac. For python.org installers, each python major version lives in its own framework sub-tree rooted at: /Library/Frameworks/Python.framework/Versions/m.n/ where m.n is 2.5, 2.6, 3.0, etc. At the top level of each version's subtree, there are bin, lib, include and other directories. You'll find a pythonm.n executable and a python symlink to it in the bin directory. Site packages for each version reside within its subtree lib directory but normally you don't need to manipulate those directly. By default, distutils (and its users, easy_install, pip, virtualenv et al) will install extensions to the right site-library by running under the setup.py script or easy_install or pip under the appropriate version of the python executable. Extension scripts will also be installed in the corresponding bin directory. So to select which python you want to start, you can invoke it directly with: /Library/Frameworks/Python.framework/Versions/2.5/bin/python or modify your shell path to ensure that bin directory comes before /usr/bin where the Apple-supplied python resides. Or create a shell alias to it. Or use /usr/local/bin/pythonm.n because the python.org 2.x installers create a link there by default - but beware because (1) that doesn't help for installed scripts, (2) can be confusing with multiple versions, and (3) by default the 3.x installers do not create that link. For development environments with multiple versions, a good solution these days is to use virtualenv. Jesse Noller has a very good overview of how to do that here: Again, all of the above applies to python.org installers. For the record, the Apple-supplied python uses a more elaborate framework scheme, split between /System/Library/Frameworks and /Library/Python, with different defaults. macports uses a framework scheme rooted at /opt/local/Library/Frameworks. And fink python installs are more debian-y style non-framework layouts in /sw/{bin,lib,...}. -- Ned Deily, nad at acm.org From chris.van.bael at gmail.com Sun Mar 22 20:37:16 2009 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Sun, 22 Mar 2009 20:37:16 +0100 Subject: [Pythonmac-SIG] Python PyGame GTK SQLAlchemy on Leopard In-Reply-To: References: <5465ee790903131239y25b7b916o571df55ffd05bae5@mail.gmail.com> <49BE8037.5000305@noaa.gov> <5465ee790903161228p3a2dc2e8ie0f2e0f9eff7453a@mail.gmail.com> <49BEAB6B.2070301@noaa.gov> <5465ee790903170118n4f6abfbi465964c8d3438507@mail.gmail.com> <49BFCE08.6020409@noaa.gov> <5465ee790903220622m7897dfcch7e8d838e6b4292bc@mail.gmail.com> Message-ID: <5465ee790903221237o1384fe86v6af78e5c602a74fc@mail.gmail.com> Hi, thanks for the comprehensive explanation! It clarifies things a lot. Chris On Sun, Mar 22, 2009 at 8:23 PM, Ned Deily wrote: > In article > <5465ee790903220622m7897dfcch7e8d838e6b4292bc at mail.gmail.com>, > ?Chris Van Bael wrote: >> some simple questions: >> - if I installed another Python, how can I start it? ?Whenever I open >> a terminal and type "python", I get Python 2.5.1, which I assume is >> the Python from Apple. >> - On Windows there is the directory /Lib/site-packages, I can't find >> this one on my Mac. > > For python.org installers, each python major version lives in its own > framework sub-tree rooted at: > > /Library/Frameworks/Python.framework/Versions/m.n/ > > where m.n is 2.5, 2.6, 3.0, etc. > > At the top level of each version's subtree, there are bin, lib, include > and other directories. ? You'll find a pythonm.n executable and a python > symlink to it in the bin directory. > > Site packages for each version reside within its subtree lib directory > but normally you don't need to manipulate those directly. ?By default, > distutils (and its users, easy_install, pip, virtualenv et al) will > install extensions to the right site-library by running under the > setup.py script or easy_install or pip under the appropriate version of > the python executable. ?Extension scripts will also be installed in the > corresponding bin directory. > > So to select which python you want to start, you can invoke it directly > with: > > /Library/Frameworks/Python.framework/Versions/2.5/bin/python > > or modify your shell path to ensure that bin directory comes before > /usr/bin where the Apple-supplied python resides. ?Or create a shell > alias to it. ?Or use /usr/local/bin/pythonm.n because the python.org 2.x > installers create a link there by default - but beware because (1) that > doesn't help for installed scripts, (2) can be confusing with multiple > versions, and (3) by default the 3.x installers do not create that link. > > For development environments with multiple versions, a good solution > these days is to use virtualenv. ?Jesse Noller has a very good overview > of how to do that here: > > > > Again, all of the above applies to python.org installers. ?For the > record, the Apple-supplied python uses a more elaborate framework > scheme, split between /System/Library/Frameworks and /Library/Python, > with different defaults. ?macports uses a framework scheme rooted at > /opt/local/Library/Frameworks. And fink python installs are more > debian-y style non-framework layouts in /sw/{bin,lib,...}. > > -- > ?Ned Deily, > ?nad at acm.org > > _______________________________________________ > Pythonmac-SIG maillist ?- ?Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From p at ulmcnett.com Tue Mar 24 05:38:24 2009 From: p at ulmcnett.com (Paul McNett) Date: Mon, 23 Mar 2009 21:38:24 -0700 Subject: [Pythonmac-SIG] py2app traceback with wxPython 2.8.9.2 Message-ID: <49C863C0.2010606@ulmcnett.com> Hi, I get a traceback running py2app with wxPython 2.8.9.2, but not with wxPython 2.8.9.1. Here's the traceback: copying /Library/Frameworks/Python.framework/Versions/2.5/lib/libncurses.5.dylib -> /Users/pmcnett/py/sbs/shutter_studio/trunk/clients/shutter_studio/dist/SBS Studio.app/Contents/Frameworks Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.dev_r954-py2.5.egg/py2app/build_app.py", line 530, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.dev_r954-py2.5.egg/py2app/build_app.py", line 601, 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-0.3.dev_r954-py2.5.egg/py2app/build_app.py", line 709, in create_binaries platfiles = mm.run() File "build/bdist.macosx-10.3-i386/egg/macholib/MachOStandalone.py", line 102, in run mm.run_file(fn) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 66, in run_file m = self.createNode(MachO, pathname) File "build/bdist.macosx-10.3-i386/egg/macholib/MachOStandalone.py", line 23, in createNode res = super(FilteredMachOGraph, self).createNode(cls, name) File "build/bdist.macosx-10.3-i386/egg/altgraph/ObjectGraph.py", line 148, in createNode m = cls(name, *args, **kw) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 61, in __init__ self.load(file(filename, 'rb')) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 71, in load self.load_fat(fh) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 82, in load_fat self.load_header(fh, arch.offset, arch.size) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 106, in load_header hdr = MachOHeader(self, fh, offset, size, magic, hdr, endian) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 146, in __init__ self.load(fh) File "build/bdist.macosx-10.3-i386/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 > /Users/pmcnett/py/sbs/shutter_studio/trunk/clients/shutter_studio/build/bdist.macosx-10.3-i386/egg/macholib/MachO.py(178)load() (Pdb) Everything is the same, except the wxPython version. Any ideas? Paul From ronaldoussoren at mac.com Tue Mar 24 08:23:38 2009 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 24 Mar 2009 08:23:38 +0100 Subject: [Pythonmac-SIG] py2app KeyError In-Reply-To: <49C28E84.1030403@pipacs.com> References: <49C28E84.1030403@pipacs.com> Message-ID: <19D6B57C-3899-4E9B-81D0-3C0A01E9356C@mac.com> On 19 Mar, 2009, at 19:27, Akos Polster wrote: > Hi, > > I'm getting KeyError in py2app since I've upgraded Qt to 4.5 plus > sip and PyQt to the latest nightbuilds. The OS is 10.4,11. This is > of course most likely related to the changes in Qt etc. but I don't > even know where to look. > > Any ideas? Qt seems to contain files that macholib doesn't know about yet. The repository seems to contain some support for that filetype though, you could try to install macholib from the repository (easy_install macholib==dev) to see if that fixes the issue. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From akos at pipacs.com Wed Mar 25 00:52:51 2009 From: akos at pipacs.com (Akos Polster) Date: Wed, 25 Mar 2009 00:52:51 +0100 Subject: [Pythonmac-SIG] py2app KeyError In-Reply-To: <19D6B57C-3899-4E9B-81D0-3C0A01E9356C@mac.com> References: <49C28E84.1030403@pipacs.com> <19D6B57C-3899-4E9B-81D0-3C0A01E9356C@mac.com> Message-ID: <49C97253.4070605@pipacs.com> > Qt seems to contain files that macholib doesn't know about yet. The > repository seems to contain some support for that filetype though, you > could try to install macholib from the repository (easy_install > macholib==dev) to see if that fixes the issue. Thanks Ronald. The repository version of macholib does indeed support that file type. Problem solved! ~ Akos. -- Akos Polster mailto:akos at pipacs.com http://akos.pipacs.com From luis.kop at gmail.com Wed Mar 25 01:13:59 2009 From: luis.kop at gmail.com (Luis A. Bastiao Silva) Date: Wed, 25 Mar 2009 00:13:59 +0000 Subject: [Pythonmac-SIG] Header too long - error Message-ID: <277c20420903241713n349732c6kb05e14db00d72564@mail.gmail.com> Hi everyone, I have a error when i'm trying make a bundle: copying /opt/local/lib/libgtk-x11-2.0.0.dylib -> /Users/luis/Documents/Projects/umit/umit-svn/trunk/dist/umit.app/Contents/Frameworks WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate WARNING: Mach-O header may be too large to relocate Traceback (most recent call last): File "/opt/local/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 587, in _run self.run_normal() File "/opt/local/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 658, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/opt/local/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 775, in create_binaries platfiles = mm.run() File "build/bdist.macosx-10.5-i386/egg/macholib/MachOStandalone.py", line 135, in run node.write(f) File "build/bdist.macosx-10.5-i386/egg/macholib/MachO.py", line 113, in write header.write(f) File "build/bdist.macosx-10.5-i386/egg/macholib/MachO.py", line 304, in write self.synchronize_size() File "build/bdist.macosx-10.5-i386/egg/macholib/MachO.py", line 294, in synchronize_size raise ValueError("New Mach-O header is too large to relocate") ValueError: New Mach-O header is too large to relocate > /Users/luis/Documents/Projects/umit/umit-svn/trunk/build/bdist.macosx-10.5-i386/egg/macholib/MachO.py(294)synchronize_size() (Pdb) I have tried to use -headerpad_max_install and rebuild some libs and it seems works but the error insists in another package. I can't make a bundle because it seems like a circular rebuilding problem. What is this problem related? Is it fixable? I was reading the code of macholib but I didn't understand what is happening. Someone could help me? Best Regards, -- Lu?s A. Basti?o Silva -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimodisasha at yahoo.it Wed Mar 25 12:36:43 2009 From: massimodisasha at yahoo.it (massimo di stefano) Date: Wed, 25 Mar 2009 12:36:43 +0100 Subject: [Pythonmac-SIG] sqlite and python Message-ID: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> Hi All, i'm running python 2.5.1 on a mac osx 10.5.6 (the system pyrhon) i've problems to enable spatialite extension [1] in python using pysqlite2 maybe there are problems to enable the support for the dyn-extensions but i have no clue on how to fix it; i downloaded the sources for pysqlite2 from : https://launchpad.net/ubuntu/jaunty/+source/python-pysqlite2/2.5.0-2ubuntu1/+files/python-pysqlite2_2.5.0.orig.tar.gz Unlucky on OSX, the pysqlite don't recognize the sqlite spatial extension : these is the build log : http://www.geofemengineering.it/data/pysqlite_build_log.txt.zip tring it in python it don't works : macbook-pro-15-di-sasha:pysqlite-2.5.0 sasha$ python Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pysqlite2 import dbapi2 as sqlite Traceback (most recent call last): File "", line 1, in File "pysqlite2/dbapi2.py", line 27, in from pysqlite2._sqlite import * ImportError: No module named _sqlite >>> while on linux i can symply do : in the pysqlite source: > python setup.py build > sudo python setup.py install and test it on a spatialite database [2] downloaded from the spatialite sites test files: i create a file : test.py: ------------- from pysqlite2 import dbapi2 as sqlite DB = sqlite.connect('./test-2.3.sqlite'); DB.enable_load_extension(True); DB.execute('SELECT load_extension("libspatialite.so")'); DBCursor = DB.cursor() strSQL = 'SELECT Name, GeometryType(geometry), area(geometry) '; strSQL += 'FROM regions ORDER BY Area(geometry) DESC'; DBCursor.execute( strSQL ); for row in DBCursor: print( row[0] + ' ' + row[1] + ' ' + str(row[2]) DBCursor.close(); DB.close(); --------------- running it : > python test.py ------------------ SICILIA MULTIPOLYGON 26074081211.3 PIEMONTE MULTIPOLYGON 25391974998.1 SARDEGNA MULTIPOLYGON 24125601024.3 LOMBARDIA MULTIPOLYGON 24069782849.5 TOSCANA MULTIPOLYGON 22971611856.6 EMILIA-ROMAGNA MULTIPOLYGON 22112626674.3 PUGLIA MULTIPOLYGON 19535533607.9 VENETO MULTIPOLYGON 18091146695.8 LAZIO MULTIPOLYGON 17075567463.4 CALABRIA MULTIPOLYGON 15357477642.6 CAMPANIA MULTIPOLYGON 13671884537.6 TRENTINO-ALTO ADIGE MULTIPOLYGON 13636192197.0 ABRUZZI MULTIPOLYGON 10921890033.0 BASILICATA MULTIPOLYGON 10082620411.6 MARCHE MULTIPOLYGON 9801006025.43 UMBRIA MULTIPOLYGON 8511757763.65 FRIULI-VENEZIA GIULIA MULTIPOLYGON 7571067911.64 LIGURIA MULTIPOLYGON 5451586208.43 MOLISE MULTIPOLYGON 4534700124.13 VALLE D'AOSTA MULTIPOLYGON 3309252833.27 SAN MARINO MULTIPOLYGON 60108921.7828 ------------------ it works .... [1] - http://www.gaia-gis.it/spatialite/index.html [2] - test-2.3.7z have you any suggestion on what i need to get it working on osx too ? thanks a lot for any help! Massimo Di Stefano massimodisasha at yahoo.it epifanio on irc.freenode.net /join gfoss Massimo Di Stefano massimodisasha at yahoo.it epifanio on irc.freenode.net /join gfoss -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Wed Mar 25 16:49:27 2009 From: nad at acm.org (Ned Deily) Date: Wed, 25 Mar 2009 08:49:27 -0700 Subject: [Pythonmac-SIG] [pysqlite] sqlite and python References: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> Message-ID: In article <259915B3-3A8A-495D-BB47-5094A122A6CC at yahoo.it>, massimo di stefano wrote: > i'm running python 2.5.1 on a mac osx 10.5.6 (the system pyrhon) > i've problems to enable spatialite extension [1] [..] > have you any suggestion on what i need to get it working on osx too ? > thanks a lot for any help! -- Ned Deily, nad at acm.org From massimodisasha at yahoo.it Wed Mar 25 19:08:55 2009 From: massimodisasha at yahoo.it (massimo di stefano) Date: Wed, 25 Mar 2009 19:08:55 +0100 Subject: [Pythonmac-SIG] sqlite and python In-Reply-To: References: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> Message-ID: <2D7D319E-094D-4D0E-8DD9-9AD51056A003@yahoo.it> Hi Ned, All, i followed that way too, i downloaded the bynary version for pysqlite osx intel i copied all the files under : /Users/Shared/source/spatialite/ | bin/ | lib/ | include/ in my .bash_profile i added : LD_LIBRARY_PATH=/Users/Shared/source/spatialite/lib export LD_LIBRARY_PATH then i removed and reinstalled pysqlite : sudo rm -rf /Library/Python/2.5/site-packages/pysqlite2 /Library/ Python/2.5/site-packages/pysqlite-2.5.0-py2.5.egg-info quit terminal.app and open a new one, rebuild pysqlite, these the log : http://www.geofemengineering.it/pysqlite_osx_log_2.txt then in python : >>> from pysqlite2 import dbapi2 as sqlite Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.5/site-packages/pysqlite2/dbapi2.py", line 27, in from pysqlite2._sqlite import * ImportError: dlopen(/Library/Python/2.5/site-packages/pysqlite2/ _sqlite.so, 2): Symbol not found: _sqlite3_enable_load_extension Referenced from: /Library/Python/2.5/site-packages/pysqlite2/ _sqlite.so Expected in: dynamic lookup >>> p.s. [ i tried also to use : DYLD_LIBRARY_PATH=/Users/Shared/source/spatialite/lib export DYLD_LIBRARY_PATH that seems to be what man dyld suggest me to use] Massimo Di Stefano massimodisasha at yahoo.it epifanio on irc.freenode.net /join gfoss Il giorno 25/mar/09, alle ore 16:49, Ned Deily ha scritto: > In article <259915B3-3A8A-495D-BB47-5094A122A6CC at yahoo.it>, > massimo di stefano > wrote: >> i'm running python 2.5.1 on a mac osx 10.5.6 (the system pyrhon) >> i've problems to enable spatialite extension [1] > [..] >> have you any suggestion on what i need to get it working on osx too ? >> thanks a lot for any help! > > > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > list-pysqlite mailing list > list-pysqlite at lists.itsystementwicklung.de > http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.laloux at gmail.com Wed Mar 25 21:50:25 2009 From: martin.laloux at gmail.com (genemartin) Date: Wed, 25 Mar 2009 13:50:25 -0700 (PDT) Subject: [Pythonmac-SIG] sqlite and python In-Reply-To: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> References: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> Message-ID: <22710829.post@talk.nabble.com> In python 2.5 there is no pysqlite but sqlite3 use for test try: from sqlite3 import dbapi2 as sqlite # python 2.5 except: try: from pysqlite2 import dbapi2 as sqlite #python < 2.5 except: print 'This program requires pysqlite2\n',\ 'http://initd.org/tracker/pysqlite/' sys.exit(1) -- View this message in context: http://www.nabble.com/sqlite-and-python-tp22699806p22710829.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From nad at acm.org Wed Mar 25 21:56:22 2009 From: nad at acm.org (Ned Deily) Date: Wed, 25 Mar 2009 13:56:22 -0700 Subject: [Pythonmac-SIG] [pysqlite] sqlite and python References: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> <2D7D319E-094D-4D0E-8DD9-9AD51056A003@yahoo.it> Message-ID: In article <2D7D319E-094D-4D0E-8DD9-9AD51056A003 at yahoo.it>, massimo di stefano wrote: > i followed that way too, > > i downloaded the bynary version for pysqlite osx intel > i copied all the files under : > > /Users/Shared/source/spatialite/ > | > bin/ > | > lib/ > | > include/ > > > > > in my .bash_profile i added : > > LD_LIBRARY_PATH=/Users/Shared/source/spatialite/lib > export LD_LIBRARY_PATH > > > then i removed and reinstalled pysqlite : > > sudo rm -rf /Library/Python/2.5/site-packages/pysqlite2 /Library/ > Python/2.5/site-packages/pysqlite-2.5.0-py2.5.egg-info > > quit terminal.app and open a new one, > rebuild pysqlite, these the log : > > http://www.geofemengineering.it/pysqlite_osx_log_2.txt > > then in python : > > > >>> from pysqlite2 import dbapi2 as sqlite > Traceback (most recent call last): > File "", line 1, in > File "/Library/Python/2.5/site-packages/pysqlite2/dbapi2.py", line > 27, in > from pysqlite2._sqlite import * > ImportError: dlopen(/Library/Python/2.5/site-packages/pysqlite2/ > _sqlite.so, 2): Symbol not found: _sqlite3_enable_load_extension > Referenced from: /Library/Python/2.5/site-packages/pysqlite2/ > _sqlite.so > Expected in: dynamic lookup Ah, I see. As far as I know, pysqlite2 is just the python wrapper to a sqlite3 library, it doesn't include sqlite3 itself. Note, the cavaet in the spatialite install instructions: "the sqlite3 of standard distribution [10.5] doesn't supports the dynamic extension loading mechanism" So I think you'll need to download the sqlite3 (amalgamation?) source and build your own version along with pysqlite2. Hopefully, someone with more experience with sqlite3 can give a definitive answer. Good luck! -- Ned Deily, nad at acm.org From massimodisasha at yahoo.it Thu Mar 26 00:24:40 2009 From: massimodisasha at yahoo.it (massimo di stefano) Date: Thu, 26 Mar 2009 00:24:40 +0100 Subject: [Pythonmac-SIG] [pysqlite] sqlite and python In-Reply-To: References: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> <2D7D319E-094D-4D0E-8DD9-9AD51056A003@yahoo.it> Message-ID: Yes that's true, i've notice that the load extension module is enabled by default int sqlite version >= 3.3.6 osx leopard come with sqlite3 included in the system, but i'm not using it i'm using a customized version of sqlite that is avaiable here : http://www.kyngchaos.com/files/software/unixport/ download to the .dmg framework : http://www.kyngchaos.com/files/software/unixport/SQLite3_Framework-3.6.11-2.dmg Note : Includes the FTS3 search, ICU unicode, R-Tree indexing and Spatialite extensions, and Proxy Locking, Column Metadata and Memory Management features are enabled. if i type in a terminal : sqlite3 -version i've : macbook-pro-15-di-sasha:~ sasha$ sqlite3 -version 3.6.10 that is the framework version infact, which sqlite give me : macbook-pro-15-di-sasha:~ sasha$ which sqlite3 /Library/Frameworks/SQLite3.framework/Programs/sqlite3 while : locate sqlite3 give me the path to the system sqlite3 : .... /usr/bin/sqlite3 /usr/include/sqlite3.h /usr/include/sqlite3ext.h /usr/lib/libsqlite3.0.8.6.dylib /usr/lib/libsqlite3.0.dylib /usr/lib/libsqlite3.dylib /usr/lib/sqlite3 /usr/lib/sqlite3/libtclsqlite3.dylib /usr/lib/sqlite3/pkgIndex.tcl .... if i try to ask the version to the system sqlite3 i've : macbook-pro-15-di-sasha:~ sasha$ /usr/bin/sqlite3 -version 3.4.0 it is under version - 3.3.6 so it has the "load_extension" limitation so my opinion is that pysqlite detect the system version that is not able to load the extension, maybe a solution is to force pysqlite2 to use the right version () ... how can i force pysqlite to do it ? can i modify something in the source ? maybe in setup.cfg ??? the default setup.cfg is : [build_ext] #define= #include_dirs=/usr/local/include #library_dirs=/usr/local/lib libraries=sqlite3 define=SQLITE_OMIT_LOAD_EXTENSION can i change it to : [build_ext] #define= include_dirs=/Library/Frameworks/SQLite3.framework/Versions/3/Headers/ library_dirs=//Library/Frameworks/SQLite3.framework/Versions/3/unix/lib libraries=sqlite3 #define=SQLITE_OMIT_LOAD_EXTENSION thanks for any suggestion ciao, Massimo Il giorno 25/mar/09, alle ore 21:56, Ned Deily ha scritto: > In article <2D7D319E-094D-4D0E-8DD9-9AD51056A003 at yahoo.it>, > massimo di stefano > wrote: >> i followed that way too, >> >> i downloaded the bynary version for pysqlite osx intel >> i copied all the files under : >> >> /Users/Shared/source/spatialite/ >> | >> bin/ >> | >> lib/ >> | >> include/ >> >> >> >> >> in my .bash_profile i added : >> >> LD_LIBRARY_PATH=/Users/Shared/source/spatialite/lib >> export LD_LIBRARY_PATH >> >> >> then i removed and reinstalled pysqlite : >> >> sudo rm -rf /Library/Python/2.5/site-packages/pysqlite2 /Library/ >> Python/2.5/site-packages/pysqlite-2.5.0-py2.5.egg-info >> >> quit terminal.app and open a new one, >> rebuild pysqlite, these the log : >> >> http://www.geofemengineering.it/pysqlite_osx_log_2.txt >> >> then in python : >> >> >>>>> from pysqlite2 import dbapi2 as sqlite >> Traceback (most recent call last): >> File "", line 1, in >> File "/Library/Python/2.5/site-packages/pysqlite2/dbapi2.py", line >> 27, in >> from pysqlite2._sqlite import * >> ImportError: dlopen(/Library/Python/2.5/site-packages/pysqlite2/ >> _sqlite.so, 2): Symbol not found: _sqlite3_enable_load_extension >> Referenced from: /Library/Python/2.5/site-packages/pysqlite2/ >> _sqlite.so >> Expected in: dynamic lookup > > Ah, I see. As far as I know, pysqlite2 is just the python wrapper > to a > sqlite3 library, it doesn't include sqlite3 itself. Note, the > cavaet in > the spatialite install instructions: > > "the sqlite3 of standard distribution [10.5] doesn't supports the > dynamic extension loading mechanism" > > So I think you'll need to download the sqlite3 (amalgamation?) source > and build your own version along with pysqlite2. Hopefully, someone > with more experience with sqlite3 can give a definitive answer. > > Good luck! > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > list-pysqlite mailing list > list-pysqlite at lists.itsystementwicklung.de > http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com From Chris.Barker at noaa.gov Thu Mar 26 00:30:43 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 25 Mar 2009 16:30:43 -0700 Subject: [Pythonmac-SIG] MacPython sprint at PyCon In-Reply-To: References: Message-ID: <49CABEA3.2010601@noaa.gov> What's up with the sprint? I only see two of us listed now -- not even Ron is there ;-) I suppose the three of us can sit down and crank some stuff out As it stands there aren't any other sprints that grab my attention, but it would be nice to have a bigger group. Partly I'm wondering 'cause I need to know if I need to bring a Mac. By the way, if we're going to work on py2app, we could take a look at what bb-freeze is doing -- I think he's forked and added to modulegraph. -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 Thu Mar 26 00:48:22 2009 From: woklist at kyngchaos.com (William Kyngesburye) Date: Wed, 25 Mar 2009 18:48:22 -0500 Subject: [Pythonmac-SIG] [pysqlite] sqlite and python In-Reply-To: References: <259915B3-3A8A-495D-BB47-5094A122A6CC@yahoo.it> <2D7D319E-094D-4D0E-8DD9-9AD51056A003@yahoo.it> Message-ID: <9EF42B99-4783-4FD4-9C07-02C703D3070D@kyngchaos.com> On Mar 25, 2009, at 6:24 PM, massimo di stefano wrote: > if i type in a terminal : > > sqlite3 -version > > i've : > > macbook-pro-15-di-sasha:~ sasha$ sqlite3 -version > 3.6.10 > Odd that the 3.6.11 framework gives you a 3.6.10 version. I get 3.6.11. > can i change it to : > > [build_ext] > #define= > include_dirs=/Library/Frameworks/SQLite3.framework/Versions/3/Headers/ > library_dirs=//Library/Frameworks/SQLite3.framework/Versions/3/unix/ > lib > libraries=sqlite3 > #define=SQLITE_OMIT_LOAD_EXTENSION > Works for me. This looks like the way to do it. Though you might want to clean it up a bit (extra slashes): include_dirs=/Library/Frameworks/SQLite3.framework/Versions/3/Headers library_dirs=/Library/Frameworks/SQLite3.framework/Versions/3/unix/lib > ----- William Kyngesburye http://www.kyngchaos.com/ [Trillian] What are you supposed to do WITH a maniacally depressed robot? [Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer... - HitchHiker's Guide to the Galaxy From massimodisasha at yahoo.it Thu Mar 26 01:55:01 2009 From: massimodisasha at yahoo.it (massimo di stefano) Date: Thu, 26 Mar 2009 01:55:01 +0100 Subject: [Pythonmac-SIG] Osx and spatiallite support Message-ID: <11BCB363-EB23-4492-B983-03ABF50123D3@yahoo.it> OK :-) can i changing setup.cfg to : [build_ext] #define= include_dirs=/Library/Frameworks/SQLite3.framework/Versions/3/Headers library_dirs=//Library/Frameworks/SQLite3.framework/Versions/3/unix/lib libraries=sqlite3 #define=SQLITE_OMIT_LOAD_EXTENSION done the job :-D file test.py : from pysqlite2 import dbapi2 as sqlite DB = sqlite.connect('/Users/sasha/Documents/test-2.3.sqlite'); DB.enable_load_extension(True); DB.execute('SELECT load_extension("/Users/Shared/source/spatialite/lib/ libspatialite.dylib")'); DBCursor = DB.cursor() strSQL = 'SELECT Name, GeometryType(geometry), area(geometry) '; strSQL += 'FROM regions ORDER BY Area(geometry) DESC'; DBCursor.execute( strSQL ); for row in DBCursor: print row[0] + ' ' + row[1] + ' ' + str(row[2]) DBCursor.close(); DB.close(); macbook-pro-15-di-sasha:~ sasha$ python /Users/sasha/Documents/ spatialite.py SpatiaLite version ..: 2.2 Supported Extensions: - 'VirtualShape' [direct Shapefile access] - 'VirtualText' [direct CSV/TXT access] - 'RTree' [Spatial Index - R*Tree] - 'MbrCache' [Spatial Index - MBR cache] - 'SpatiaLite' [Spatial SQL - OGC] PROJ.4 Rel. 4.6.1, 21 August 2008 GEOS version 3.0.3-CAPI-1.4.2 SICILIA MULTIPOLYGON 26074081211.3 PIEMONTE POLYGON 25391974998.1 SARDEGNA MULTIPOLYGON 24125601024.3 LOMBARDIA POLYGON 24069782849.5 TOSCANA MULTIPOLYGON 22971611856.6 EMILIA-ROMAGNA MULTIPOLYGON 22112626674.3 PUGLIA MULTIPOLYGON 19535533607.9 VENETO MULTIPOLYGON 18091146695.8 LAZIO MULTIPOLYGON 17075567463.4 CALABRIA POLYGON 15357477642.6 CAMPANIA MULTIPOLYGON 13671884537.6 TRENTINO-ALTO ADIGE POLYGON 13636192197.0 ABRUZZI POLYGON 10921890033.0 BASILICATA POLYGON 10082620411.6 MARCHE POLYGON 9801006025.43 UMBRIA POLYGON 8511757763 POLYGON.65 FRIULI-VENEZIA GIULIA MULTIPOLYGON 7571067911.64 LIGURIA MULTIPOLYGON 5451586208.43 MOLISE POLYGON 4534700124.13 VALLE D'AOSTA 3309252833.27 SAN MARINO POLYGON 60108921.7828 macbook-pro-15-di-sasha:~ sasha$ thanks to All !!! Massimo Di Stefano massimodisasha at yahoo.it epifanio on irc.freenode.net /join gfoss Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com From nad at acm.org Thu Mar 26 02:30:38 2009 From: nad at acm.org (Ned Deily) Date: Wed, 25 Mar 2009 18:30:38 -0700 Subject: [Pythonmac-SIG] MacPython sprint at PyCon References: <49CABEA3.2010601@noaa.gov> Message-ID: In article <49CABEA3.2010601 at noaa.gov>, Christopher Barker wrote: > What's up with the sprint? I only see two of us listed now -- not even > Ron is there ;-) > > I suppose the three of us can sit down and crank some stuff out As it > stands there aren't any other sprints that grab my attention, but it > would be nice to have a bigger group. It would! > Partly I'm wondering 'cause I need to know if I need to bring a Mac. As opposed to a Windows laptop ? :=) (FWIW, I'll be mac-enabled.) -- Ned Deily, nad at acm.org From ronaldoussoren at mac.com Thu Mar 26 15:01:02 2009 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 26 Mar 2009 09:01:02 -0500 Subject: [Pythonmac-SIG] MacPython sprint at PyCon In-Reply-To: <49CABEA3.2010601@noaa.gov> References: <49CABEA3.2010601@noaa.gov> Message-ID: <82FE7F66-7B06-4456-A676-769208221E17@mac.com> On 25 Mar, 2009, at 18:30, Christopher Barker wrote: > What's up with the sprint? I only see two of us listed now -- not > even Ron is there ;-) I'm listed as the sprint leader, so yes I'll be there. > > I suppose the three of us can sit down and crank some stuff out As > it stands there aren't any other sprints that grab my attention, but > it would be nice to have a bigger group. > > Partly I'm wondering 'cause I need to know if I need to bring a Mac. Having a mac would definitely help in working on Mac-specific stuff. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From Chris.Barker at noaa.gov Thu Mar 26 17:28:52 2009 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 26 Mar 2009 09:28:52 -0700 Subject: [Pythonmac-SIG] MacPython sprint at PyCon In-Reply-To: References: <49CABEA3.2010601@noaa.gov> Message-ID: <49CBAD44.2020400@noaa.gov> Ned Deily wrote: >> Partly I'm wondering 'cause I need to know if I need to bring a Mac. > > As opposed to a Windows laptop ? That, or Linux -- I have a Mac Desktop and Windows/Linux laptop at work. My wife doesn't want me stealing her Mac laptop. I've got a loaner Mac laptop for work, and as we speak I'm installing the piles of extra stuff I need before running for a plane ---- XCode is HUGE! So I'll see you there, -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 rajanikanth at gmail.com Sat Mar 28 00:25:04 2009 From: rajanikanth at gmail.com (Rajanikanth Jammalamadaka) Date: Fri, 27 Mar 2009 16:25:04 -0700 Subject: [Pythonmac-SIG] How to prevent CommandError -609: connectionInvalid Message-ID: <84bdef3c0903271625v2ae33f7ei366513a4cab21abb@mail.gmail.com> Hi Could somebody tell me how to prevent this appscript.reference.CommandError: CommandError -609: connectionInvalid from happening. Is there a time out variable that I can increase? Thanks, Raj From hengist.podd at virgin.net Sat Mar 28 13:47:58 2009 From: hengist.podd at virgin.net (has) Date: Sat, 28 Mar 2009 12:47:58 +0000 Subject: [Pythonmac-SIG] How to prevent CommandError -609: connectionInvalid In-Reply-To: References: Message-ID: <6664FA75-8C53-42BF-B15A-713F76EB618C@virgin.net> Rajanikanth Jammalamadaka wrote: > Could somebody tell me how to prevent this > appscript.reference.CommandError: CommandError -609: connectionInvalid > > from happening. > > Is there a time out variable that I can increase? Assuming this is a genuine timeout error and not the target application unexpectedly quitting while handling an event [1], you can modify the timeout delay by adding a 'timeout' keyword argument to your command. See Chapter 11 of the appscript manual for details. HTH has [1] AESendMessage() often reports event timeout errors (-1712) incorrectly as connection invalid errors (-609). -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From darran at edmstudio.com Sun Mar 29 15:33:21 2009 From: darran at edmstudio.com (Darran Edmundson) Date: Mon, 30 Mar 2009 00:33:21 +1100 Subject: [Pythonmac-SIG] Python and/or CoreAnimation gurus wanted for large paid museum project ... Message-ID: <49CF78A1.7090909@edmstudio.com> Hi All, We are working on a large Australian museum project due to open in May and expecting more than 300,000 visitors per year. We urgently need a few more highly-skilled python programmers to help get us across the finish line. The 10,000 square foot of gallery space features - a 14-screen touch "table" interactive - a 270-degree cylindrical theatre of choreographed voxpops - touch interactives that solicit visitor opinions on museum content - RFID-enabled passes that, among other things, provide content for non-English speakers and accessibility to vision impaired visitors. - roughly 45 short films spread over 20 different viewing areas If this sounds interesting and you: - are a savvy python programmer with either pyObjC or Twisted experience, or - are an ObjectiveC guru with CoreAnimation experience and proficient in python and - are experienced in object-oriented software development - can work remotely as part of our globally-distributed team (our team has members in Czech Republic, London, Guernsey, Australia) - have access to a Mac for local development - are committed to unit testing (ideally test-driven-development) - are available for full-time employment from now through the end of May (and perhaps longer). - are comfortable with SVN and Trac then please contact me directly at darran at edmstudio.com. As part of your response, please provide - a resume, preferably focused on python and/or osx development - a code sample demonstrating your Twisted, pyObjC or Objc prowess - example of a unit test you've written - your availability - your desired hourly rate Note, we are after python and/or CoreAnimation gurus, not general python programmers with an interest in Mac. Cheers, Darran P.S. Apologies if the above "job posting" isn't welcome on the list; I looked but couldn't find any restrictions in this regard. From daryl.spitzer at gmail.com Sun Mar 29 18:18:02 2009 From: daryl.spitzer at gmail.com (Daryl Spitzer) Date: Sun, 29 Mar 2009 11:18:02 -0500 Subject: [Pythonmac-SIG] appscript install error using easy_install In-Reply-To: <84bdef3c0901222318n5219334cq6d16dffdb7f63609@mail.gmail.com> References: <84bdef3c0901222318n5219334cq6d16dffdb7f63609@mail.gmail.com> Message-ID: I just had the same problem. Did you find a solution? (I don't see any replies.) -- Daryl On Fri, Jan 23, 2009 at 2:18 AM, Rajanikanth Jammalamadaka wrote: > Hi! > > Does anybody know why I get this error? > sudo easy_install appscript > > Searching for appscript > Reading http://pypi.python.org/simple/appscript/ > Reading http://freespace.virgin.net/hamish.sanderson/appscript.html > Reading http://appscript.sourceforge.net > Best match: appscript 0.19.0 > Downloading http://pypi.python.org/packages/source/a/appscript/appscript-0.19.0.tar.gz#md5=d234c1f1b92290da9eb866f78f9a7343 > Processing appscript-0.19.0.tar.gz > Running appscript-0.19.0/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD > zip_safe flag not set; analyzing archive contents... > No eggs found in > /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD (setup > script problem?) > > > Thanks, > > Raj > _______________________________________________ > Pythonmac-SIG maillist ?- ?Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From rajanikanth at gmail.com Sun Mar 29 18:36:28 2009 From: rajanikanth at gmail.com (Rajanikanth Jammalamadaka) Date: Sun, 29 Mar 2009 09:36:28 -0700 Subject: [Pythonmac-SIG] appscript install error using easy_install In-Reply-To: References: <84bdef3c0901222318n5219334cq6d16dffdb7f63609@mail.gmail.com> Message-ID: <84bdef3c0903290936x5111852ejf201b67eb59391af@mail.gmail.com> Hi Daryl, Try this( It was suggested by Russell): You might make sure your easy_install and macholib are up to date: each_install-U macholib==dev If that fails and tells you to do a selfupdate then do that and try again. -- Russell Thanks, Rajanikanth On Sun, Mar 29, 2009 at 9:18 AM, Daryl Spitzer wrote: > I just had the same problem. ?Did you find a solution? ?(I don't see > any replies.) > > -- > Daryl > > > On Fri, Jan 23, 2009 at 2:18 AM, Rajanikanth Jammalamadaka > wrote: >> Hi! >> >> Does anybody know why I get this error? >> sudo easy_install appscript >> >> Searching for appscript >> Reading http://pypi.python.org/simple/appscript/ >> Reading http://freespace.virgin.net/hamish.sanderson/appscript.html >> Reading http://appscript.sourceforge.net >> Best match: appscript 0.19.0 >> Downloading http://pypi.python.org/packages/source/a/appscript/appscript-0.19.0.tar.gz#md5=d234c1f1b92290da9eb866f78f9a7343 >> Processing appscript-0.19.0.tar.gz >> Running appscript-0.19.0/setup.py -q bdist_egg --dist-dir >> /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD >> zip_safe flag not set; analyzing archive contents... >> No eggs found in >> /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD (setup >> script problem?) >> >> >> Thanks, >> >> Raj >> _______________________________________________ >> Pythonmac-SIG maillist ?- ?Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > -- Rajanikanth From daryl.spitzer at gmail.com Sun Mar 29 18:42:48 2009 From: daryl.spitzer at gmail.com (Daryl Spitzer) Date: Sun, 29 Mar 2009 11:42:48 -0500 Subject: [Pythonmac-SIG] appscript install error using easy_install In-Reply-To: <84bdef3c0903290936x5111852ejf201b67eb59391af@mail.gmail.com> References: <84bdef3c0901222318n5219334cq6d16dffdb7f63609@mail.gmail.com> <84bdef3c0903290936x5111852ejf201b67eb59391af@mail.gmail.com> Message-ID: Thanks for the quick reply Rajanikanth. I ran `sudo easy_install -U macholib==dev` (which I assume is what Russell intended) and got: Searching for macholib==dev Reading http://pypi.python.org/simple/macholib/ Reading http://undefined.org/python/#macholib Best match: macholib dev Downloading http://svn.pythonmac.org/macholib/macholib/trunk#egg=macholib-dev Doing subversion checkout from http://svn.pythonmac.org/macholib/macholib/trunk to /tmp/easy_install-mqZbAB/trunk Processing trunk Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-mqZbAB/trunk/egg-dist-tmp-L0G3fc The required version of setuptools (>=0.6c9) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using setuptools 0.6c7 (/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python)) error: Setup script exited with 2 So I then ran `sudo easy_install -U setuptools` and it seemed to work: Searching for setuptools Reading http://pypi.python.org/simple/setuptools/ Best match: setuptools 0.6c9 Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg#md5=fe67c3e5a17b12c0e7c541b7ea43a8e6 Processing setuptools-0.6c9-py2.5.egg Moving setuptools-0.6c9-py2.5.egg to /Library/Python/2.5/site-packages Adding setuptools 0.6c9 to easy-install.pth file Installing easy_install script to /usr/local/bin Installing easy_install-2.5 script to /usr/local/bin Installed /Library/Python/2.5/site-packages/setuptools-0.6c9-py2.5.egg Processing dependencies for setuptools Finished processing dependencies for setuptools I then ran `sudo easy_install -U macholib==dev` again, and got the same error. -- Daryl On Sun, Mar 29, 2009 at 11:36 AM, Rajanikanth Jammalamadaka wrote: > Hi Daryl, > > Try this( It was suggested by Russell): > > > You might make sure your easy_install and macholib are up to date: > > each_install-U macholib==dev > > If that fails and tells you to do a selfupdate then do that and try > again. > > -- Russell > > Thanks, > > Rajanikanth > > > On Sun, Mar 29, 2009 at 9:18 AM, Daryl Spitzer wrote: >> I just had the same problem. ?Did you find a solution? ?(I don't see >> any replies.) >> >> -- >> Daryl >> >> >> On Fri, Jan 23, 2009 at 2:18 AM, Rajanikanth Jammalamadaka >> wrote: >>> Hi! >>> >>> Does anybody know why I get this error? >>> sudo easy_install appscript >>> >>> Searching for appscript >>> Reading http://pypi.python.org/simple/appscript/ >>> Reading http://freespace.virgin.net/hamish.sanderson/appscript.html >>> Reading http://appscript.sourceforge.net >>> Best match: appscript 0.19.0 >>> Downloading http://pypi.python.org/packages/source/a/appscript/appscript-0.19.0.tar.gz#md5=d234c1f1b92290da9eb866f78f9a7343 >>> Processing appscript-0.19.0.tar.gz >>> Running appscript-0.19.0/setup.py -q bdist_egg --dist-dir >>> /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD >>> zip_safe flag not set; analyzing archive contents... >>> No eggs found in >>> /tmp/easy_install-2iBEHM/appscript-0.19.0/egg-dist-tmp-Xi3zVD (setup >>> script problem?) >>> >>> >>> Thanks, >>> >>> Raj >>> _______________________________________________ >>> Pythonmac-SIG maillist ?- ?Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>> >> > > > > -- > Rajanikanth > From herthaner11 at aol.com Sat Mar 28 13:01:34 2009 From: herthaner11 at aol.com (Adrian Franken) Date: Sat, 28 Mar 2009 13:01:34 +0100 Subject: [Pythonmac-SIG] little app Message-ID: hi I found your little tool python.app in my application folder but I was surprised what it is and what will it do with my system. could yuo explain shortly what it's trying to do and for what do I need it? thx From hengist.podd at virgin.net Mon Mar 30 01:19:21 2009 From: hengist.podd at virgin.net (has) Date: Mon, 30 Mar 2009 00:19:21 +0100 Subject: [Pythonmac-SIG] problem with easy_install appscript In-Reply-To: References: Message-ID: <8FDAA146-B823-4D03-B3A5-32C5D22FD692@virgin.net> On Mar 29, 2009, at 5:31 PM, Daryl Spitzer wrote: > Message body follows: > > I ran `sudo easy_install appscript` and got: > [...] > No eggs found in /tmp/easy_install-I69t5P/appscript-0.19.0/egg-dist- > tmp-Ufl4GP (setup script problem?) Is gcc (part of Apple's Xcode developer tools suite) installed? Have you put any non-fat dylibs on your system? (This was the previous poster's problem: they had built their own i386-only version of libPng which Carbon was seeing in /usr/local/lib instead of the fat version in /usr/lib. When setuptools tried to build a fat version of appscript, the linker failed when trying to find a PPC version of libPng.) Could you run it with the verbose option enabled and post the resulting output (the -q option suppresses the build logs, which might contain clues). easy_install error messages are lousy. Perhaps you could also speak to the setuptools developers? BTW, there are several binary eggs on pypi, so if you're installing appscript for the 10.5's default 2.5 installation or the python.org 2.5 or 2.6 framework distributions then it shouldn't need to build from source at all. (That said, I have my suspicions about easy_install's abilities to make the best choice when multiple options are available, but setuptools' shortcomings are a little beyond my ken.) HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From ronaldoussoren at mac.com Mon Mar 30 15:20:04 2009 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 30 Mar 2009 08:20:04 -0500 Subject: [Pythonmac-SIG] little app In-Reply-To: References: Message-ID: <55322AB5-635B-4118-BAF1-EA9DBD732A42@mac.com> On 28 Mar, 2009, at 7:01, Adrian Franken wrote: > hi > > I found your little tool python.app in my application folder but I > was surprised what it is and what will it do with my system. > could yuo explain shortly what it's trying to do and for what do I > need it? Python is a programming language (see http://www.python.org/ for a description). There is a Python.app in the Mac distribution of Python, but that's not installed in the Applications folder, the binary installer for Python on the python.org website does install some applications in a subfolder of your Appliations folder; one of which is 'IDLE' and that's a GUI editor for Python. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: