From kw at codebykevin.com Wed Jan 2 18:14:56 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 02 Jan 2008 12:14:56 -0500 Subject: [Pythonmac-SIG] Where to submit patches for py2app? Message-ID: <477BC690.1070809@codebykevin.com> I've assembled some updated files for the py2app recipe for PyQt 4 (sip.py) as well as an example file and setup.py. Where should these be submitted? Is Bob Ippolito still doing development work on py2app or has someone else taken over maintenance? -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Wed Jan 2 20:36:53 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 2 Jan 2008 20:36:53 +0100 Subject: [Pythonmac-SIG] Where to submit patches for py2app? In-Reply-To: <477BC690.1070809@codebykevin.com> References: <477BC690.1070809@codebykevin.com> Message-ID: <7750742D-1CED-48E0-B8F3-36E7E9F52429@mac.com> On 2 Jan, 2008, at 18:14, Kevin Walzer wrote: > I've assembled some updated files for the py2app recipe for PyQt 4 > (sip.py) as well as an example file and setup.py. Where should these > be > submitted? Is Bob Ippolito still doing development work on py2app or > has > someone else taken over maintenance? Nobody is doing serious work on py2app these days, luckily it mostly works just fine. That said, I have checkin privileges and Bob tends to react to patches as well. Patches send to either one of us tend to get looked at. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080102/c3ba620b/attachment.bin From janssen at parc.com Wed Jan 2 21:33:32 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 2 Jan 2008 12:33:32 PST Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> Message-ID: <08Jan2.123335pst."58696"@synergy1.parc.xerox.com> > Even though I've been an open source developer since long before the > word existed I find that I'm getting sick and tired of the reinvent- > the-world attitude that is far too common in the open source community. > > If I am new to Python on the Mac and I've played with Apple Python a > little, but as soon as I want to install one little add-on module I > have to first replace the whole existing Python with something new > (and not directly Apple-endorsed) I might just drop out. And at the > very least it's mightily inconvenient. Well said, Jack! I think supporting/fixing the Apple-supplied Python should be a goal. I certainly used the Tiger 'Apple' Python for everything, living with its various foibles, and I intend to do the same with Leopard. I can see why cutting edge developers might want to have other versions installed (I've got 2.6 and 3.0 on my Leopard machine, for instance), but all my normal software is developed against /usr/bin/python. Bill From ronaldoussoren at mac.com Thu Jan 3 14:22:56 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 3 Jan 2008 14:22:56 +0100 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <08Jan2.123335pst.58696@synergy1.parc.xerox.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> Message-ID: <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> Now that there are several people that want to support Apple's build of python: how do we go forward from here? I think we should start a small project for "MacPython Addons", this project will install: * Hotfix for distutils to ensure that distutils builds univeral binaries (32-bit only at first) * (possibly) hotfix to ensure that you can install '-fat-' eggs on 10.5 * /Applications/Python-2.5/IDLE.app In there future we could add other changes, such as a 'python64' command for running python in 64-bit code. IMHO this should be done only when we have patches python.org tree that enable 4-way universal builds on Leopard, otherwise we'd have a real risk of loosing these changes in a future version. Ronald On 2 Jan, 2008, at 21:33, Bill Janssen wrote: >> Even though I've been an open source developer since long before the >> word existed I find that I'm getting sick and tired of the reinvent- >> the-world attitude that is far too common in the open source >> community. >> >> If I am new to Python on the Mac and I've played with Apple Python a >> little, but as soon as I want to install one little add-on module I >> have to first replace the whole existing Python with something new >> (and not directly Apple-endorsed) I might just drop out. And at the >> very least it's mightily inconvenient. > > Well said, Jack! I think supporting/fixing the Apple-supplied Python > should be a goal. I certainly used the Tiger 'Apple' Python for > everything, living with its various foibles, and I intend to do the > same with Leopard. I can see why cutting edge developers might want > to have other versions installed (I've got 2.6 and 3.0 on my Leopard > machine, for instance), but all my normal software is developed > against /usr/bin/python. > > Bill -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080103/1a7cf79e/attachment.bin From a.h.jaffe at gmail.com Thu Jan 3 15:18:04 2008 From: a.h.jaffe at gmail.com (Andrew Jaffe) Date: Thu, 03 Jan 2008 14:18:04 +0000 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> Message-ID: Hi All, I'm not sure whether this is the correct thread/place for this, but is there any official "best practice" for Python under Leopard? I.E., should we still be using the MacPython framework build (since I assume that is more likely to track current python versions than the Apple build). Is this on the main python or macpython websites somewhere? Thanks, Andrew Ronald Oussoren wrote: > Now that there are several people that want to support Apple's build of > python: how do we go forward from here? > > I think we should start a small project for "MacPython Addons", this > project will install: > > * Hotfix for distutils to ensure that distutils builds univeral binaries > (32-bit only at first) > * (possibly) hotfix to ensure that you can install '-fat-' eggs on 10.5 > * /Applications/Python-2.5/IDLE.app > > In there future we could add other changes, such as a 'python64' command > for running python in 64-bit code. IMHO this should be done only when we > have patches python.org tree that enable 4-way universal builds on > Leopard, otherwise we'd have a real risk of loosing these changes in a > future version. > > Ronald > > On 2 Jan, 2008, at 21:33, Bill Janssen wrote: > >>> Even though I've been an open source developer since long before the >>> word existed I find that I'm getting sick and tired of the reinvent- >>> the-world attitude that is far too common in the open source community. >>> >>> If I am new to Python on the Mac and I've played with Apple Python a >>> little, but as soon as I want to install one little add-on module I >>> have to first replace the whole existing Python with something new >>> (and not directly Apple-endorsed) I might just drop out. And at the >>> very least it's mightily inconvenient. >> >> Well said, Jack! I think supporting/fixing the Apple-supplied Python >> should be a goal. I certainly used the Tiger 'Apple' Python for >> everything, living with its various foibles, and I intend to do the >> same with Leopard. I can see why cutting edge developers might want >> to have other versions installed (I've got 2.6 and 3.0 on my Leopard >> machine, for instance), but all my normal software is developed >> against /usr/bin/python. >> >> Bill > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ronaldoussoren at mac.com Thu Jan 3 16:43:29 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 3 Jan 2008 16:43:29 +0100 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> Message-ID: On 3 Jan, 2008, at 15:18, Andrew Jaffe wrote: > Hi All, > > I'm not sure whether this is the correct thread/place for this, but is > there any official "best practice" for Python under Leopard? This is the right thread for that (albeith one with a lame subject). > > > I.E., should we still be using the MacPython framework build (since I > assume that is more likely to track current python versions than the > Apple build). Is this on the main python or macpython websites > somewhere? At the moment Apple's build is a slightly patched [*] version of the current stable release of Python (that is 2.5.1), but with some small issues. AFAIK all issues are related to distutils and are easy to fix. My precious message was a call-to-arms to get a small package out that fixes the issues with Apple's build, which would result in a fully up- to-date python installation including all goodies that Apple ships (PyObjC, wxWidgets, Twisted-Core, ...) and without downloading several huge archives. Ronald [*] there is dtrace support in Apple's build and not in the official tree. > > > Thanks, > > Andrew > > > > Ronald Oussoren wrote: >> Now that there are several people that want to support Apple's >> build of >> python: how do we go forward from here? >> >> I think we should start a small project for "MacPython Addons", this >> project will install: >> >> * Hotfix for distutils to ensure that distutils builds univeral >> binaries >> (32-bit only at first) >> * (possibly) hotfix to ensure that you can install '-fat-' eggs on >> 10.5 >> * /Applications/Python-2.5/IDLE.app >> >> In there future we could add other changes, such as a 'python64' >> command >> for running python in 64-bit code. IMHO this should be done only >> when we >> have patches python.org tree that enable 4-way universal builds on >> Leopard, otherwise we'd have a real risk of loosing these changes >> in a >> future version. >> >> Ronald >> >> On 2 Jan, 2008, at 21:33, Bill Janssen wrote: >> >>>> Even though I've been an open source developer since long before >>>> the >>>> word existed I find that I'm getting sick and tired of the >>>> reinvent- >>>> the-world attitude that is far too common in the open source >>>> community. >>>> >>>> If I am new to Python on the Mac and I've played with Apple >>>> Python a >>>> little, but as soon as I want to install one little add-on module I >>>> have to first replace the whole existing Python with something new >>>> (and not directly Apple-endorsed) I might just drop out. And at the >>>> very least it's mightily inconvenient. >>> >>> Well said, Jack! I think supporting/fixing the Apple-supplied >>> Python >>> should be a goal. I certainly used the Tiger 'Apple' Python for >>> everything, living with its various foibles, and I intend to do the >>> same with Leopard. I can see why cutting edge developers might want >>> to have other versions installed (I've got 2.6 and 3.0 on my Leopard >>> machine, for instance), but all my normal software is developed >>> against /usr/bin/python. >>> >>> Bill >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080103/5344a7db/attachment.bin From a.h.jaffe at gmail.com Thu Jan 3 16:58:39 2008 From: a.h.jaffe at gmail.com (Andrew Jaffe) Date: Thu, 03 Jan 2008 15:58:39 +0000 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> Message-ID: <477D062F.9090806@gmail.com> Ronald Oussoren wrote: > > On 3 Jan, 2008, at 15:18, Andrew Jaffe wrote: >> >> I'm not sure whether this is the correct thread/place for this, but is >> there any official "best practice" for Python under Leopard? >> >> I.E., should we still be using the MacPython framework build (since I >> assume that is more likely to track current python versions than the >> Apple build). Is this on the main python or macpython websites somewhere? > > At the moment Apple's build is a slightly patched [*] version of the > current stable release of Python (that is 2.5.1), but with some small > issues. AFAIK all issues are related to distutils and are easy to fix. > My precious message was a call-to-arms to get a small package out that > fixes the issues with Apple's build, which would result in a fully > up-to-date python installation including all goodies that Apple ships > (PyObjC, wxWidgets, Twisted-Core, ...) and without downloading several > huge archives. Thanks! So will this be the the right thing to do in general? Will it possible to add/replace more up-to-date packages when they come out (E.G., numpy or even Python 2.6 if it predates the next OSX)? Or will the bleeding edge always require an external framework build? For such a build, how hard is it to add in the "goodies"? (I've got easy_install working for my framework build, for example and usually use that right now.) Andrew From Jack.Jansen at cwi.nl Thu Jan 3 17:03:40 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu, 3 Jan 2008 17:03:40 +0100 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> Message-ID: <69CB3D9E-EC19-459C-8262-3DC7B02CED0F@cwi.nl> On 3 jan 2008, at 14:22, Ronald Oussoren wrote: > Now that there are several people that want to support Apple's build > of python: how do we go forward from here? > > I think we should start a small project for "MacPython Addons", this > project will install: > > * Hotfix for distutils to ensure that distutils builds univeral > binaries (32-bit only at first) > * (possibly) hotfix to ensure that you can install '-fat-' eggs on > 10.5 > * /Applications/Python-2.5/IDLE.app I think that for "true" end users Idle is the only serious omission. The first one is really for developers only, and the second one doesn't really become important until such fat eggs become widely available (which they are not right now, IIRC). Hmm, idea to keep this manageable: how much work would it be to create tiny installers for each of these hotfixes, and then have a umbrella installer that encompasses all of these? That way, as new problems surface the only work would be to create a hotfix installer for that single problem and do a tiny update to the umbrella installer. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From ronaldoussoren at mac.com Thu Jan 3 17:27:49 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 3 Jan 2008 17:27:49 +0100 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <69CB3D9E-EC19-459C-8262-3DC7B02CED0F@cwi.nl> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> <69CB3D9E-EC19-459C-8262-3DC7B02CED0F@cwi.nl> Message-ID: <3E969FA9-12D8-4ABB-AFDA-E4D396018154@mac.com> On 3 Jan, 2008, at 17:03, Jack Jansen wrote: > > On 3 jan 2008, at 14:22, Ronald Oussoren wrote: > >> Now that there are several people that want to support Apple's >> build of python: how do we go forward from here? >> >> I think we should start a small project for "MacPython Addons", >> this project will install: >> >> * Hotfix for distutils to ensure that distutils builds univeral >> binaries (32-bit only at first) >> * (possibly) hotfix to ensure that you can install '-fat-' eggs on >> 10.5 >> * /Applications/Python-2.5/IDLE.app > > > I think that for "true" end users Idle is the only serious omission. > The first one is really for developers only, and the second one > doesn't really become important until such fat eggs become widely > available (which they are not right now, IIRC). I need to check on an unpatched system, but I'm pretty sure that setuptools will refuse to install fat eggs at the moment, and that is something that will bite causal developers (e.g. you install something like turbogears and will complain about missing eggs). > > > Hmm, idea to keep this manageable: how much work would it be to > create tiny installers for each of these hotfixes, and then have a > umbrella installer that encompasses all of these? That way, as new > problems surface the only work would be to create a hotfix installer > for that single problem and do a tiny update to the umbrella > installer. I want to do whatever keeps my live as easy as possible, either an umbrella package with small hotfix packages or one package that installs all hotfixes. I also want to keep the addon package as small as possible and don't want to end up shipping a package that patches Apple's install to 2.5.2 (whenever that is released). Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080103/05fe767e/attachment.bin From Chris.Barker at noaa.gov Thu Jan 3 18:39:53 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 03 Jan 2008 09:39:53 -0800 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> Message-ID: <477D1DE9.8030603@noaa.gov> Ronald Oussoren wrote: > I think we should start a small project for "MacPython Addons", This looks very promising. Thanks for getting it going. > this project will install: > > * Hotfix for distutils to ensure that distutils builds univeral > binaries (32-bit only at first) * (possibly) hotfix to ensure that > you can install '-fat-' eggs on 10.5 * > /Applications/Python-2.5/IDLE.app I don't have 10.5, so I'm only going on my memory of issues people have complained about on various mailing lists: * How about readline? * What about people installing upgrades to packages? IIUC, the Apple python puts stuff in a dir that is before site-packages, so if you install a newer version of a package that Apple already had, it won't be used without sys.path manipulations. I think numpy was the example at hand, but assume the same issue would apply to wxPython etc. Also, if people do upgrade packages like numpy or wxPython, or ???, might that break any Apple system stuff if there are backward compatibility issues? * Will this allow folks to build a package (or egg) on 10.5 with Apple's Python, and have it work with the Framework 2.5 python on 10.4? (and vice-versa?) * Will py2app bundle up Apple's python, or assume it exists? If it doesn't, then will it know which packages to bundle? I now I came across as a negative whiner about Apple's python early in this thread, but I think we all have the same goal here -- make it easy to use for newbies, and have it be as little work for the folks doing the real work on MacPython (not me!). If all (or most) of the issues can be resolved with the Apple supplied python, I'm all for it. Andrew Jaffe wrote: > is > there any official "best practice" for Python under Leopard? That is exactly what is being discussed here. If I have it right, then Ronald is proposing that a modest "hotfix" package will solve the few issues with the Python Apple supplies with 10.5, so we, as a community, can declare using it as a "best practice". We can then update the appropriate Wiki pages (and that I could actually help with!) Jack Jansen wrote: > I think that for "true" end users Idle is the only serious omission. This is where I disagree -- what is a "true" end user? It's a complete continuum, from total newbie to hard-core hack-at-the-cpython-source developer. And, indeed, we hope that the newbies will move up the continuum as they get more experience. > The first one is really for developers only, Who is a "developer?". I agree that folks like Ronald (for PyobjC) and Robin Dunn (for wxPython), can patch their systems to build binary packages the way they want. However, a LOT of binary packages for OS-X are build by folks different than the people developing the packages. These vary from newbies that download a tarball with instructions to type: "setup.py install", to folks like me that are less newbie, but really want a one-way-to-do-it package that I can give to my colleagues etc, and have it run on multiple systems, to folks that are trying to get an app bundled up with py2app that lots of other folks can run. Ever since OS-X began, the net has been littered with various binary packages for python that are all compatible with different pythons: Apple's, fink, darwinports, Intel Only, PPC only,etc, etc, etc. It really will do the community a lot of good to consolidate that as much as possible, and having the "best practices" python build the "right" kind of package by default is critical to this. Someone wanting to build and distribute a packages needs to be able to find instructions not more complicated than: 1) Download and install this: [hotfix package] 2) setup.py build 3) bdist_mpgk (or whatever the setuptools command is to build a binary egg) > and the second one doesn't > really become important until such fat eggs become widely available > (which they are not right now, IIRC). I don't know how you define widely, but they are becoming available -- matplotlib, scipy, numpy, etc. -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 Jan 3 18:40:12 2008 From: woklist at kyngchaos.com (William Kyngesburye) Date: Thu, 3 Jan 2008 11:40:12 -0600 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <3E969FA9-12D8-4ABB-AFDA-E4D396018154@mac.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> <69CB3D9E-EC19-459C-8262-3DC7B02CED0F@cwi.nl> <3E969FA9-12D8-4ABB-AFDA-E4D396018154@mac.com> Message-ID: <2B3B13BE-CCC6-4AE9-8105-C89EDC0879D5@kyngchaos.com> On Jan 3, 2008, at 10:27 AM, Ronald Oussoren wrote: >> I think that for "true" end users Idle is the only serious >> omission. The first one is really for developers only, and the >> second one doesn't really become important until such fat eggs >> become widely available (which they are not right now, IIRC). > > I need to check on an unpatched system, but I'm pretty sure that > setuptools will refuse to install fat eggs at the moment, and that > is something that will bite causal developers (e.g. you install > something like turbogears and will complain about missing eggs). >> It seems to be working for me. Some source I compiled builds a python wrapper (swig-based), which also depends on numpy. I used ARCHFLAGS to build quad-arch: export ARCHFLAGS="-arch ppc -arch i386 -arch ppc64 -arch x86_64" With "make install" it uses setup.py's setup(), which works with no errors. The zipped egg the build process generates also installs with easy_install with no errors. The egg is named with only the build system's arch, i386. I don't see anything in the egg-info or easy- install.pth that identifies the architectures, other than the egg name. I haven't done any patching to the system's python. ----- William Kyngesburye http://www.kyngchaos.com/ All generalizations are dangerous, even this one. From janssen at parc.com Thu Jan 3 18:42:45 2008 From: janssen at parc.com (Bill Janssen) Date: Thu, 3 Jan 2008 09:42:45 PST Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> Message-ID: <08Jan3.094249pst."58696"@synergy1.parc.xerox.com> > * Hotfix for distutils to ensure that distutils builds univeral > binaries (32-bit only at first) Is there a bug # for this? Possibly with a patch that we could start with :-? Bill From tobias.rodaebel at mac.com Thu Jan 3 19:28:06 2008 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Thu, 3 Jan 2008 19:28:06 +0100 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <3E969FA9-12D8-4ABB-AFDA-E4D396018154@mac.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> <69CB3D9E-EC19-459C-8262-3DC7B02CED0F@cwi.nl> <3E969FA9-12D8-4ABB-AFDA-E4D396018154@mac.com> Message-ID: <44B1A96A-0F4E-4029-9721-6F164B473768@mac.com> On Jan 3, 2008, at 5:27 PM, Ronald Oussoren wrote: > I want to do whatever keeps my live as easy as possible, either an > umbrella package with small hotfix packages or one package that > installs all hotfixes. I also want to keep the addon package as > small as possible and don't want to end up shipping a package that > patches Apple's install to 2.5.2 (whenever that is released). Sounds great! BTW, we had a very inspiring discussion on the zope3-dev list last summer regarding system python for *development*. Most people there prefer a separate python tree for each (zope) project. http://www.mail-archive.com/zope3-dev at zope.org/msg08490.html A current Zope Components (formerly known as Zope3) based Application crashes with Leopard's system python because of the twisted package, which brings in a dated zope.interface egg (BTW, the unpacked egg as well). I'm extensively using zc.buildout for my projects. And not only for zope development. I love to have an unpolluted reconstructible python environment for each project and leaving the system python untouched. I am now thinking about setting up a buildout for Leopard's python. Cheers, Tobias From ronaldoussoren at mac.com Thu Jan 3 20:33:21 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 3 Jan 2008 20:33:21 +0100 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <08Jan3.094249pst.58696@synergy1.parc.xerox.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> <08Jan3.094249pst.58696@synergy1.parc.xerox.com> Message-ID: On 3 Jan, 2008, at 18:42, Bill Janssen wrote: >> * Hotfix for distutils to ensure that distutils builds univeral >> binaries (32-bit only at first) > > Is there a bug # for this? Possibly with a patch that we could start > with :-? There is a fix in python's repository. I'll have to look up the details, but it was a bad version comparision (testing for <= 10.4. instead of >= 10.4 IIRC). I'm planning to start work on this next weekend, starting with the distutils issues. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080103/bc983760/attachment-0001.bin From ronaldoussoren at mac.com Thu Jan 3 20:36:09 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 3 Jan 2008 20:36:09 +0100 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <44B1A96A-0F4E-4029-9721-6F164B473768@mac.com> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> <69CB3D9E-EC19-459C-8262-3DC7B02CED0F@cwi.nl> <3E969FA9-12D8-4ABB-AFDA-E4D396018154@mac.com> <44B1A96A-0F4E-4029-9721-6F164B473768@mac.com> Message-ID: On 3 Jan, 2008, at 19:28, Tobias Rod?bel wrote: > On Jan 3, 2008, at 5:27 PM, Ronald Oussoren wrote: > >> I want to do whatever keeps my live as easy as possible, either an >> umbrella package with small hotfix packages or one package that >> installs all hotfixes. I also want to keep the addon package as >> small as possible and don't want to end up shipping a package that >> patches Apple's install to 2.5.2 (whenever that is released). > > Sounds great! BTW, we had a very inspiring discussion on the zope3- > dev list last summer regarding system python for *development*. Most > people there prefer a separate python tree for each (zope) project. http://www.mail-archive.com/zope3-dev at zope.org/msg08490.html I'm starting to get hooked on virtualenv (to be found on pypi.python.org). This allows you to have seperate python trees based on a single installation. You can, but don't have to, share the global site-packages directory and every install has its own site-packages as well. This is very convenient when working on several projects, every one can have its own tree without having to install python several times. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080103/1b647fdb/attachment.bin From hengist.podd at virgin.net Thu Jan 3 22:06:44 2008 From: hengist.podd at virgin.net (has) Date: Thu, 3 Jan 2008 21:06:44 +0000 Subject: [Pythonmac-SIG] Leopard easy_install chokes on appscript egg In-Reply-To: <05E4CBF0-2278-4557-91CC-2B126D728817@mac.com> References: <1841BA35-DD9E-49D2-84EE-78265E3F9F27@virgin.net> <37752E4C-80C2-43DD-B021-0D9552C9167F@mac.com> <9E1E9264-D03A-4168-A3E9-E6C96A5BA442@virgin.net> <05E4CBF0-2278-4557-91CC-2B126D728817@mac.com> Message-ID: <97322C3F-209B-44B9-A9D6-6831446DEAAE@virgin.net> On 31 Dec 2007, at 14:09, Ronald Oussoren wrote: [cc.d to Bob for his info] >>> That's a buglet in Python, fixed in what will be 2.5.2. Apple's >>> python doesn't do universal binaries and setuptools doesn't know >>> that an 'fat' egg will do on a 'ppc' or 'i386' platform. After further poking, it does appear as if 10.5's Python is building extensions as UBs; it's just misnaming the eggs as ppc/i386. >> OK, ta. Any advice on creating .eggs that will work for 10.5's >> brain-damaged Python install, both for PPC and i386? (While I have >> 10.4 on both PPC and i386, I have 10.5 on i386 only.) > > Patching the Makefile for python is probably the easiest way, that > is add '-arch i386 -arch ppc' to BASECFLAGS and LDFLAGS and set > UNIVERSALSDK to '/' (otherwise the architecture will be wrong). You > might also have to patch distutils to work around a bug in there. Mmmmkay. I've decided to cheat, building a universal .egg for user-installed Python 2.5 and separate 'ppc' and 'i386' eggs for Leopard Python (I don't have 10.5 on PPC, so I made myself a PPC-only python interpreter and it seems to create 'ppc' eggs okay under Rosetta.) >>>> 2. I get the above traceback when easy_install tries to use the >>>> source- >>>> based appscript. [...] >>> >>> My guess is that this a buglet in setuptools sandboxing code. Can >>> you build an egg using Apple's python and install that (that is >>> run 'setup.py bdist_egg' and then install that egg. >> >> >> The following seems to work ok: >> >> cd appscript-0.18.0 >> /usr/bin/python setup.py bdist_egg >> cd dist >> /usr/bin/easy_install appscript* > > You might want to ask on distutils-sig at python.org about this. The error itself is occurring when importing the skipjunk function from py2app, so it might be best if Bob takes a look first to see if the problem is at py2app's end. In the meantime, I disabled the skipjunk-related bits from setup.py, and 'easy_install appscript' now works as intended. The bdist_mpkg option is broken, however (either due to removing that code or to other bugs), so I've just disabled the lot for now and slung up an 0.18.1 update on PyPI (I've still to update the sourceforge site though). Not entirely happy that I don't have a working binary installer available for Tiger's Python, but I don't have the time to be dealing with all this stuff right now (plus I just bought a new laptop and don't want to bounce it off the walls just yet). If anyone else has a bit of free time and wants to create a more satisfactory solution then be my guest; just drop us a note and I'll be happy to put it up. ... Anyway, assuming there's no more reports of problems in the next few days I'll call py-appscript-0.18.x a done deal [1]. If folks here would like to try installing appscript via 'easy_install appscript' in the next day or two and let me know if there's any more problems then I'd really appreciate it. Thanks again, has [1] Next step is 0.19.0, which is a significant stripping down and reorganisation of the current distribution and [hopefully] the long- awaited beta 1 release. -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From robin at alldunn.com Thu Jan 3 22:26:52 2008 From: robin at alldunn.com (Robin Dunn) Date: Thu, 03 Jan 2008 13:26:52 -0800 Subject: [Pythonmac-SIG] newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger In-Reply-To: <477D1DE9.8030603@noaa.gov> References: <65fadfc30712190650o3b19c79ap16a003aa14853d36@mail.gmail.com> <476947BF.5070300@noaa.gov> <65fadfc30712191042sc5ff9d9m374066e12f7d3245@mail.gmail.com> <47699959.9040302@noaa.gov> <5CD83E48-A39B-481C-85CD-92B095EA5637@cwi.nl> <08Jan2.123335pst.58696@synergy1.parc.xerox.com> <7DE74ED0-DF30-4C17-80ED-F6819AB3376F@mac.com> <477D1DE9.8030603@noaa.gov> Message-ID: <477D531C.6080803@alldunn.com> Christopher Barker wrote: > * What about people installing upgrades to packages? IIUC, the Apple > python puts stuff in a dir that is before site-packages, so if you > install a newer version of a package that Apple already had, it won't be > used without sys.path manipulations. I think numpy was the example at > hand, but assume the same issue would apply to wxPython etc. If the upgrade package is an egg then the new egg will be found first. If the upgraded package just drops itself into the standard or user site-packages or something then the Apple installed packages will be found first unless there is some manipulation of the path. $ /usr/bin/python -c "import sys,pprint; pprint.pprint(sys.path)" ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC', '/Users/robind/Library/Python/2.5/site-packages'] -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From kw at codebykevin.com Thu Jan 3 23:08:43 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 03 Jan 2008 17:08:43 -0500 Subject: [Pythonmac-SIG] Possibly OT: Get path to icon file for PIL? Message-ID: <477D5CEB.8020302@codebykevin.com> I'm looking for a Python API that will return the path to an icon file which I can then read via PIL and display in my application. The available API's that I can find--NSWorkspace and IconServices--provide various hooks to obtaining and displaying an icon, but neither appears to support finding the source file for an icon. For instance, I can use something like this in Cocoa to get an icon: NSWorkspace * ws = [NSWorkspace sharedWorkspace]; NSString * path = [ws fullPathForApplication:@"Safari"]; NSImage * icon = [ws iconForFile: path]; but while this obtains the icon data, it doesn't tell me where the original file is. My purpose here is to take advantage of PIL's ability to read icns files without having to rewrite my application entirely in PyObjC. Would another approach work? I've looked into using plistlib to parse plist files, but that seems too haphazard. AppleScript also lists an API for finding icons, but it's not implemented. Any advice is appreciated. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Fri Jan 4 07:45:12 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 4 Jan 2008 07:45:12 +0100 Subject: [Pythonmac-SIG] Possibly OT: Get path to icon file for PIL? In-Reply-To: <477D5CEB.8020302@codebykevin.com> References: <477D5CEB.8020302@codebykevin.com> Message-ID: <3C522C71-7CC3-4CC6-9A2E-DE00552CDB24@mac.com> On 3 Jan, 2008, at 23:08, Kevin Walzer wrote: > I'm looking for a Python API that will return the path to an icon file > which I can then read via PIL and display in my application. > > The available API's that I can find--NSWorkspace and > IconServices--provide various hooks to obtaining and displaying an > icon, > but neither appears to support finding the source file for an icon. > For > instance, I can use something like this in Cocoa to get an icon: > > NSWorkspace * ws = [NSWorkspace sharedWorkspace]; > NSString * path = [ws fullPathForApplication:@"Safari"]; > NSImage * icon = [ws iconForFile: path]; You can do this through the bundle API (open the bundle for an application, look up the name of the icon from the Info.plist and then locate that icon. Something like: path = ... bundle = NSBundle.bundleWithPath_(path) info = bundle.infoDictionary() iconName = info['CFBundleIconFile'] iconPath = bundle.pathForResource_ofType_(iconName, 'icns') Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080104/91a4933d/attachment.bin From j.m.h.thomas at dl.ac.uk Fri Jan 4 12:21:27 2008 From: j.m.h.thomas at dl.ac.uk (Jens Thomas) Date: Fri, 04 Jan 2008 11:21:27 +0000 Subject: [Pythonmac-SIG] Console window appearing when running application bundled with py2app Message-ID: <477E16B7.7070001@dl.ac.uk> Hello, I've (finally) managed to get everything in place to build my python/vtk/Tk application as a universal binary and have py2app (0.3.6) successfully bundle it into an app. However, when I run the application under the finder, in addition to my application, I get a small white window appearing with the title "console" when I run the application. This doesn't appear when I run the application from the terminal (i.e. execute the command "myapp.app/Contents/MacOS/myapp" ). I thought this might be something to do with the argv_emulation setting, but changing that has no effect. I've also checked the logs in the Console (i.e. /Applications/Utilities/Console.app) and there is no difference in the output generated by running the application either way, so I don't think the window is being triggered by an error condition. Can anyone suggest what might be causing this window to appear? Many thanks, Jens From ronaldoussoren at mac.com Fri Jan 4 13:21:41 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 04 Jan 2008 04:21:41 -0800 Subject: [Pythonmac-SIG] Console window appearing when running application bundled with py2app In-Reply-To: <477E16B7.7070001@dl.ac.uk> References: <477E16B7.7070001@dl.ac.uk> Message-ID: <07EF6244-0117-1000-8123-E9D769F3459C-Webmail-10007@mac.com> On Friday, January 04, 2008, at 12:37PM, "Jens Thomas" wrote: >Hello, > >I've (finally) managed to get everything in place to build my >python/vtk/Tk application as a universal binary and have py2app (0.3.6) >successfully bundle it into an app. That's a Tk artifact on OSX. You can hide that window using a function like this: def hideTkConsole(root): try: root.tk.call('console', 'hide') except Tkinter.TclError: # Some versions of the Tk framework don't have a console object pass This code is from IDLE. There are more Tk-on-OSX goodies in idlelib.macosxSupport. Ronald From j.m.h.thomas at dl.ac.uk Fri Jan 4 15:00:12 2008 From: j.m.h.thomas at dl.ac.uk (Jens Thomas) Date: Fri, 04 Jan 2008 14:00:12 +0000 Subject: [Pythonmac-SIG] Console window appearing when running application bundled with py2app In-Reply-To: <07EF6244-0117-1000-8123-E9D769F3459C-Webmail-10007@mac.com> References: <477E16B7.7070001@dl.ac.uk> <07EF6244-0117-1000-8123-E9D769F3459C-Webmail-10007@mac.com> Message-ID: <477E3BEC.1060905@dl.ac.uk> Ronald Oussoren wrote: > > On Friday, January 04, 2008, at 12:37PM, "Jens Thomas" wrote: > >> Hello, >> >> I've (finally) managed to get everything in place to build my >> python/vtk/Tk application as a universal binary and have py2app (0.3.6) >> successfully bundle it into an app. >> > > That's a Tk artifact on OSX. You can hide that window using a function like this: > > def hideTkConsole(root): > try: > root.tk.call('console', 'hide') > except Tkinter.TclError: > # Some versions of the Tk framework don't have a console object > pass > > > This code is from IDLE. There are more Tk-on-OSX goodies in idlelib.macosxSupport. > That's perfect - it does exactly what I was after. Many thanks for the quick response. Best wishes, Jens From kw at codebykevin.com Fri Jan 4 17:29:42 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 04 Jan 2008 11:29:42 -0500 Subject: [Pythonmac-SIG] Possibly OT: Get path to icon file for PIL? In-Reply-To: <3C522C71-7CC3-4CC6-9A2E-DE00552CDB24@mac.com> References: <477D5CEB.8020302@codebykevin.com> <3C522C71-7CC3-4CC6-9A2E-DE00552CDB24@mac.com> Message-ID: <477E5EF6.4070105@codebykevin.com> Ronald Oussoren wrote: > You can do this through the bundle API (open the bundle for an > application, look up the name of the icon from the Info.plist and then > locate that icon. > > Something like: > > path = ... > bundle = NSBundle.bundleWithPath_(path) > info = bundle.infoDictionary() > iconName = info['CFBundleIconFile'] > iconPath = bundle.pathForResource_ofType_(iconName, 'icns') > Thanks, I'll give this a try! I would probably have to add an extra step (getInfoForFile:application:type) to this to get the image for an arbitrary file type, but this looks promising. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ed_hartley at mac.com Sat Jan 5 12:43:39 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Sat, 5 Jan 2008 11:43:39 +0000 Subject: [Pythonmac-SIG] Console window appearing when running application bundled with py2app + delurk Message-ID: <7C1A5A63-09A2-46AD-88D8-BC5FE883BD40@mac.com> Thanks for this from me as well, I'd just hit the same issue. Cheers Ed From: Jens Thomas Date: 4 January 2008 14:00:12 GMT To: Ronald Oussoren Cc: Pythonmac-Sig Subject: Re: [Pythonmac-SIG] Console window appearing when running application bundled with py2app Ronald Oussoren wrote: > On Friday, January 04, 2008, at 12:37PM, "Jens Thomas" > wrote: > > >> Hello, >> >> I've (finally) managed to get everything in place to build my >> python/vtk/Tk application as a universal binary and have py2app >> (0.3.6) successfully bundle it into an app. >> >> > > That's a Tk artifact on OSX. You can hide that window using a > function like this: > > def hideTkConsole(root): > try: > root.tk.call('console', 'hide') > except Tkinter.TclError: > # Some versions of the Tk framework don't have a console > object > pass > > > This code is from IDLE. There are more Tk-on-OSX goodies in > idlelib.macosxSupport. > > That's perfect - it does exactly what I was after. Many thanks for the quick response. Best wishes, Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080105/0cb34d02/attachment.htm From pythonmac.sig at vrai.net Sat Jan 5 22:39:21 2008 From: pythonmac.sig at vrai.net (Vrai Stacey) Date: Sat, 5 Jan 2008 21:39:21 +0000 Subject: [Pythonmac-SIG] PyObjC quick start guide Message-ID: <200801052139.22066.pythonmac.sig@vrai.net> Hi, I've been playing around with PyObjC (the default version that ships with Leopard) but have hit a bit of a dead end. Does anyone know of a good guide to PyObjC that's aimed at experienced Python coders? I've found plenty of guides that are just step-by-step tutorials for building Cocoa applications, but these are far too simplistic to be of any use. What I'm after is something that explains how different types of method are called, the underlying Python structure of ObjC objects and *exactly* how/where PyObjC objects differ from vanilla Python objects. Obviously the differences occur because Objective C uses a different OO idiom to Python and so the bridged APIs don't 'fit' as well as ones written in (say) C++ would. However all the examples and tutorials I've been through get bogged down in "implement trivial application X" details and never go in to enough depth about *how* Python is wrapping the underlying objects. Specifically, I'm looking for documentation that can help me understand features like class method support. Take IOBluetooth.IOBluetoothDeviceInquiry for example. The documentation in XCode states that this class has a factory method inquiryWithDelegate, which you would use in Objective C as ... SomeDelegate * delegate; // ... instantiate delegate ... IOBluetoothDeviceInquiry * inquiry; inquiry = [IOBluetoothDeviceInquiry inquiryWithDelegate: delegate]; // ... handle null ... IOReturn retVal = [inquiry start]; Now in Python I'd expect that would translate to ... // ... import IOBluetooth bundle ... delegate = new SomeDelegate ( ) inquiry = IOBluetooth.IOBluetoothDeviceInquiry.inquiryWithDelegate_ \ ( delegate ) retVal = inquiry.start ( ) However there seems to be no sign of the class method. Instance methods are still present (e.g. initWithDelegate_) but not the class ones. Obviously they are there somewhere, but I've yet to find them and am somewhat frustrated that the tutorials I've found don't seem to cover the area (once I've figured it out I'll have to write my own :). Any pointers towards documentation would be greatly appreciated, vrai. From kw at codebykevin.com Mon Jan 7 20:05:46 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 07 Jan 2008 14:05:46 -0500 Subject: [Pythonmac-SIG] PIL icns plugin can't display icns file Message-ID: <4782780A.7080308@codebykevin.com> I'm testing Bob Ippolito's icns plugin for PIL, and am running into difficulty. I can't get an icon to display: in fact, Python crashes when I try to load the icon and display it. Here is a test script, using a Tkinter GUI (Python 2.5.1, Tk 8.5, OS X 10.5.1): --- from Tkinter import * import Image, ImageTk root = Tk() im = Image.open('/Users/kevin/Desktop/vuman.icns') newim = im.resize((16, 16)) labelimage = ImageTk.PhotoImage(newim) w = Label(root, text="My Test Icon", image=labelimage, width=100) w.image=labelimage w.pack() mainloop() --- And here's the crash message in Terminal: Macintosh:Desktop kevin$ python iconlabel.py alloc: invalid block: 0x5c32b4: 5d 0 0 Abort trap I'm not sure what is causing Python to barf here. PIL is supposed to be able to create valid Tkinter photo objects, so I don't think the issue is with Tk not recognizing the icns format. Any suggestions? -- Kevin Walzer Code by Kevin http://www.codebykevin.com From vince.smedley at mac.com Mon Jan 7 20:16:13 2008 From: vince.smedley at mac.com (Vincent Smedley) Date: Mon, 7 Jan 2008 19:16:13 +0000 Subject: [Pythonmac-SIG] Installation of pyobjc xcode integration help Message-ID: <69DC7EB1-AE77-423E-BCD6-1487CC3BE2F3@mac.com> Hi, Just installed PyObjC 1.4 as a binary install on Tiger with Python 2.4 installed. The install seems to work fine, from CL python I can access the cocoa frameworks. But in xcode I can't see the python application templates. The templates have been installed correctly as far as I can tell in /system/library/Application Support/Apple/Developer Tools/ Can someone point me in the right direction here, I'm new to xcode am not sure how to set it up to see these new templates. Regards, Vince From gary at zope.com Mon Jan 7 20:59:07 2008 From: gary at zope.com (Gary Poster) Date: Mon, 7 Jan 2008 14:59:07 -0500 Subject: [Pythonmac-SIG] HOWTO build local 2.4 on Leopard (was Re: newbie Mac switcher trying to set up django on Intel MacBook Pro Tiger) References: Message-ID: On Jan 3, 2008, at 1:28 PM, Tobias Rod?bel wrote: > BTW, we had a very inspiring discussion on the zope3-dev > list last summer regarding system python for *development*. Most > people there prefer a separate python tree for each (zope) project. http://www.mail-archive.com/zope3-dev at zope.org/msg08490.html FWIW, in this vein, if you want to build a clean local non-framework Python 2.4, here are the instructions I've been providing in-company. They aggregate and clean up some of the bits I've seen in blogs and elsewhere. Suggested improvements welcome. =================== Developing on a Mac =================== First you need macports. Go to macports.org and download the newest version. It doesn't seem to set up the manual path correctly, so after the installation add this to your ~/.profile (or in a similar place): export MANPATH=/opt/local/man:$MANPATH You'll need a new terminal session (or other shell magic if you know it) for these changes to take effect. The easiest thing to do is close the shell you are working in and open a new one. Now you need a local Python, so you don't mess up the system one. Download a source distribution of Python 2.4. You may have your own approach as to where to put things, but I'll go with this pattern in this document: ~/src will hold expanded source trees, ~/opt will hold our local Python, and we'll develop in ~/dev. We will need readline and zlib from macports. sudo port install readline sudo port install zlib Now we'll do the usual dance, with a couple of ugly extra steps. 1. ./configure --prefix=/Users/gary/dev/py LDFLAGS=-L/opt/local/lib OPT=-I/opt/local/include 2. add ``#define SETPGRP_HAVE_ARG 1`` to pyconfig.h 3. make 4. make install ...then I go on to talk about project-specific stuff. I'm not intending to get involved in a "use system Python or not" discussion, just want to help out those who want to do this bit Gary From kw at codebykevin.com Tue Jan 8 05:18:24 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 07 Jan 2008 23:18:24 -0500 Subject: [Pythonmac-SIG] PIL icns plugin can't display icns file In-Reply-To: <4782780A.7080308@codebykevin.com> References: <4782780A.7080308@codebykevin.com> Message-ID: <4782F990.1010802@codebykevin.com> Kevin Walzer wrote: > > > I'm not sure what is causing Python to barf here. PIL is supposed to be > able to create valid Tkinter photo objects, so I don't think the issue > is with Tk not recognizing the icns format. Any suggestions? > > To answer my own question, I need to rebuild PIL to link to Tk 8.5. It works fine with the system-installed Python (which links to Tk 8.4). -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Tue Jan 8 08:29:10 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 8 Jan 2008 08:29:10 +0100 Subject: [Pythonmac-SIG] PIL icns plugin can't display icns file In-Reply-To: <4782F990.1010802@codebykevin.com> References: <4782780A.7080308@codebykevin.com> <4782F990.1010802@codebykevin.com> Message-ID: On 8 Jan, 2008, at 5:18, Kevin Walzer wrote: > Kevin Walzer wrote: >> >> >> I'm not sure what is causing Python to barf here. PIL is supposed >> to be >> able to create valid Tkinter photo objects, so I don't think the >> issue >> is with Tk not recognizing the icns format. Any suggestions? >> >> > > To answer my own question, I need to rebuild PIL to link to Tk 8.5. It > works fine with the system-installed Python (which links to Tk 8.4). You might wat the be careful with using Tk 8.5 from Python, appearently there are changes in Tk 8.5 that cause problems with Tkinter. Martin von Loewis posted about this on the python-dev list a little while back (I'm pretty sure this was in late december). His advise was to stay with Tk 8.4 for python2.5 and warn users that Tk8.5 won't work properly with Tkinter. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080108/ebb5231c/attachment.bin From fmbetancourt at gmail.com Mon Jan 7 22:05:12 2008 From: fmbetancourt at gmail.com (Felicia Betancourt) Date: Mon, 7 Jan 2008 13:05:12 -0800 Subject: [Pythonmac-SIG] How can I make Leo play with Tiger? Message-ID: I just downloaded the latest version of the Literate Editor with Outlines (Leo), which is Python-based. To my horror, the installation notes say that "Leo works reliably only on MacOS X 10.3 (Panther)"! I'm having a hard time accepting this, since my machine (a PowerPC iBook) runs on 10.4.11. Does anyone know if there is a work-around that will force Leo to play nicely with Tiger? A possible hint is that the installation notes would have me install "MacPython 2.3 for Panther add-ons" and TclTkAqua first before actually installing Leo. Effusive thanks to anyone who has any ideas... appendix: in case it's helpful, here's the full text of the Leo installation notes for the Mac: Installing leo.py on MacOs -------------------------- Leo works reliably only on MacOS X 10.3 (Panther). To run Leo on Macintosh OS X 10.3: 1) Download and install "MacPython 2.3 for Panther addons". Python is already included in OS X 10.3 so only the addons are necessary http://www.cwi.nl/~jack/macpython.html 2) Download and install TclTkAqua. http://tcltkaqua.sourceforge.net/ 3) Run the PackageManager found in /Applications/MacPython-2.3 and install "_tkinter-2.3-binary" by clicking on the package in the list and clicking the [Install:] button with "Install dependencies" checked 4) Install Leo. There are two ways to do this. a) The NEW way: Download Leo-version-number.pkg from http://leo.sourceforge.net/ Double-click Leo.pkg to install the Leo folder. I recommend that you install Leo in your home directory. b) The OLD way: Download Leo-version-number.zip: http://leo.sourceforge.net/ Unzip the contents into the desired directory by double-clicking the downloaded file. 5) Run Leo by ontrol-clicking on /path_to_unzipped_dir/leo/src/leo.py and open with PythonLauncher. 6) It is a good idea to set PythonLauncher as the default program to open python scripts by clicking on "leo.py", choosing Get Info from the Finder's File menu, and selecting "PythonLauncher" as the default program to "Open With:" By clicking the "Change All..." button, all python scripts will be opened with PythonLauncher. 8) (optional) Download and install Pmw. (Leo now contains Pmw in the extensions folder). http://pmw.sourceforge.net/ Pmw must be installed in order to use the Settings panel. Drag the downloaded gzip file into /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages Double click on it to unzip and untar the file into a folder to make it available to Python Thanks to Randall Voth for these instructions. Using shell scripts and batch files to make using Leo easier ------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080107/0cfc3c36/attachment.htm From lists.gnarlodious at gmail.com Tue Jan 8 15:55:42 2008 From: lists.gnarlodious at gmail.com (Gnarlodious) Date: Tue, 8 Jan 2008 07:55:42 -0700 Subject: [Pythonmac-SIG] Installing mod_python on 64 bit Intel Message-ID: <3130eec50801080655s6145d3d3qbbf4a9c1b25eb860@mail.gmail.com> Hello. I hope this is a group that can help me. I am trying to install the mod_python Apache module on this Intel Mac. sudo apachectl configtest tells me this: httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_python.so into server: dlopen(/usr/libexec/apache2/mod_python.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_python.so: mach-o, but wrong architecture I attempted to follow instructions found on these pages but it didn't work: Does anyone know how to do this? Is there a mod_python somewhere that is already built for the 64 bit Intel? -- Gnarlie http://Gnarlodious.com/ From kw at codebykevin.com Tue Jan 8 17:50:29 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 08 Jan 2008 11:50:29 -0500 Subject: [Pythonmac-SIG] How can I make Leo play with Tiger? In-Reply-To: References: Message-ID: <4783A9D5.3080204@codebykevin.com> Felicia Betancourt wrote: > I just downloaded the latest version of the Literate Editor with Outlines > (Leo), which is Python-based. To my horror, the installation notes say that > "Leo works reliably only on MacOS X 10.3 (Panther)"! I'm having a hard time > accepting this, since my machine (a PowerPC iBook) runs on 10.4.11. > Does anyone know if there is a work-around that will force Leo to play > nicely with Tiger? A possible hint is that the installation notes would > have me install "MacPython 2.3 for Panther add-ons" and TclTkAqua first > before actually installing Leo. AFAIK, you should be able to simply download Leo and run "python leo.py." It's a Python-Tk-based application, and OS X (10.4 and 10.5) comes with both. Have you tried this? -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ed_hartley at mac.com Tue Jan 8 19:26:14 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Tue, 8 Jan 2008 18:26:14 +0000 Subject: [Pythonmac-SIG] py2app 0.4.2 and PyOpenGL Message-ID: <0AC3459C-8FE7-4FBC-A8AE-A16FE3E3D958@mac.com> Hi I'm seeing some problems with py2app 0.4.2 when used with PyOpenGL, I gather from the release and the list notes that this version has a mechanism to handle PyPI eggs directly is this correct? OS X 10.4 on Intel python2.5 setuptools-0.6c7-py2.5.egg PyOpenGL-3.0.0b1-py2.5.egg and PyOpenGL-3.0.0a6-py2.5.egg and the lesson5.py example from the p2app tree The application builds OK into an app, but when its run I get the log shown below at the console. This indicates that pkg_resources from setuptools is not being found. It is found OK from the command line python It appears that PyOpenGL-3.0.0b1-py2.5.egg installs as a directory tree from: ls PyOpenGL-3.0.0b1-py2.5.egg/ EGG-INFO OpenGL as opposed to PyOpenGL-3.0.0a6-py2.5.egg which installs zipped but gives lesson5.app/Contents/Resources/lesson5.py", line 47, in from OpenGL.GL import * ImportError: No module named OpenGL.GL warnings when used instead This is error log from 3.0.0b1 [---snip---] line 47, in from OpenGL.GL import * File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/GL/ __init__.py", line 2, in from OpenGL.raw.GL import * File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/raw/GL/ __init__.py", line 6, in from OpenGL.raw.GL.constants import * File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/raw/GL/ constants.py", line 7, in from OpenGL import platform, arrays File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/platform/ __init__.py", line 20, in import os, sys, pkg_resources ImportError: No module named pkg_resources 2008-01-08 17:58:38.680 lesson5[5760] lesson5 Error 2008-01-08 17:58:38.680 lesson5[5760] lesson5 Error An unexpected error has occurred during execution of the main script ImportError: No module named pkg_resources 2008-01-08 17:58:38.960 lesson5[5760] *** -[NSBundle load]: Error loading code /Users/edh/Library/InputManagers/Menu Extra Enabler/Menu Extra Enabler.bundle/Contents/MacOS/Menu Extra Enabler for bundle / Users/edh/Library/InputManagers/Menu Extra Enabler/Menu Extra Enabler.bundle, error code 2 (link edit error code 0, error number 0 ()) Best Regards Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080108/4cc13c2a/attachment.htm From luis.cota at avmltd.com Wed Jan 9 13:05:45 2008 From: luis.cota at avmltd.com (newbie73) Date: Wed, 9 Jan 2008 04:05:45 -0800 (PST) Subject: [Pythonmac-SIG] Leopard + Numpy + Scipy: Path Issues Remain Message-ID: <14710492.post@talk.nabble.com> I've been reading about the python path issues with Leopard and have tried the different methods outlined for addressing this problem with no good result. Currently I am using a combination of .pth files and a modification to my ~/.profile. One nagging problem is that SUDO commands do not maintain these settings. When I install wxPython, these go into the /System folder, *not* my /Library/Python folder. Also, when installing scipy, numpy.distutils.core cannot be found. sudo python scipy_dir/setup.py install I've installed numpy 1.0.4 and this is placed in /Library/Python/2.5/site-packages. I've also installed the MacPython from python.org. When running python from a Terminal window, the correct version of numpy gets loaded (1.0.4). However, as has been documented before, sudo overrides these settings, so when I attempt to install scipy, the following error shows up: Traceback (most recent call last): File "setup.py", line 55, in setup_package() File "setup.py", line 29, in setup_package from numpy.distutils.core import setup ImportError: No module named numpy.distutils.core Has anyone found a way around this? Just for good measure, I've included my current sys.path (after a sudo call): ['/code/libs/scipy-0.6.0', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode'] -- View this message in context: http://www.nabble.com/Leopard-%2B-Numpy-%2B-Scipy%3A-Path-Issues-Remain-tp14710492p14710492.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From ed_hartley at mac.com Wed Jan 9 13:37:25 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Wed, 9 Jan 2008 12:37:25 +0000 Subject: [Pythonmac-SIG] How can I make Leo play with Tiger? Message-ID: <0DBB7949-C53A-4A25-AB84-7B50FCF92179@mac.com> > From: Kevin Walzer > Date: 8 January 2008 16:50:29 GMT > To: Felicia Betancourt > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] How can I make Leo play with Tiger? > Reply-To: kw at codebykevin.com > > > Felicia Betancourt wrote: > >> I just downloaded the latest version of the Literate Editor with >> Outlines >> (Leo), which is Python-based. To my horror, the installation >> notes say that >> "Leo works reliably only on MacOS X 10.3 (Panther)"! I'm having a >> hard time >> accepting this, since my machine (a PowerPC iBook) runs on 10.4.11. >> Does anyone know if there is a work-around that will force Leo to >> play >> nicely with Tiger? A possible hint is that the installation notes >> would >> have me install "MacPython 2.3 for Panther add-ons" and TclTkAqua >> first >> before actually installing Leo. >> > > AFAIK, you should be able to simply download Leo and run "python > leo.py." It's a Python-Tk-based application, and OS X (10.4 and > 10.5) comes with both. Have you tried this? > -- I just installed it under OS X 10.4.11 from the latest zipped sources from the install script with no difficulty. You'll need Pmw installed for the preferences as well as Aqua-Tk which isn't difficult. IIRC has now been updated to install with setup.py rather than just dropping it into the site-packages directory. Which unlike other unices is under /Library/Frameworks/Python.framework/Versions/Current/lib/ not /usr/local/lib Ed Hartley > Kevin Walzer > Code by Kevin > http://www.codebykevin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080109/c01dbdaa/attachment.htm From michael at possibleworlds.com Wed Jan 9 18:04:34 2008 From: michael at possibleworlds.com (michael ferraro) Date: Wed, 9 Jan 2008 12:04:34 -0500 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: <0AC3459C-8FE7-4FBC-A8AE-A16FE3E3D958@mac.com> References: <0AC3459C-8FE7-4FBC-A8AE-A16FE3E3D958@mac.com> Message-ID: <0720C68B-6232-4918-8E19-B313BED116E5@possibleworlds.com> after doing svn checkout of py2app/trunk svn co http://svn.pythonmac.org/py2app/py2app/trunk/ python setup.py install i get these errors byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py to sip.pyc File "build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py", line 10 def __init__(self): ^ SyntaxError: invalid syntax byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/ script_py2applet.py to script_py2applet.pyc byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/util.py to util.pyc creating build/bdist.macosx-10.5-ppc/egg/EGG-INFO copying py2app.egg-info/PKG-INFO -> build/bdist.macosx-10.5-ppc/egg/ EGG-INFO copying py2app.egg-info/SOURCES.txt -> build/bdist.macosx-10.5-ppc/egg/ EGG-INFO copying py2app.egg-info/dependency_links.txt -> build/ bdist.macosx-10.5-ppc/egg/EGG-INFO copying py2app.egg-info/entry_points.txt -> build/bdist.macosx-10.5- ppc/egg/EGG-INFO copying py2app.egg-info/not-zip-safe -> build/bdist.macosx-10.5-ppc/ egg/EGG-INFO copying py2app.egg-info/requires.txt -> build/bdist.macosx-10.5-ppc/ egg/EGG-INFO copying py2app.egg-info/top_level.txt -> build/bdist.macosx-10.5-ppc/ egg/EGG-INFO creating 'dist/py2app-0.4.2-py2.5.egg' and adding 'build/ bdist.macosx-10.5-ppc/egg' to it removing 'build/bdist.macosx-10.5-ppc/egg' (and everything under it) Processing py2app-0.4.2-py2.5.egg removing '/Library/Python/2.5/site-packages/py2app-0.4.2- py2.5.egg' (and everything under it) creating /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg Extracting py2app-0.4.2-py2.5.egg to /Library/Python/2.5/site-packages File "/Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg/ py2app/recipes/sip.py", line 10 def __init__(self): ^ SyntaxError: invalid syntax py2app 0.4.2 is already the active version in easy-install.pth Installing py2applet script to /usr/local/bin Installed /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg Processing dependencies for py2app==0.4.2 Searching for modulegraph>=0.7.2 Reading http://pypi.python.org/simple/modulegraph/ Reading http://undefined.org/python/#modulegraph No local packages or download links found for modulegraph>=0.7.2 error: Could not find suitable distribution for Requirement.parse('modulegraph>=0.7.2') [Woim:Shared/Packages/py2app] mef% From hengist.podd at virgin.net Wed Jan 9 18:49:49 2008 From: hengist.podd at virgin.net (has) Date: Wed, 9 Jan 2008 17:49:49 +0000 Subject: [Pythonmac-SIG] creating PyObjC wrapper for ObjC framework? Message-ID: <218C4E44-24AB-41A3-9B68-700855C6BDE3@virgin.net> Hi all, I'm trying to create a PyObjC wrapper for objc-appscript, and I'm wondering how to wrap methods that have NSError** arguments, e.g.: @interface AEMEvent : NSObject { ... } ... /* * Send event. * Parameters * * sendMode * kAEWaitReply * * timeoutInTicks * kAEDefaultTimeout * * error * On return, an NSError object that describes an Apple Event Manager or application * error if one has occurred, otherwise nil. Pass nil if not required. * * Return value * * The value returned by the application, or an NSNull instance if no value was returned, * or nil if an error occurred. * * Notes * * A single event can be sent more than once if desired. * */ - (id)sendWithMode:(AESendMode)sendMode timeout:(long)timeoutInTicks error:(NSError **)error; ... @end The logical thing would be to convert a returned NSError into a Python exception, but BridgeSupport's gen_bridge_metadata tool doesn't seem to provide any help here, simply flagging the argument as 'opaque'. Any advice on how to proceed (with or without using BS)? Thanks, has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From xkenneth at gmail.com Wed Jan 9 21:31:34 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Wed, 9 Jan 2008 14:31:34 -0600 Subject: [Pythonmac-SIG] ZODB with py2app Message-ID: <1668B923-06F3-447E-BBA4-EF29DF942117@gmail.com> Hi All, I'm trying to build a Mac .app using py2app with python code that uses ZODB, can anyone give me some help, or maybe an example? Regards, Ken From noliethegoalie at earthlink.net Thu Jan 10 03:39:49 2008 From: noliethegoalie at earthlink.net (Nolan Schreiber) Date: Wed, 9 Jan 2008 21:39:49 -0500 Subject: [Pythonmac-SIG] building a Python app: syntax error Message-ID: <48067E58-C7A2-449C-B0FC-E62C0E420649@earthlink.net> I have been to a couple of sites and cannot find a fix for a syntax error I keep coming up with while attempting to make a stand-alone executable out of some Python script I have written on my mac OS X. following the guidelines at http://svn.pythonmac.org/py2app/py2app/ trunk/doc/index.html#create-a-setup-py-file, I have setup.py scripted and saved as a plain text file, seen here: from ez_setup import use_setuptools use_setuptools() py2applet --make-setup RefreshSite.py, Globe.icns however, when I attempt to build the application in alias mode by executing python setup.py py2app -A I get python: can't open file 'setup.py' [Process exited - exit code 2] and when I try it directly through Terminal I get File "setup.py", line 3 py2applet --make-setup RefreshSite.py, Globe.icns ^ Carrot pointing to the e in Site SyntaxError: invalid syntax I have everything in the same directory and I have py2app installed. This is probably a simple fix that I'm just missing as I'm pretty new to Python, but it's really got me stumped and I need to get this resolved. Thank you so much for your help, Nolan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080109/4bcd4a03/attachment-0001.htm From ronaldoussoren at mac.com Thu Jan 10 07:49:32 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 10 Jan 2008 07:49:32 +0100 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: <0720C68B-6232-4918-8E19-B313BED116E5@possibleworlds.com> References: <0AC3459C-8FE7-4FBC-A8AE-A16FE3E3D958@mac.com> <0720C68B-6232-4918-8E19-B313BED116E5@possibleworlds.com> Message-ID: <9D51935C-5B69-4DF7-928E-AB85AA459AD2@mac.com> It should work again Ronald On 9 Jan, 2008, at 18:04, michael ferraro wrote: > after doing svn checkout of py2app/trunk > > svn co http://svn.pythonmac.org/py2app/py2app/trunk/ > python setup.py install > > > i get these errors > > > byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py > to sip.pyc > File "build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py", line > 10 > def __init__(self): > ^ > SyntaxError: invalid syntax > > byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/ > script_py2applet.py to script_py2applet.pyc > byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/util.py to > util.pyc > creating build/bdist.macosx-10.5-ppc/egg/EGG-INFO > copying py2app.egg-info/PKG-INFO -> build/bdist.macosx-10.5-ppc/egg/ > EGG-INFO > copying py2app.egg-info/SOURCES.txt -> build/bdist.macosx-10.5-ppc/ > egg/ > EGG-INFO > copying py2app.egg-info/dependency_links.txt -> build/ > bdist.macosx-10.5-ppc/egg/EGG-INFO > copying py2app.egg-info/entry_points.txt -> build/bdist.macosx-10.5- > ppc/egg/EGG-INFO > copying py2app.egg-info/not-zip-safe -> build/bdist.macosx-10.5-ppc/ > egg/EGG-INFO > copying py2app.egg-info/requires.txt -> build/bdist.macosx-10.5-ppc/ > egg/EGG-INFO > copying py2app.egg-info/top_level.txt -> build/bdist.macosx-10.5-ppc/ > egg/EGG-INFO > creating 'dist/py2app-0.4.2-py2.5.egg' and adding 'build/ > bdist.macosx-10.5-ppc/egg' to it > removing 'build/bdist.macosx-10.5-ppc/egg' (and everything under it) > Processing py2app-0.4.2-py2.5.egg > removing '/Library/Python/2.5/site-packages/py2app-0.4.2- > py2.5.egg' (and everything under it) > creating /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg > Extracting py2app-0.4.2-py2.5.egg to /Library/Python/2.5/site-packages > File "/Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg/ > py2app/recipes/sip.py", line 10 > def __init__(self): > ^ > SyntaxError: invalid syntax > > py2app 0.4.2 is already the active version in easy-install.pth > Installing py2applet script to /usr/local/bin > > Installed /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg > Processing dependencies for py2app==0.4.2 > Searching for modulegraph>=0.7.2 > Reading http://pypi.python.org/simple/modulegraph/ > Reading http://undefined.org/python/#modulegraph > No local packages or download links found for modulegraph>=0.7.2 > error: Could not find suitable distribution for > Requirement.parse('modulegraph>=0.7.2') > [Woim:Shared/Packages/py2app] mef% > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080110/4130c05c/attachment.bin From ronaldoussoren at mac.com Thu Jan 10 07:54:38 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 10 Jan 2008 07:54:38 +0100 Subject: [Pythonmac-SIG] creating PyObjC wrapper for ObjC framework? In-Reply-To: <218C4E44-24AB-41A3-9B68-700855C6BDE3@virgin.net> References: <218C4E44-24AB-41A3-9B68-700855C6BDE3@virgin.net> Message-ID: On 9 Jan, 2008, at 18:49, has wrote: > Hi all, > > I'm trying to create a PyObjC wrapper for objc-appscript, Why? > and I'm > wondering how to wrap methods that have NSError** arguments, e.g.: The easiest way is to mark the arguments as 'out' in the Objective-C prototype (and then recompile), that way PyObjC will pick up the right metadata from the ObjC runtime and you won't need the bridgesupport file. (that is someMethod:(out NSError**)error). Alternatively you can use the annotation 'type_modifier="o"' in an exception file for the bridgesupport tool. To be honest I have no idea how to do that with the system implementation of the bridgesupport tool, I tend to use my own implementation from the pyobjc repository (long story). > > The logical thing would be to convert a returned NSError into a Python > exception, but BridgeSupport's gen_bridge_metadata tool doesn't seem > to provide any help here, simply flagging the argument as 'opaque'. > Any advice on how to proceed (with or without using BS)? Don't try to convert the NSError to an exception, that would make your wrapper complete different from other wrappers and hence more likely to cause confusion for users. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080110/bbc61321/attachment.bin From ed_hartley at mac.com Thu Jan 10 12:44:31 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Thu, 10 Jan 2008 11:44:31 +0000 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: References: Message-ID: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> On 10 Jan 2008, at 11:00, pythonmac-sig-request at python.org wrote: > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Pythonmac-SIG digest..." > Today's Topics: > > 1. Re: py2app 0.4.2 recipe errors (Ronald Oussoren) > 2. Re: creating PyObjC wrapper for ObjC framework? (Ronald > Oussoren) > > From: Ronald Oussoren > Date: 10 January 2008 06:49:32 GMT > To: michael ferraro > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors > > > It should work again > > Ronald > Does this mean the cvs for py2app has been updated? > On 9 Jan, 2008, at 18:04, michael ferraro wrote: > >> after doing svn checkout of py2app/trunk >> >> svn co http://svn.pythonmac.org/py2app/py2app/trunk/ >> python setup.py install >> >> >> i get these errors >> >> >> byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py >> to sip.pyc >> File "build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py", >> line 10 >> def __init__(self): >> ^ >> SyntaxError: invalid syntax >> >> byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/ >> script_py2applet.py to script_py2applet.pyc >> byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/util.py to >> util.pyc >> creating build/bdist.macosx-10.5-ppc/egg/EGG-INFO >> copying py2app.egg-info/PKG-INFO -> build/bdist.macosx-10.5-ppc/egg/ >> EGG-INFO >> copying py2app.egg-info/SOURCES.txt -> build/bdist.macosx-10.5-ppc/ >> egg/ >> EGG-INFO >> copying py2app.egg-info/dependency_links.txt -> build/ >> bdist.macosx-10.5-ppc/egg/EGG-INFO >> copying py2app.egg-info/entry_points.txt -> build/bdist.macosx-10.5- >> ppc/egg/EGG-INFO >> copying py2app.egg-info/not-zip-safe -> build/bdist.macosx-10.5-ppc/ >> egg/EGG-INFO >> copying py2app.egg-info/requires.txt -> build/bdist.macosx-10.5-ppc/ >> egg/EGG-INFO >> copying py2app.egg-info/top_level.txt -> build/bdist.macosx-10.5-ppc/ >> egg/EGG-INFO >> creating 'dist/py2app-0.4.2-py2.5.egg' and adding 'build/ >> bdist.macosx-10.5-ppc/egg' to it >> removing 'build/bdist.macosx-10.5-ppc/egg' (and everything under it) >> Processing py2app-0.4.2-py2.5.egg >> removing '/Library/Python/2.5/site-packages/py2app-0.4.2- >> py2.5.egg' (and everything under it) >> creating /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg >> Extracting py2app-0.4.2-py2.5.egg to /Library/Python/2.5/site- >> packages >> File "/Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg/ >> py2app/recipes/sip.py", line 10 >> def __init__(self): >> ^ >> SyntaxError: invalid syntax >> >> py2app 0.4.2 is already the active version in easy-install.pth >> Installing py2applet script to /usr/local/bin >> >> Installed /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg >> Processing dependencies for py2app==0.4.2 >> Searching for modulegraph>=0.7.2 >> Reading http://pypi.python.org/simple/modulegraph/ >> Reading http://undefined.org/python/#modulegraph >> No local packages or download links found for modulegraph>=0.7.2 >> error: Could not find suitable distribution for >> Requirement.parse('modulegraph>=0.7.2') >> [Woim:Shared/Packages/py2app] mef% >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080110/897b6d8e/attachment.htm From xkenneth at gmail.com Wed Jan 9 21:26:37 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Wed, 9 Jan 2008 14:26:37 -0600 Subject: [Pythonmac-SIG] py2app with ZODB Message-ID: Hi All, I'm trying to build a Mac .app using py2app with python code that uses ZODB, can anyone give me some help, or maybe an example? Regards, Ken From jmarinojr at gmail.com Thu Jan 10 01:25:47 2008 From: jmarinojr at gmail.com (John Marino) Date: Wed, 9 Jan 2008 19:25:47 -0500 Subject: [Pythonmac-SIG] MAC OS X UPGRADE Message-ID: <2D19584E-F20C-4156-AFCB-D683C0732233@gmail.com> Hi I had python for the mac 2.5 running fine on os x 10.4 tiger - was able too drop a .py file onto the launcher and it ran. Recently upgraded to os x 10.5 leopard and now when I drop the file on the launcher it just hangs on the Terminal window. I reinstalled 2.5 and then installed 2.5.1 but the same problem. Any thoughts? Thanks, john From hengist.podd at virgin.net Thu Jan 10 18:00:25 2008 From: hengist.podd at virgin.net (has) Date: Thu, 10 Jan 2008 17:00:25 +0000 Subject: [Pythonmac-SIG] creating PyObjC wrapper for ObjC framework? In-Reply-To: References: <218C4E44-24AB-41A3-9B68-700855C6BDE3@virgin.net> Message-ID: On 10 Jan 2008, at 06:54, Ronald Oussoren wrote: >> I'm trying to create a PyObjC wrapper for objc-appscript, > > Why? Partly just to know how, as one of objc-appscript's goals is to provide a foundation for implementing other appscript bridges, and this lets me explore the ins and outs. Partly so I can do casual testing in an interactive interpreter. (Yeah, I'm a slob.) Partly because I've been toying with the idea of having objc-aem provide the basis for appscript support in Jonathan Wight's PyObjC- based 'Run Python Script' Automator action. >> and I'm >> wondering how to wrap methods that have NSError** arguments, e.g.: > > The easiest way is to mark the arguments as 'out' in the Objective-C > prototype (and then recompile), that way PyObjC will pick up the > right metadata from the ObjC runtime and you won't need the > bridgesupport file Ahh, too easy. Duh. >> The logical thing would be to convert a returned NSError into a >> Python >> exception, but BridgeSupport's gen_bridge_metadata tool doesn't seem >> to provide any help here, simply flagging the argument as 'opaque'. >> Any advice on how to proceed (with or without using BS)? > > Don't try to convert the NSError to an exception, that would make > your wrapper complete different from other wrappers and hence more > likely to cause confusion for users. Okay. (Is this something that's changed since PyObjC 1.x, or is my memory just playing tricks?) Thanks, has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From Chris.Barker at noaa.gov Thu Jan 10 20:23:31 2008 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 10 Jan 2008 11:23:31 -0800 Subject: [Pythonmac-SIG] py2app with ZODB In-Reply-To: References: Message-ID: <478670B3.5060302@noaa.gov> Kenneth Miller wrote: > I'm trying to build a Mac .app using py2app with python code that > uses ZODB, can anyone give me some help, or maybe an example? Have you tried it yet? What problems are you having? In theory, it should "just work", but in reality, more complex packages sometimes require some tweaking. I haven't done ZODB, but I have tried to do Durus, which is another Python object database. Durus uses pickle (which I'm not sure that ZODB does), and I had issues with the app not being able to find the right modules to unpickle with. I never did get the time to dig into it and solve it though, so I'd love to hear what you come up with. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From hraban at fiee.net Thu Jan 10 20:50:58 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Thu, 10 Jan 2008 20:50:58 +0100 Subject: [Pythonmac-SIG] building a Python app: syntax error In-Reply-To: <48067E58-C7A2-449C-B0FC-E62C0E420649@earthlink.net> References: <48067E58-C7A2-449C-B0FC-E62C0E420649@earthlink.net> Message-ID: <23F48EB7-8FC6-4914-AE30-528F7AE728DF@fiee.net> Am 2008-01-10 um 03:39 schrieb Nolan Schreiber: > following the guidelines at http://svn.pythonmac.org/py2app/py2app/ > trunk/doc/index.html#create-a-setup-py-file, I have setup.py > scripted and saved as a plain text file, seen here: > > from ez_setup import use_setuptools > use_setuptools() > py2applet --make-setup RefreshSite.py, Globe.icns The third line is shell, not Python. I suggest you study a bit of Python before you try to build apps... Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From michael at possibleworlds.com Thu Jan 10 21:43:07 2008 From: michael at possibleworlds.com (michael ferraro) Date: Thu, 10 Jan 2008 15:43:07 -0500 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> References: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> Message-ID: <55B16618-3C59-4FBF-857E-44FB070345B3@possibleworlds.com> Thanks for the fix. Another problem seems be that it only build a intel app -- it seems that the prebuilt main is the same for Intel and PPC M On Jan 10, 2008, at 6:44 AM, Edward Hartley wrote: > > On 10 Jan 2008, at 11:00, pythonmac-sig-request at python.org wrote: > >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Pythonmac-SIG digest..." >> Today's Topics: >> >> 1. Re: py2app 0.4.2 recipe errors (Ronald Oussoren) >> 2. Re: creating PyObjC wrapper for ObjC framework? (Ronald >> Oussoren) >> >> From: Ronald Oussoren >> Date: 10 January 2008 06:49:32 GMT >> To: michael ferraro >> Cc: pythonmac-sig at python.org >> Subject: Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors >> >> >> It should work again >> >> Ronald >> > Does this mean the cvs for py2app has been updated? > > >> On 9 Jan, 2008, at 18:04, michael ferraro wrote: >> >>> after doing svn checkout of py2app/trunk >>> >>> svn co http://svn.pythonmac.org/py2app/py2app/trunk/ >>> python setup.py install >>> >>> >>> i get these errors >>> >>> >>> byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py >>> to sip.pyc >>> File "build/bdist.macosx-10.5-ppc/egg/py2app/recipes/sip.py", >>> line 10 >>> def __init__(self): >>> ^ >>> SyntaxError: invalid syntax >>> >>> byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/ >>> script_py2applet.py to script_py2applet.pyc >>> byte-compiling build/bdist.macosx-10.5-ppc/egg/py2app/util.py to >>> util.pyc >>> creating build/bdist.macosx-10.5-ppc/egg/EGG-INFO >>> copying py2app.egg-info/PKG-INFO -> build/bdist.macosx-10.5-ppc/egg/ >>> EGG-INFO >>> copying py2app.egg-info/SOURCES.txt -> build/bdist.macosx-10.5-ppc/ >>> egg/ >>> EGG-INFO >>> copying py2app.egg-info/dependency_links.txt -> build/ >>> bdist.macosx-10.5-ppc/egg/EGG-INFO >>> copying py2app.egg-info/entry_points.txt -> build/bdist.macosx-10.5- >>> ppc/egg/EGG-INFO >>> copying py2app.egg-info/not-zip-safe -> build/bdist.macosx-10.5-ppc/ >>> egg/EGG-INFO >>> copying py2app.egg-info/requires.txt -> build/bdist.macosx-10.5-ppc/ >>> egg/EGG-INFO >>> copying py2app.egg-info/top_level.txt -> build/bdist.macosx-10.5- >>> ppc/ >>> egg/EGG-INFO >>> creating 'dist/py2app-0.4.2-py2.5.egg' and adding 'build/ >>> bdist.macosx-10.5-ppc/egg' to it >>> removing 'build/bdist.macosx-10.5-ppc/egg' (and everything under it) >>> Processing py2app-0.4.2-py2.5.egg >>> removing '/Library/Python/2.5/site-packages/py2app-0.4.2- >>> py2.5.egg' (and everything under it) >>> creating /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg >>> Extracting py2app-0.4.2-py2.5.egg to /Library/Python/2.5/site- >>> packages >>> File "/Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg/ >>> py2app/recipes/sip.py", line 10 >>> def __init__(self): >>> ^ >>> SyntaxError: invalid syntax >>> >>> py2app 0.4.2 is already the active version in easy-install.pth >>> Installing py2applet script to /usr/local/bin >>> >>> Installed /Library/Python/2.5/site-packages/py2app-0.4.2-py2.5.egg >>> Processing dependencies for py2app==0.4.2 >>> Searching for modulegraph>=0.7.2 >>> Reading http://pypi.python.org/simple/modulegraph/ >>> Reading http://undefined.org/python/#modulegraph >>> No local packages or download links found for modulegraph>=0.7.2 >>> error: Could not find suitable distribution for >>> Requirement.parse('modulegraph>=0.7.2') >>> [Woim:Shared/Packages/py2app] mef% >>> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080110/a04ac22f/attachment.htm From tobias.rodaebel at mac.com Fri Jan 11 00:45:04 2008 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Fri, 11 Jan 2008 00:45:04 +0100 Subject: [Pythonmac-SIG] py2app with ZODB In-Reply-To: References: Message-ID: <9B4543EB-689F-4BDF-85CF-A97DD2963150@mac.com> Hi Kenneth, I wrote an objc wrapper framework for the ZODB. The python part uses py2app. Maybe you find some hints there http:// zodbdata.sourceforge.net and especially there http://zodbdata.svn.sourceforge.net/viewvc/zodbdata/trunk/python/ Didn't get into serious trouble with ZODB and py2app as far as I remember. Cheers, Tobias On Jan 9, 2008, at 9:26 PM, Kenneth Miller wrote: > Hi All, > > I'm trying to build a Mac .app using py2app with python code that > uses ZODB, can anyone give me some help, or maybe an example? > > Regards, > Ken > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ed_hartley at mac.com Fri Jan 11 18:57:31 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Fri, 11 Jan 2008 17:57:31 +0000 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: References: Message-ID: On 10 Jan 2008, at 11:00, pythonmac-sig-request at python.org wrote: > Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors > > > It should work again > > Ronald > > On 9 Jan, 2008, at 18:04, michael ferraro wrote: > >> after doing svn checkout of py2app/trunk >> >> svn co http://svn.pythonmac.org/py2app/py2app/trunk/ >> python setup.py install >> >> >> I now get these errors after doing an svn checkout svn co http://svn.pythonmac.org/py2app/py2app/trunk/ python setup.py install Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/py2app-0.4.2-py2.5.egg Processing dependencies for py2app==0.4.2 Searching for modulegraph>=0.7.2 Reading http://pypi.python.org/simple/modulegraph/ Reading http://undefined.org/python/#modulegraph No local packages or download links found for modulegraph>=0.7.2 error: Could not find suitable distribution for Requirement.parse ('modulegraph>=0.7.2') Installing modulegraph 0.7.2 from svn turnk and setuptools from svn trunk does not sort this out. Are there any suggestions. Regards Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080111/a17f8fb5/attachment.htm From michael at possibleworlds.com Fri Jan 11 19:16:59 2008 From: michael at possibleworlds.com (michael ferraro) Date: Fri, 11 Jan 2008 13:16:59 -0500 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: References: Message-ID: thanks for the reply - ran into this M Woim:Shared/Packages/ALT] mef% svn co http://zodbdata.svn.sourceforge.net/viewvc/zodbdata/trunk/python/ svn: PROPFIND request failed on '/viewvc/zodbdata/trunk/python' svn: PROPFIND of '/viewvc/zodbdata/trunk/python': 301 Moved (http://zodbdata.svn.sourceforge.net ) [Woim:Shared/Packages/ALT] mef% svn co http://zodbdata.svn.sourceforge.net/viewvc/zodbdata/trunk/python svn: PROPFIND request failed on '/viewvc/zodbdata/trunk/python' svn: PROPFIND of '/viewvc/zodbdata/trunk/python': 301 Moved (http://zodbdata.svn.sourceforge.net ) [Woim:Shared/Packages/ALT] mef% [Woim:Shared/Packages/ALT] mef% [Woim:Shared/Packages/ALT] mef% [Woim:Shared/Packages/ALT] mef% svn co http://zodbdata.svn.sourceforge.net svn: PROPFIND request failed on '/' svn: PROPFIND of '/': 302 Found (http://zodbdata.svn.sourceforge.net) [Woim:Shared/Packages/ALT] mef% [Woim:Shared/Packages/ALT] mef% svn co http://zodbdata.svn.sourceforge.net/viewvc/zodbdata/trunk/python/ svn: PROPFIND request failed on '/viewvc/zodbdata/trunk/python' On Jan 11, 2008, at 12:57 PM, Edward Hartley wrote: > > On 10 Jan 2008, at 11:00, pythonmac-sig-request at python.org wrote: > >> Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors >> >> >> It should work again >> >> Ronald >> >> On 9 Jan, 2008, at 18:04, michael ferraro wrote: >> >>> after doing svn checkout of py2app/trunk >>> >>> svn co http://svn.pythonmac.org/py2app/py2app/trunk/ >>> python setup.py install >>> >>> >>> > I now get these errors after doing an svn checkout > > svn co http://svn.pythonmac.org/py2app/py2app/trunk/ > python setup.py install > > Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.4.2-py2.5.egg > Processing dependencies for py2app==0.4.2 > Searching for modulegraph>=0.7.2 > Reading http://pypi.python.org/simple/modulegraph/ > Reading http://undefined.org/python/#modulegraph > No local packages or download links found for modulegraph>=0.7.2 > error: Could not find suitable distribution for > Requirement.parse('modulegraph>=0.7.2') > > Installing modulegraph 0.7.2 from svn turnk and setuptools from svn > trunk does not sort this out. > Are there any suggestions. > Regards > Ed > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080111/32a4bca2/attachment.htm From michael at possibleworlds.com Fri Jan 11 23:24:30 2008 From: michael at possibleworlds.com (michael ferraro) Date: Fri, 11 Jan 2008 17:24:30 -0500 Subject: [Pythonmac-SIG] Fwd: py2app with ZODB References: <9B4543EB-689F-4BDF-85CF-A97DD2963150@mac.com> Message-ID: <04CDD5D3-F5ED-4AF7-8FDB-92E37C6A065E@possibleworlds.com> I am sorry, yes this did come in M the svn server returned errors when I tried to co the trunk Begin forwarded message: > From: Tobias Rod?bel > Date: January 10, 2008 6:45:04 PM EST > To: Kenneth Miller > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] py2app with ZODB > > Hi Kenneth, > > I wrote an objc wrapper framework for the ZODB. The python part uses > py2app. Maybe you find some hints there http:// > zodbdata.sourceforge.net and especially there http://zodbdata.svn.sourceforge.net/viewvc/zodbdata/trunk/python/ > > Didn't get into serious trouble with ZODB and py2app as far as I > remember. > > Cheers, > Tobias > > On Jan 9, 2008, at 9:26 PM, Kenneth Miller wrote: > >> Hi All, >> >> I'm trying to build a Mac .app using py2app with python code that >> uses ZODB, can anyone give me some help, or maybe an example? >> >> Regards, >> Ken >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080111/b3793bdb/attachment.htm From ronaldoussoren at mac.com Sat Jan 12 07:54:42 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 12 Jan 2008 07:54:42 +0100 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> References: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080112/4828c34b/attachment.htm From ronaldoussoren at mac.com Sat Jan 12 18:30:08 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 12 Jan 2008 18:30:08 +0100 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: References: Message-ID: <7EB2F204-D681-47B2-8FA6-9E172A10758C@mac.com> On 11 Jan, 2008, at 18:57, Edward Hartley wrote: >>> ] > I now get these errors after doing an svn checkout > > svn co http://svn.pythonmac.org/py2app/py2app/trunk/ > python setup.py install > > Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.4.2-py2.5.egg > Processing dependencies for py2app==0.4.2 > Searching for modulegraph>=0.7.2 > Reading http://pypi.python.org/simple/modulegraph/ > Reading http://undefined.org/python/#modulegraph > No local packages or download links found for modulegraph>=0.7.2 > error: Could not find suitable distribution for > Requirement.parse('modulegraph>=0.7.2') > > Installing modulegraph 0.7.2 from svn turnk and setuptools from svn > trunk does not sort this out. > Are there any suggestions. > Regards > Ed Installing modulegraph from subversion is indeed the right solution. The current trunk of py2app requires the trunk for modulegraph because of a new feature in both packages: there is now limited support for zipped egg files. That is, py2app can now copy code from zipped egg files into application bundles. This is "limited" support because py2app still does not really support egg files as a seperate entity, causing code that makes use of egg features like entrypoints or explict dependencies to fail at runtime. I'd love to see support for this in py2app but have no idea when I'll be able to work on such a feature. Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080112/96d4dcf6/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080112/96d4dcf6/attachment.bin From ronaldoussoren at mac.com Sat Jan 12 18:33:40 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 12 Jan 2008 18:33:40 +0100 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: <55B16618-3C59-4FBF-857E-44FB070345B3@possibleworlds.com> References: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> <55B16618-3C59-4FBF-857E-44FB070345B3@possibleworlds.com> Message-ID: <9070D498-3B83-401C-B551-7400D09FC368@mac.com> On 10 Jan, 2008, at 21:43, michael ferraro wrote: > Thanks for the fix. > Another problem seems be that it only build > a intel app -- it seems that the prebuilt main is the > same for Intel and PPC That's now fixed in the repository, the prebuild main was an intel- only binary. While I was at it, I've also rebuilt the prebuilt main with 'MACOSX_DEPLOYMENT_TARGET=10.3', which shouldn't make a difference but makes it less likely that updates to the source code cause problems when running python app bundles on 10.3.9. BTW. My excuses for the oneliner yesterdays, both mails where sent while running to and fro. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080112/3e6770b5/attachment.bin From ed_hartley at mac.com Sat Jan 12 19:35:48 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Sat, 12 Jan 2008 18:35:48 +0000 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: References: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> Message-ID: <76801971-51CA-40E4-903E-9BE0C0FE0A5A@mac.com> Hi Ronald, further to my previous on py2app modulegraph With these changes py2app is not to working at all. Constructive suggestions would be welcomed detail follows. So having changed py2app setup.py from install_requires=[ "altgraph>=0.6.7", "modulegraph>=0.7.2", "macholib>=1.1", "bdist_mpkg>=0.4", ], to install_requires=[ "altgraph>=0.6.7", "modulegraph>=0.7.2.dev-r21", "macholib>=1.1", "bdist_mpkg>=0.4", ], and updating setuptools and checking modulegraph >=0.7.2 i.e. 0.7.2.dev-r21 as shown here: sudo easy_install --upgrade setuptools Password: Processing setuptools Running setup.py -q bdist_egg --dist-dir /Users/edh/AnonCVS/ setuptools/setuptools/egg-dist-tmp-1stpfV setuptools 0.7a1dev-r59683 is already the active version in easy- install.pth Installing easy_install script to /Library/Frameworks/ Python.framework/Versions/2.5/bin Installing easy_install-2.5 script to /Library/Frameworks/ Python.framework/Versions/2.5/bin Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/setuptools-0.7a1dev_r59683-py2.5.egg Processing dependencies for setuptools==0.7a1dev-r59683 Finished processing dependencies for setuptools==0.7a1dev-r59683 mirrorman:~/AnonCVS/setuptools edh$ sudo easy_install --upgrade modulegraph Searching for modulegraph Reading http://pypi.python.org/simple/modulegraph/ Reading http://undefined.org/python/#modulegraph Best match: modulegraph 0.7.2.dev-r21 Processing modulegraph-0.7.2.dev_r21-py2.5.egg modulegraph 0.7.2.dev-r21 is already the active version in easy- install.pth Now Running ~/PyObjC/OpenGLDemo edh$ python setup.py py2app Shows these errors from modulegraph so is 0.7.2.dev-r21 not the correct version or is there another problem? running py2app 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 579, 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 631, in run_normal mf = self.get_modulefinder() 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 539, in get_modulefinder debug=debug, File "build/bdist.macosx-10.3-fat/egg/modulegraph/ find_modules.py", line 255, in find_modules find_needed_modules(mf, scripts, includes, packages) File "build/bdist.macosx-10.3-fat/egg/modulegraph/ find_modules.py", line 176, in find_needed_modules mf.run_script(path) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 369, in run_script self.scan_code(co, m) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 638, in scan_code self.scan_code(c, m) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 610, in scan_code self._safe_import_hook(name, m, fromlist) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 540, in _safe_import_hook mods = self.import_hook(name, caller) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 380, in import_hook q, tail = self.find_head_package(parent, name) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 419, in find_head_package q = self.import_module(head, qname, parent) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 493, in import_module parent and parent.packagepath, parent) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 680, in find_module fp, buf, stuff = find_module(name, path) File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", line 114, in find_module if isinstance(importer, pkg_resources.ImpWrapper): AttributeError: 'module' object has no attribute 'ImpWrapper' It also is broken when building Apple's Xcode example PyAverager which previously worked. Both from their web site files and my recreation of it. Removing py2app 0.4.2 and reverting to 0.3.6 fixes that IIRC rev 66 still worked with Xcode Best Regards Ed On 12 Jan 2008, at 06:54, Ronald Oussoren wrote: > > On 10 Jan, 2008, at 12:44, Edward Hartley wrote: > >> >> On 10 Jan 2008, at 11:00, pythonmac-sig-request at python.org wrote: >> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of Pythonmac-SIG digest..." >>> Today's Topics: >>> >>> 1. Re: py2app 0.4.2 recipe errors (Ronald Oussoren) >>> 2. Re: creating PyObjC wrapper for ObjC framework? (Ronald >>> Oussoren) >>> >>> From: Ronald Oussoren >>> Date: 10 January 2008 06:49:32 GMT >>> To: michael ferraro >>> Cc: pythonmac-sig at python.org >>> Subject: Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors >>> >>> >>> It should work again >>> >>> Ronald >>> >> Does this mean the cvs for py2app has been updated? > > Of course. What else could I mean? > > Ronald > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080112/9ad0d5b7/attachment-0001.htm From ronaldoussoren at mac.com Sun Jan 13 15:24:43 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 13 Jan 2008 15:24:43 +0100 Subject: [Pythonmac-SIG] creating PyObjC wrapper for ObjC framework? In-Reply-To: References: <218C4E44-24AB-41A3-9B68-700855C6BDE3@virgin.net> Message-ID: On 10 Jan, 2008, at 18:00, has wrote: > On 10 Jan 2008, at 06:54, Ronald Oussoren wrote: > >>> I'm trying to create a PyObjC wrapper for objc-appscript, >> >> Why? > > Partly just to know how, as one of objc-appscript's goals is to > provide a foundation for implementing other appscript bridges, and > this lets me explore the ins and outs. > > > Partly so I can do casual testing in an interactive interpreter. > (Yeah, I'm a slob.) Using Python for unittest an interactive exploration is actually a major usecase for PyObjC, so don't feel to bad about this ;-) > > Partly because I've been toying with the idea of having objc-aem > provide the basis for appscript support in Jonathan Wight's PyObjC- > based 'Run Python Script' Automator action. > > >>> and I'm >>> wondering how to wrap methods that have NSError** arguments, e.g.: >> >> The easiest way is to mark the arguments as 'out' in the Objective-C >> prototype (and then recompile), that way PyObjC will pick up the >> right metadata from the ObjC runtime and you won't need the >> bridgesupport file > > Ahh, too easy. Duh. I keep trying to make it as easy as possible to create Objective-C code that is trivial to wrap using PyObjC, although documentation and advocacy is rather lacking :-( > > > >>> The logical thing would be to convert a returned NSError into a >>> Python >>> exception, but BridgeSupport's gen_bridge_metadata tool doesn't seem >>> to provide any help here, simply flagging the argument as 'opaque'. >>> Any advice on how to proceed (with or without using BS)? >> >> Don't try to convert the NSError to an exception, that would make >> your wrapper complete different from other wrappers and hence more >> likely to cause confusion for users. > > > Okay. (Is this something that's changed since PyObjC 1.x, or is my > memory just playing tricks?) That's probably just your memory. NSException's are bridged to Python exceptions, that may cause the confusion. Cocoa basicly has two ways to do structured error handling: * Exceptions, which are basicly only used for handling programmer errors (trying to change a immutable dictionary raises an exception) * NSErrors, which are used for everything else (OS Errors, running out of resources, ...) * Several ancient API's use strings instead of NSErrors. (I know, this is item 3 in a 2 item list) Python uses exceptions for all of these. Ronald > > > Thanks, > > has > -- > http://appscript.sourceforge.net > http://rb-appscript.rubyforge.org > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080113/4454fd1e/attachment.bin From ronaldoussoren at mac.com Sun Jan 13 15:28:46 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 13 Jan 2008 15:28:46 +0100 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: <76801971-51CA-40E4-903E-9BE0C0FE0A5A@mac.com> References: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> <76801971-51CA-40E4-903E-9BE0C0FE0A5A@mac.com> Message-ID: <3F8D5809-6A6F-4BEB-B7C0-7F81898BBEFB@mac.com> On 12 Jan, 2008, at 19:35, Edward Hartley wrote: > Hi Ronald, > further to my previous on py2app modulegraph > > With these changes py2app is not to working at all. Arghh.... I guess my merge of the version of py2app and friends from Leopard wasn't complete. I'm currently working on some cleanups in the pyobjc repository and a port of pyobjc to 64-bit PPC and will look into this issue when that's finished. With some luck that will be later today. BTW. Thank's for mentioning that the PyAvenger sample is broken as well, that will make it a lot easier to debug the problem. Ronald > > Constructive suggestions would be welcomed detail follows. > > So having changed py2app setup.py > from > > install_requires=[ > "altgraph>=0.6.7", > "modulegraph>=0.7.2", > "macholib>=1.1", > "bdist_mpkg>=0.4", > ], > > to > install_requires=[ > "altgraph>=0.6.7", > "modulegraph>=0.7.2.dev-r21", > "macholib>=1.1", > "bdist_mpkg>=0.4", > ], > > > and updating setuptools and checking modulegraph >=0.7.2 i.e. > 0.7.2.dev-r21 > as shown here: > > sudo easy_install --upgrade setuptools > Password: > Processing setuptools > Running setup.py -q bdist_egg --dist-dir /Users/edh/AnonCVS/ > setuptools/setuptools/egg-dist-tmp-1stpfV > setuptools 0.7a1dev-r59683 is already the active version in easy- > install.pth > Installing easy_install script to /Library/Frameworks/ > Python.framework/Versions/2.5/bin > Installing easy_install-2.5 script to /Library/Frameworks/ > Python.framework/Versions/2.5/bin > > Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/setuptools-0.7a1dev_r59683-py2.5.egg > Processing dependencies for setuptools==0.7a1dev-r59683 > Finished processing dependencies for setuptools==0.7a1dev-r59683 > mirrorman:~/AnonCVS/setuptools edh$ sudo easy_install --upgrade > modulegraph > Searching for modulegraph > Reading http://pypi.python.org/simple/modulegraph/ > Reading http://undefined.org/python/#modulegraph > Best match: modulegraph 0.7.2.dev-r21 > Processing modulegraph-0.7.2.dev_r21-py2.5.egg > modulegraph 0.7.2.dev-r21 is already the active version in easy- > install.pth > > > > > > Now Running > > ~/PyObjC/OpenGLDemo edh$ python setup.py py2app > > Shows these errors from modulegraph so is 0.7.2.dev-r21 not the > correct version or is there another problem? > > running py2app > 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 579, 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 631, in run_normal > mf = self.get_modulefinder() > 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 539, in get_modulefinder > debug=debug, > File "build/bdist.macosx-10.3-fat/egg/modulegraph/ > find_modules.py", line 255, in find_modules > find_needed_modules(mf, scripts, includes, packages) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/ > find_modules.py", line 176, in find_needed_modules > mf.run_script(path) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 369, in run_script > self.scan_code(co, m) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 638, in scan_code > self.scan_code(c, m) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 610, in scan_code > self._safe_import_hook(name, m, fromlist) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 540, in _safe_import_hook > mods = self.import_hook(name, caller) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 380, in import_hook > q, tail = self.find_head_package(parent, name) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 419, in find_head_package > q = self.import_module(head, qname, parent) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 493, in import_module > parent and parent.packagepath, parent) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 680, in find_module > fp, buf, stuff = find_module(name, path) > File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py", > line 114, in find_module > if isinstance(importer, pkg_resources.ImpWrapper): > AttributeError: 'module' object has no attribute 'ImpWrapper' > > It also is broken when building Apple's Xcode example PyAverager > which previously worked. > Both from their web site files and my recreation of it. > Removing py2app 0.4.2 and reverting to 0.3.6 fixes that IIRC rev 66 > still worked with Xcode > > Best Regards > Ed > > > On 12 Jan 2008, at 06:54, Ronald Oussoren wrote: > >> >> On 10 Jan, 2008, at 12:44, Edward Hartley wrote: >> >>> >>> On 10 Jan 2008, at 11:00, pythonmac-sig-request at python.org wrote: >>> >>>> When replying, please edit your Subject line so it is more specific >>>> than "Re: Contents of Pythonmac-SIG digest..." >>>> Today's Topics: >>>> >>>> 1. Re: py2app 0.4.2 recipe errors (Ronald Oussoren) >>>> 2. Re: creating PyObjC wrapper for ObjC framework? (Ronald >>>> Oussoren) >>>> >>>> From: Ronald Oussoren >>>> Date: 10 January 2008 06:49:32 GMT >>>> To: michael ferraro >>>> Cc: pythonmac-sig at python.org >>>> Subject: Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors >>>> >>>> >>>> It should work again >>>> >>>> Ronald >>>> >>> Does this mean the cvs for py2app has been updated? >> >> Of course. What else could I mean? >> >> Ronald >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080113/09470d61/attachment-0001.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080113/09470d61/attachment-0001.bin From michael at possibleworlds.com Sun Jan 13 18:27:12 2008 From: michael at possibleworlds.com (michael ferraro) Date: Sun, 13 Jan 2008 12:27:12 -0500 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: <3F8D5809-6A6F-4BEB-B7C0-7F81898BBEFB@mac.com> References: <4D5BE735-3114-4376-B632-DB375D36471C@mac.com> <76801971-51CA-40E4-903E-9BE0C0FE0A5A@mac.com> <3F8D5809-6A6F-4BEB-B7C0-7F81898BBEFB@mac.com> Message-ID: <759F990D-F138-48F2-98D2-00DD5BC9469E@possibleworlds.com> thanks for your efforts m On Jan 13, 2008, at 9:28 AM, Ronald Oussoren wrote: > > On 12 Jan, 2008, at 19:35, Edward Hartley wrote: > >> Hi Ronald, >> further to my previous on py2app modulegraph >> >> With these changes py2app is not to working at all. > > Arghh.... I guess my merge of the version of py2app and friends from > Leopard wasn't complete. I'm currently working on some cleanups in > the pyobjc repository and a port of pyobjc to 64-bit PPC and will > look into this issue when that's finished. With some luck that will > be later today. > > BTW. Thank's for mentioning that the PyAvenger sample is broken as > well, that will make it a lot easier to debug the problem. > > Ronald > >> >> Constructive suggestions would be welcomed detail follows. >> >> So having changed py2app setup.py >> from >> >> install_requires=[ >> "altgraph>=0.6.7", >> "modulegraph>=0.7.2", >> "macholib>=1.1", >> "bdist_mpkg>=0.4", >> ], >> >> to >> install_requires=[ >> "altgraph>=0.6.7", >> "modulegraph>=0.7.2.dev-r21", >> "macholib>=1.1", >> "bdist_mpkg>=0.4", >> ], >> >> >> and updating setuptools and checking modulegraph >=0.7.2 i.e. >> 0.7.2.dev-r21 >> as shown here: >> >> sudo easy_install --upgrade setuptools >> Password: >> Processing setuptools >> Running setup.py -q bdist_egg --dist-dir /Users/edh/AnonCVS/ >> setuptools/setuptools/egg-dist-tmp-1stpfV >> setuptools 0.7a1dev-r59683 is already the active version in easy- >> install.pth >> Installing easy_install script to /Library/Frameworks/ >> Python.framework/Versions/2.5/bin >> Installing easy_install-2.5 script to /Library/Frameworks/ >> Python.framework/Versions/2.5/bin >> >> Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ >> python2.5/site-packages/setuptools-0.7a1dev_r59683-py2.5.egg >> Processing dependencies for setuptools==0.7a1dev-r59683 >> Finished processing dependencies for setuptools==0.7a1dev-r59683 >> mirrorman:~/AnonCVS/setuptools edh$ sudo easy_install --upgrade >> modulegraph >> Searching for modulegraph >> Reading http://pypi.python.org/simple/modulegraph/ >> Reading http://undefined.org/python/#modulegraph >> Best match: modulegraph 0.7.2.dev-r21 >> Processing modulegraph-0.7.2.dev_r21-py2.5.egg >> modulegraph 0.7.2.dev-r21 is already the active version in easy- >> install.pth >> >> >> >> >> >> Now Running >> >> ~/PyObjC/OpenGLDemo edh$ python setup.py py2app >> >> Shows these errors from modulegraph so is 0.7.2.dev-r21 not the >> correct version or is there another problem? >> >> running py2app >> 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 579, 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 631, in run_normal >> mf = self.get_modulefinder() >> 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 539, in get_modulefinder >> debug=debug, >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> find_modules.py", line 255, in find_modules >> find_needed_modules(mf, scripts, includes, packages) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> find_modules.py", line 176, in find_needed_modules >> mf.run_script(path) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 369, in run_script >> self.scan_code(co, m) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 638, in scan_code >> self.scan_code(c, m) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 610, in scan_code >> self._safe_import_hook(name, m, fromlist) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 540, in _safe_import_hook >> mods = self.import_hook(name, caller) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 380, in import_hook >> q, tail = self.find_head_package(parent, name) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 419, in find_head_package >> q = self.import_module(head, qname, parent) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 493, in import_module >> parent and parent.packagepath, parent) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 680, in find_module >> fp, buf, stuff = find_module(name, path) >> File "build/bdist.macosx-10.3-fat/egg/modulegraph/ >> modulegraph.py", line 114, in find_module >> if isinstance(importer, pkg_resources.ImpWrapper): >> AttributeError: 'module' object has no attribute 'ImpWrapper' >> >> It also is broken when building Apple's Xcode example PyAverager >> which previously worked. >> Both from their web site files and my recreation of it. >> Removing py2app 0.4.2 and reverting to 0.3.6 fixes that IIRC rev 66 >> still worked with Xcode >> >> Best Regards >> Ed >> >> >> On 12 Jan 2008, at 06:54, Ronald Oussoren wrote: >> >>> >>> On 10 Jan, 2008, at 12:44, Edward Hartley wrote: >>> >>>> >>>> On 10 Jan 2008, at 11:00, pythonmac-sig-request at python.org wrote: >>>> >>>>> When replying, please edit your Subject line so it is more >>>>> specific >>>>> than "Re: Contents of Pythonmac-SIG digest..." >>>>> Today's Topics: >>>>> >>>>> 1. Re: py2app 0.4.2 recipe errors (Ronald Oussoren) >>>>> 2. Re: creating PyObjC wrapper for ObjC framework? (Ronald >>>>> Oussoren) >>>>> >>>>> From: Ronald Oussoren >>>>> Date: 10 January 2008 06:49:32 GMT >>>>> To: michael ferraro >>>>> Cc: pythonmac-sig at python.org >>>>> Subject: Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors >>>>> >>>>> >>>>> It should work again >>>>> >>>>> Ronald >>>>> >>>> Does this mean the cvs for py2app has been updated? >>> >>> Of course. What else could I mean? >>> >>> Ronald >>> >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080113/328e43de/attachment.htm From hengist.podd at virgin.net Sun Jan 13 19:12:15 2008 From: hengist.podd at virgin.net (has) Date: Sun, 13 Jan 2008 18:12:15 +0000 Subject: [Pythonmac-SIG] creating PyObjC wrapper for ObjC framework? In-Reply-To: References: <218C4E44-24AB-41A3-9B68-700855C6BDE3@virgin.net> Message-ID: <056EC87A-AD2F-4154-A3CF-043DFFC0830A@virgin.net> On 13 Jan 2008, at 14:24, Ronald Oussoren wrote: > I keep trying to make it as easy as possible to create Objective-C > code that is trivial to wrap using PyObjC, although documentation > and advocacy is rather lacking :-( Sympathies; know what it's like trying to find enough time and/or assistance for everything you'd like to see done. Don't suppose there's any PyObjC users out there with a bit of spare time available who could come to your aid? >>>> Don't try to convert the NSError to an exception, that would make >>> your wrapper complete different from other wrappers and hence more >>> likely to cause confusion for users. >> >> Okay. (Is this something that's changed since PyObjC 1.x, or is my >> memory just playing tricks?) > > That's probably just your memory. NSException's are bridged to > Python exceptions, that may cause the confusion. Quite likely. So proper procedure is to return an NSError and leave the Python code to do whatever it wants with that information (perform error recovery, raise a Python exception, etc.), yes? If so, no problem. Thanks for the advice, and muchos gracias for all your work on PyObjC 2.0 has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From m.vanland at gmail.com Tue Jan 15 01:01:55 2008 From: m.vanland at gmail.com (Michael VanLandingham) Date: Mon, 14 Jan 2008 16:01:55 -0800 Subject: [Pythonmac-SIG] Multi-line history problems in ipython (mac osx) Message-ID: Hi Group, Perhaps this has been covered elsewhere, but I'm seeing problems in iPython (0.8.2, 0.8.3 r2919) on OS X 10.5.1 when using the up arrow to do history completion after multi-line input (a function def, for example). Like this: #define a silly function or any multi-line statement: In [1]: def foo(s=None): ...: if s: ...: print 'foo got "%s"' % s ...: return ...: print "foo got nuthin'" ...: #play with it: In [2]: foo('bar') foo got "bar" In [3]: foo() foo got nuthin' #When I press the arrow-up key a couple times to edit the function def: if s: def foo(s=None): print 'foo got "%s"' % s return print "foo got nuthin'" Notice how the 'def foo(s=None)' is on the same line as the 'if s:'? And once it does this, _all_ arrow-ups are out in the middle of the console and well, generally messed up. You can still use this if you're careful, but it's sketchy. Is this a known issue? Someone else recently mentioned to me that they were seeing this as well. Thanks, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080114/5905895c/attachment.htm From luis.cota at avmltd.com Tue Jan 15 01:15:31 2008 From: luis.cota at avmltd.com (newbie73) Date: Mon, 14 Jan 2008 16:15:31 -0800 (PST) Subject: [Pythonmac-SIG] Path Issues when using Swig (and OSX Leopard) Message-ID: <14821450.post@talk.nabble.com> I installed v 2.5 of MacPython from python.org. I am able to build lots of other packages using this setup, where packages are installed here: /Library/Python/2.5/site-packages I cannot, however, find the include directories for the macpython installation. Can anybody help me locate where they would be? I am trying to follow the example in the swig.org tutorial which would have me do the following: swig -python example.i set env PYDIR /System/Library/Frameworks/Python.framework/Versions/Current gcc -I /System/Library/Frameworks/Python.framework/Versions/Current/Headers -framework Python -bundle -bundle_loader /System/Library/Frameworks/Python.framework/Versions/Current/bin/python example_wrap.c example.c -o _example.so these compile instructions reference the Apple installation of Python, which I want to avoid. What are the corresponding directories for v 2.5 MacPython? Thanks! -- View this message in context: http://www.nabble.com/Path-Issues-when-using-Swig-%28and-OSX-Leopard%29-tp14821450p14821450.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From Chris.Barker at noaa.gov Tue Jan 15 01:31:00 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 14 Jan 2008 16:31:00 -0800 Subject: [Pythonmac-SIG] Path Issues when using Swig (and OSX Leopard) In-Reply-To: <14821450.post@talk.nabble.com> References: <14821450.post@talk.nabble.com> Message-ID: <478BFEC4.6080603@noaa.gov> newbie73 wrote: > I installed v 2.5 of MacPython from python.org. I am able to build lots of > other packages using this setup, where packages are installed here: > /Library/Python/2.5/site-packages > > I cannot, however, find the include directories for the macpython > installation. Can anybody help me locate where they would be? I am trying > to follow the example in the swig.org tutorial the SWIG tutorial is out of date -- the "right" way to compile extensions for python is to use the distutils -- distutils will figure out all the paths, flags, etc for you. The latest version of the SWIG docs has instructions: http://www.swig.org/Doc1.3/Python.html#Python_nn6 Or look at various distutils instructions. -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 ed_hartley at mac.com Tue Jan 15 13:02:25 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Tue, 15 Jan 2008 12:02:25 +0000 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors Message-ID: From: michael ferraro Date: 13 January 2008 17:27:12 GMT To: Ronald Oussoren Cc: pythonmac-sig at python.org, michael ferraro , Edward Hartley Subject: Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors > thanks for your efforts > > m > > > On Jan 13, 2008, at 9:28 AM, Ronald Oussoren wrote: > > On 12 Jan, 2008, at 19:35, Edward Hartley wrote: > Hi Ronald, > further to my previous on py2app modulegraph > > With these changes py2app is not to working at all. > > Arghh.... I guess my merge of the version of py2app and friends > from Leopard wasn't complete. I'm currently working on some > cleanups in the pyobjc repository and a port of pyobjc to 64-bit > PPC and will look into this issue when that's finished. With some > luck that will be later today. > > BTW. Thank's for mentioning that the PyAvenger sample is broken as > well, that will make it a lot easier to debug the problem. Yes thanks for your efforts and a further calibration point in all of this: I downloaded the latest wxPython 2.8.7.1 for OS X 10.4 an update on my previous 2.8.0.1 version installed IIRC sometime after I upgraded to 2.5. The demo package for version 2.8.7.1 has a bundled demo.app which has a working demo of the wxPython glcanvas. So I conclude that building apps with OpenGL and wxPython presumably with py2app? If that's the case could anyone comment on which versions of py2app, setuptools etc.? Best Regards Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080115/e1a49f27/attachment.htm From robin at alldunn.com Wed Jan 16 06:51:20 2008 From: robin at alldunn.com (Robin Dunn) Date: Tue, 15 Jan 2008 21:51:20 -0800 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors In-Reply-To: References: Message-ID: <478D9B58.6060904@alldunn.com> Edward Hartley wrote: > ** > *From: *michael ferraro > > *Date: *13 January 2008 17:27:12 GMT > *To: *Ronald Oussoren > > *Cc: *pythonmac-sig at python.org , > michael ferraro >, Edward Hartley > > *Subject: **Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors* > > >> thanks for your efforts >> >> m >> >> >> On Jan 13, 2008, at 9:28 AM, Ronald Oussoren wrote: >> >> On 12 Jan, 2008, at 19:35, Edward Hartley wrote: >> Hi Ronald, >> further to my previous on py2app modulegraph >> >> With these changes py2app is not to working at all. >> >> Arghh.... I guess my merge of the version of py2app and friends from >> Leopard wasn't complete. I'm currently working on some cleanups in the >> pyobjc repository and a port of pyobjc to 64-bit PPC and will look >> into this issue when that's finished. With some luck that will be >> later today. >> >> BTW. Thank's for mentioning that the PyAvenger sample is broken as >> well, that will make it a lot easier to debug the problem. > > Yes thanks for your efforts and a further calibration point in all of this: > > I downloaded the latest wxPython 2.8.7.1 for OS X 10.4 an update on my > previous 2.8.0.1 version installed IIRC > sometime after I upgraded to 2.5. > The demo package for version 2.8.7.1 has a bundled demo.app which has a > working demo of the wxPython glcanvas. > So I conclude that building apps with OpenGL and wxPython presumably > with py2app? > If that's the case could anyone comment on which versions of py2app, > setuptools etc.? > wxPython's demo.app uses the old bundlebuilder.py tool in such a way that it is not bundling wxPython or anything else other than the demo code itself, and is using the installed Python, wxPython, PyOpenGL and any other packages it needs, all from the sys.path. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From robin at alldunn.com Wed Jan 16 06:51:45 2008 From: robin at alldunn.com (Robin Dunn) Date: Tue, 15 Jan 2008 21:51:45 -0800 Subject: [Pythonmac-SIG] Path Issues when using Swig (and OSX Leopard) In-Reply-To: <478BFEC4.6080603@noaa.gov> References: <14821450.post@talk.nabble.com> <478BFEC4.6080603@noaa.gov> Message-ID: <478D9B71.8040500@alldunn.com> Christopher Barker wrote: > newbie73 wrote: >> I installed v 2.5 of MacPython from python.org. I am able to build lots of >> other packages using this setup, where packages are installed here: >> /Library/Python/2.5/site-packages >> >> I cannot, however, find the include directories for the macpython >> installation. Can anybody help me locate where they would be? I am trying >> to follow the example in the swig.org tutorial > > the SWIG tutorial is out of date -- the "right" way to compile > extensions for python is to use the distutils -- distutils will figure > out all the paths, flags, etc for you. The latest version of the SWIG > docs has instructions: > > http://www.swig.org/Doc1.3/Python.html#Python_nn6 > > Or look at various distutils instructions. Or, if you really need to know where it is, you can just ask Python: python -c "import sys,os; print os.path.join(sys.prefix, 'include/python%s' % sys.version[:3])" ;-) -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From xkenneth at gmail.com Thu Jan 17 02:58:44 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Wed, 16 Jan 2008 19:58:44 -0600 Subject: [Pythonmac-SIG] Fwd: py2app with ZODB In-Reply-To: <04CDD5D3-F5ED-4AF7-8FDB-92E37C6A065E@possibleworlds.com> References: <9B4543EB-689F-4BDF-85CF-A97DD2963150@mac.com> <04CDD5D3-F5ED-4AF7-8FDB-92E37C6A065E@possibleworlds.com> Message-ID: <5C7ACE02-7A84-4151-BD29-EFE6FAFAB35E@gmail.com> All, So i've managed to get my app working but I had to jerry-rig it. I'm compiling it using this bash script: ____ rm -r build rm -r dist py2applet --make-setup Decoder.py python setup.py py2app --include DUtils,LabVIEWWrapper --packages PyDrill,mx,Ft,ZODB,persistent,transaction,zope --resources config.xml,chirps.xml,frames.xml,subframes.xml,logs > compile.log cp -r /usr/local/Zope-3.3.1-Python2.5/lib/python/zope/interface / Teledrill/Applications/Python/Decoder/dist/Decoder.app/Contents/ Resources/lib/python2.5/zope/ _____________ The problem lies in the fact that when i tell py2applet to use zope as a package, the only module from zope that it copies is "tests", so i have to copy the "interface" module by hand. Any ideas? Regards, Kenneth Miller On Jan 11, 2008, at 4:24 PM, michael ferraro wrote: > I am sorry, yes this did come in > > M > > the svn server returned errors when > I tried to co the trunk > > > > Begin forwarded message: > >> From: Tobias Rod?bel >> Date: January 10, 2008 6:45:04 PM EST >> To: Kenneth Miller >> Cc: pythonmac-sig at python.org >> Subject: Re: [Pythonmac-SIG] py2app with ZODB >> >> Hi Kenneth, >> >> I wrote an objc wrapper framework for the ZODB. The python part uses >> py2app. Maybe you find some hints there http:// >> zodbdata.sourceforge.net and especially there http://zodbdata.svn.sourceforge.net/viewvc/zodbdata/trunk/python/ >> >> Didn't get into serious trouble with ZODB and py2app as far as I >> remember. >> >> Cheers, >> Tobias >> >> On Jan 9, 2008, at 9:26 PM, Kenneth Miller wrote: >> >>> Hi All, >>> >>> I'm trying to build a Mac .app using py2app with python code that >>> uses ZODB, can anyone give me some help, or maybe an example? >>> >>> Regards, >>> Ken >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080116/fa498196/attachment.htm From grzessnik at interia.pl Thu Jan 17 12:57:48 2008 From: grzessnik at interia.pl (grzessnik at interia.pl) Date: 17 Jan 2008 12:57:48 +0100 Subject: [Pythonmac-SIG] Making py-appscript classes for Adobe Illustrator Message-ID: <20080117115748.189AB2BD8A1@f25.poczta.interia.pl> Hi. I'm py-appscript newbie and I'm trying to write a script for Adobe Illustrator. My idea is: make a class f.e. Object, with some methods (move(), rotate(), ...) make a subclass f.e. Rectangle and in this class I wan't to initialize new rectangles in my document. I have problems with reference to objects, I've made. my script is: class Obiekt: global kreator #this is variable, that is used to creates new objects kreator = mojDokument def __init__(self, kreator): # self.kreator = kreator pass def rotation(self, angle): rot = kreator.get_rotation_matrix(angle=angle) # self.obiekt.transform(using = rot) class Rectangle(Obiekt): def __init__(self, kreator, wspolrzedne=[0,0,100,100], nazwa='figura'): self.obiekt = kreator.make(new = k.rectangle, with_properties = {k.name: nazwa, k.bounds: wspolrzedne}) self.name = nazwa rect1 = Rectangle(mojDokument, [200,200, 100, 100]) rect2 = Rectangle(mojDokument, [100,200, 200, 100], 'prostokat02') both objects reference to the same path item app(u'/Applications/Adobe Illustrator CS2/Adobe Illustrator.app').documents[1].layers[1].path_items[1] app(u'/Applications/Adobe Illustrator CS2/Adobe Illustrator.app').documents[1].layers[1].path_items[1] I suppose, that is because, new objects are always numbered at 1. Can I refere to my created objects via names (self.name)? Thanks for help. Regards Grzessnik ---------------------------------------------------------------------- Sprawdz, ktore komorki sa najmodniejsze! Kliknij >>> http://link.interia.pl/f1cd4 From xkenneth at gmail.com Thu Jan 17 21:37:35 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Thu, 17 Jan 2008 14:37:35 -0600 Subject: [Pythonmac-SIG] Tk Aqua (Quit binding) Message-ID: <4fd268780801171237k6edffac7i6df6726321fd7b51@mail.gmail.com> All, Using the native python installation with Aqua Tk I've noticed that it automatically generates a "Quit" button/function. Is there any way that I can bind my own quit function to this call? Regards, Kenneth Miller -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080117/5494a8e7/attachment.htm From kw at codebykevin.com Thu Jan 17 22:03:18 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 17 Jan 2008 16:03:18 -0500 Subject: [Pythonmac-SIG] Tk Aqua (Quit binding) In-Reply-To: <4fd268780801171237k6edffac7i6df6726321fd7b51@mail.gmail.com> References: <4fd268780801171237k6edffac7i6df6726321fd7b51@mail.gmail.com> Message-ID: <478FC296.7030402@codebykevin.com> Kenneth Miller wrote: > > Using the native python installation with Aqua Tk I've noticed that it > automatically generates a "Quit" button/function. Is there any way that I > can bind my own quit function to this call? > I do something like this: #shut down def shutDown(self): fetchanswer = askyesno(title='Quit', message='Do you really wish to quit Phynchronicity?', detail='Quitting will terminate all operations.', parent=self, icon='info') if fetchanswer: sys.exit() And then bind it like thus: self.protocol('WM_DELETE_WINDOW', self.shutDown) self.bind('', lambda event: self.shutDown()) self.bind('', lambda event: self.shutDown()) HTH, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From hengist.podd at virgin.net Fri Jan 18 21:57:10 2008 From: hengist.podd at virgin.net (has) Date: Fri, 18 Jan 2008 20:57:10 +0000 Subject: [Pythonmac-SIG] Making py-appscript classes for Adobe Illustrator In-Reply-To: References: Message-ID: <8A304CBB-57F1-4CE5-AB6D-B3863C56017A@virgin.net> grzessnik wrote: > I'm py-appscript newbie and I'm trying to write a script for Adobe > Illustrator. > [...] > class Rectangle(Obiekt): > def __init__(self, kreator, wspolrzedne=[0,0,100,100], > nazwa='figura'): > self.obiekt = kreator.make(new = k.rectangle, > with_properties = {k.name: nazwa, k.bounds: wspolrzedne}) > self.name = nazwa > > rect1 = Rectangle(mojDokument, [200,200, 100, 100]) > rect2 = Rectangle(mojDokument, [100,200, 200, 100], 'prostokat02') > > both objects reference to the same path item > app(u'/Applications/Adobe Illustrator CS2/Adobe > Illustrator.app').documents[1].layers[1].path_items[1] > app(u'/Applications/Adobe Illustrator CS2/Adobe > Illustrator.app').documents[1].layers[1].path_items[1] > > I suppose, that is because, new objects are always numbered at 1. Yeah, Illustrator-returned references are pretty fragile, although it's less of an issue if you create an object then apply all of your desired transformations to it before you create the next one. > Can I refere to my created objects via names (self.name)? IIRC, objects aren't named by default; however you could generate your own unique names easily enough. Assign each object a unique name via the 'make' command's 'with properties' parameter, and then use that name in any future references you construct yourself. HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From xkenneth at gmail.com Sat Jan 19 07:47:34 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Sat, 19 Jan 2008 00:47:34 -0600 Subject: [Pythonmac-SIG] lxml with native leopard python2.5 Message-ID: Anyone had any success with this? Are there any binaries available? Regards, Kenneth Miller From charles.hartman at conncoll.edu Sat Jan 19 20:40:48 2008 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Sat, 19 Jan 2008 14:40:48 -0500 Subject: [Pythonmac-SIG] Re-beginner's simple question Message-ID: <4C42CA5D-621F-4092-854F-600E575305C2@conncoll.edu> I mean *really* simple: I've been away from Python programming for a couple of years, and I've just gotten a query about an old open-source program posted on my website. I may have a fix for the problem the user encountered, at least when I run from inside the Wing IDE. My question is, what is the current best/simplest way to build a freestanding application? I tried "python setup.py" with my old setup.py file, but I get an error: setuptools not found. Maybe I just need to fix my path? It's been a couple of systems (a couple of computers, for that matter) since I did this, and though I've kept up with current versions of Python (2.5), Wing, and wxPython (2.8.x), I've probably neglected some basic housekeeping. Pointers to a simple how-to-build-an-app doc would be welcome. Thanks for any help. Charles Hartman From xkenneth at gmail.com Sat Jan 19 22:20:50 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Sat, 19 Jan 2008 15:20:50 -0600 Subject: [Pythonmac-SIG] Re-beginner's simple question In-Reply-To: <4C42CA5D-621F-4092-854F-600E575305C2@conncoll.edu> References: <4C42CA5D-621F-4092-854F-600E575305C2@conncoll.edu> Message-ID: <4fd268780801191320s6ce82b5ld569075ecff303ad@mail.gmail.com> Check out py2applet, I use it all the time. Regards, Kenneth Miller On Jan 19, 2008 1:40 PM, Charles Hartman wrote: > I mean *really* simple: I've been away from Python programming for a > couple of years, and I've just gotten a query about an old open-source > program posted on my website. I may have a fix for the problem the > user encountered, at least when I run from inside the Wing IDE. > > My question is, what is the current best/simplest way to build a > freestanding application? I tried "python setup.py" with my old > setup.py file, but I get an error: setuptools not found. Maybe I just > need to fix my path? It's been a couple of systems (a couple of > computers, for that matter) since I did this, and though I've kept up > with current versions of Python (2.5), Wing, and wxPython (2.8.x), > I've probably neglected some basic housekeeping. > > Pointers to a simple how-to-build-an-app doc would be welcome. Thanks > for any help. > > Charles Hartman > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080119/e49f186f/attachment.htm From xkenneth at gmail.com Sun Jan 20 00:19:07 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Sat, 19 Jan 2008 17:19:07 -0600 Subject: [Pythonmac-SIG] Re-beginner's simple question In-Reply-To: <894CEA5B-8F90-4155-954C-5E4C92DA5436@conncoll.edu> References: <4C42CA5D-621F-4092-854F-600E575305C2@conncoll.edu> <4fd268780801191320s6ce82b5ld569075ecff303ad@mail.gmail.com> <894CEA5B-8F90-4155-954C-5E4C92DA5436@conncoll.edu> Message-ID: <803FFAB4-E552-459B-A5C0-4B5F47B5412C@gmail.com> No, it bundles a python binary along with your source in a .app package. Regards, Kenneth Miller On Jan 19, 2008, at 4:55 PM, Charles Hartman wrote: > Thank you very much. Doesn't that depend on whatever Python is built- > in on the end-user's machine? I'd have to do some testing (which I > may not have properly equipped machines to do) to see what my app > will work with . . . > > Best, > Charles Hartman > > > On Jan 19, 2008, at 4:20 PM, Kenneth Miller wrote: > >> Check out py2applet, I use it all the time. >> >> Regards, >> Kenneth Miller >> >> On Jan 19, 2008 1:40 PM, Charles Hartman < charles.hartman at conncoll.edu >> > wrote: >> I mean *really* simple: I've been away from Python programming for a >> couple of years, and I've just gotten a query about an old open- >> source >> program posted on my website. I may have a fix for the problem the >> user encountered, at least when I run from inside the Wing IDE. >> >> My question is, what is the current best/simplest way to build a >> freestanding application? I tried "python setup.py" with my old >> setup.py file, but I get an error: setuptools not found. Maybe I just >> need to fix my path? It's been a couple of systems (a couple of >> computers, for that matter) since I did this, and though I've kept up >> with current versions of Python (2.5), Wing, and wxPython (2.8.x), >> I've probably neglected some basic housekeeping. >> >> Pointers to a simple how-to-build-an-app doc would be welcome. Thanks >> for any help. >> >> Charles Hartman >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080119/61d2c9fa/attachment.htm From nirnimesh at gmail.com Sun Jan 20 02:25:57 2008 From: nirnimesh at gmail.com (Nirnimesh) Date: Sat, 19 Jan 2008 17:25:57 -0800 Subject: [Pythonmac-SIG] Including dependency modules Message-ID: Hi, I know that py2app automatically includes dependency modules which my main script needs. My application has some loadable python modules which, I need py2app to figure out and include their dependency modules. I have tried specifying them as setup_options['options']['py2app']['includes'] = [list of loadable modules] but to no avail. What am I doing wrong? How can I force py2app to figure out the dependency modules for them? Any help is greatly appreciated. Thanks Nirnimesh -- Gravitation is not responsible for people falling in love. -- Albert Einstein. From skip at pobox.com Sat Jan 19 21:43:05 2008 From: skip at pobox.com (skip at pobox.com) Date: Sat, 19 Jan 2008 14:43:05 -0600 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... Message-ID: <18322.24793.66158.694691@montanaro.dyndns.org> My Powerbook G4 is getting rather long-in-the-tooth. It's display is starting to act up, so I think I'm going to buy a new Mac something in the fairly near future, but I'm not yet sure what. To that end, I've started a table of pystone numbers for Macs on the Python wiki: http://wiki.python.org/moin/MacPython/MacModelPerformance If you could help by adding some rows to the table, especially for current MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd appreciate it. Thanks, -- Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ The major difference between Democrats and Republicans is that Republicans don't know that Randy Newman's lyrics are full of sarcasm. From xkenneth at gmail.com Sun Jan 20 09:26:32 2008 From: xkenneth at gmail.com (Kenneth Miller) Date: Sun, 20 Jan 2008 02:26:32 -0600 Subject: [Pythonmac-SIG] Re-beginner's simple question In-Reply-To: <194C5C28-CE35-492F-B4C1-45DD10C17AE4@conncoll.edu> References: <4C42CA5D-621F-4092-854F-600E575305C2@conncoll.edu> <4fd268780801191320s6ce82b5ld569075ecff303ad@mail.gmail.com> <894CEA5B-8F90-4155-954C-5E4C92DA5436@conncoll.edu> <803FFAB4-E552-459B-A5C0-4B5F47B5412C@gmail.com> <194C5C28-CE35-492F-B4C1-45DD10C17AE4@conncoll.edu> Message-ID: <67FE8E5C-6346-4030-86C2-2B358039C94F@gmail.com> Charles, That seems normal. Here's a bash script I use for compiling my application. I don't mess with the setup.py once it's generated, and this bash script seems to do the trick. rm -r build rm -r dist py2applet --make-setup Decoder.py python setup.py py2app --include DUtils,LabVIEWWrapper --packages PyDrill,mx,Ft,ZODB,persistent,transaction,zope --resources config.xml,file1.xml,file2.xml,file3.xml,logs > compile.log cp -r /usr/local/Zope-3.3.1-Python2.5/lib/python/zope/interface / Teledrill/Applications/Python/Decoder/dist/Decoder.app/Contents/ Resources/lib/pytho n2.5/zope/ The first two lines simply clean out the old build. The third line creates the setup.py file. The fourth line actually compiles the app. The include files are two .py files, local modules, that i need to include. The packages are python packages on the python path that I want to include for use. The resources are include files that my app needs, i've obscured their actual names, and the command dumps out to a log. The last line is a really silly way to correct a bug in py2app. When i tell it to include zope, it doesn't include the "interface" sub- module, so I forcefully copy it into the app. I'm not sure if this is the right way to do it, but it's worked for me so far. Good luck. Also feel free to ask any time. I ask questions all of the time. Regards, Kenneth Miller On Jan 19, 2008, at 6:59 PM, Charles Hartman wrote: > Hm. I'm very puzzled. I tried > python setup.py py2app -A > and ended up with a tiny 192Kb "application." It runs fine on my > machine. But it surely doesn't have a Python built into it, at that > size. (The regular "python setup.py py2app" produces a monstrous > 40Mb file.) > > I don't mean to keep nagging you for help. Where's the best place to > find an explanation of the details of this? > > Many thanks. > > Charles Hartman > > On Jan 19, 2008, at 6:19 PM, Kenneth Miller wrote: > >> No, it bundles a python binary along with your source in a .app >> package. >> >> Regards, >> Kenneth Miller >> >> On Jan 19, 2008, at 4:55 PM, Charles Hartman > > wrote: >> >>> Thank you very much. Doesn't that depend on whatever Python is >>> built-in on the end-user's machine? I'd have to do some testing >>> (which I may not have properly equipped machines to do) to see >>> what my app will work with . . . >>> >>> Best, >>> Charles Hartman >>> >>> >>> On Jan 19, 2008, at 4:20 PM, Kenneth Miller wrote: >>> >>>> Check out py2applet, I use it all the time. >>>> >>>> Regards, >>>> Kenneth Miller >>>> >>>> On Jan 19, 2008 1:40 PM, Charles Hartman < charles.hartman at conncoll.edu >>>> > wrote: >>>> I mean *really* simple: I've been away from Python programming >>>> for a >>>> couple of years, and I've just gotten a query about an old open- >>>> source >>>> program posted on my website. I may have a fix for the problem the >>>> user encountered, at least when I run from inside the Wing IDE. >>>> >>>> My question is, what is the current best/simplest way to build a >>>> freestanding application? I tried "python setup.py" with my old >>>> setup.py file, but I get an error: setuptools not found. Maybe I >>>> just >>>> need to fix my path? It's been a couple of systems (a couple of >>>> computers, for that matter) since I did this, and though I've >>>> kept up >>>> with current versions of Python (2.5), Wing, and wxPython (2.8.x), >>>> I've probably neglected some basic housekeeping. >>>> >>>> Pointers to a simple how-to-build-an-app doc would be welcome. >>>> Thanks >>>> for any help. >>>> >>>> Charles Hartman >>>> >>>> _______________________________________________ >>>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080120/aba9ac65/attachment-0001.htm From ronaldoussoren at mac.com Sun Jan 20 10:27:43 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 20 Jan 2008 10:27:43 +0100 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <18322.24793.66158.694691@montanaro.dyndns.org> References: <18322.24793.66158.694691@montanaro.dyndns.org> Message-ID: <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> On 19 Jan, 2008, at 21:43, skip at pobox.com wrote: > > My Powerbook G4 is getting rather long-in-the-tooth. It's display is > starting to act up, so I think I'm going to buy a new Mac something > in the > fairly near future, but I'm not yet sure what. To that end, I've > started a > table of pystone numbers for Macs on the Python wiki: > > http://wiki.python.org/moin/MacPython/MacModelPerformance > > If you could help by adding some rows to the table, especially for > current > MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd > appreciate it. I've posted some numbers as well, which in itself doesn't warrent an e- mail. What is interesting though is the difference between 32-bit and 64-bit code: Python 2.5.2a0 (60124) 32-bit: 52083 64-bit: 60871 64-bit code is significantly faster here (all of this on a MacBook Pro 2.33Ghz/3GByte) Ronald > > > Thanks, > > -- > Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ > > The major difference between Democrats and Republicans is that > Republicans don't know that Randy Newman's lyrics are full of sarcasm. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080120/9f544880/attachment.bin From ronaldoussoren at mac.com Sun Jan 20 10:33:42 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 20 Jan 2008 10:33:42 +0100 Subject: [Pythonmac-SIG] Re-beginner's simple question In-Reply-To: <67FE8E5C-6346-4030-86C2-2B358039C94F@gmail.com> References: <4C42CA5D-621F-4092-854F-600E575305C2@conncoll.edu> <4fd268780801191320s6ce82b5ld569075ecff303ad@mail.gmail.com> <894CEA5B-8F90-4155-954C-5E4C92DA5436@conncoll.edu> <803FFAB4-E552-459B-A5C0-4B5F47B5412C@gmail.com> <194C5C28-CE35-492F-B4C1-45DD10C17AE4@conncoll.edu> <67FE8E5C-6346-4030-86C2-2B358039C94F@gmail.com> Message-ID: On 20 Jan, 2008, at 9:26, Kenneth Miller wrote: > Charles, > > That seems normal. Here's a bash script I use for compiling > my application. I don't mess with the setup.py once it's generated, > and this bash script seems to do the trick. > > rm -r build > rm -r dist > > py2applet --make-setup Decoder.py > python setup.py py2app --include DUtils,LabVIEWWrapper --packages > PyDrill,mx,Ft,ZODB,persistent,transaction,zope --resources > config.xml,file1.xml,file2.xml,file3.xml,logs > compile.log > > cp -r /usr/local/Zope-3.3.1-Python2.5/lib/python/zope/interface / > Teledrill/Applications/Python/Decoder/dist/Decoder.app/Contents/ > Resources/lib/pytho > n2.5/zope/ > > The first two lines simply clean out the old build. > The third line creates the setup.py file. > The fourth line actually compiles the app. The include files are > two .py files, local modules, that i need to include. The packages > are python packages on the python path that I want to include for > use. The resources are include files that my app needs, i've > obscured their actual names, and the command dumps out to a log. > The last line is a really silly way to correct a bug in py2app. When > i tell it to include zope, it doesn't include the "interface" sub- > module, so I forcefully copy it into the app. > > I'm not sure if this is the right way to do it, but it's worked for > me so far. It works and hence is right in some way, but it is far less than optimal. First of all: why don't you maintain a setup.py file instead of regenerating a suboptimal one every time? All options you now pass on the command-line can also be specified in the setup.py file, which mostly does away with the need of a shell script. Copying zope.interface manually into your application also doesn't seem right. The correct way would be to either fix the problem that causes py2app to not detect that zope.interface is needed in the first place, or to write a py2app recipe that will automaticly copy zope.interface into the app bundle when needed. Could you on the very least create a small application that demonstrates the problem? That would make it a lot easier to debug the problem. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080120/5dd7d155/attachment.bin From skip at pobox.com Sun Jan 20 16:27:37 2008 From: skip at pobox.com (skip at pobox.com) Date: Sun, 20 Jan 2008 09:27:37 -0600 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> Message-ID: <18323.26729.11295.975487@montanaro.dyndns.org> Ronald> What is interesting though is the difference between 32-bit and Ronald> 64-bit code: Ronald> Python 2.5.2a0 (60124) Ronald> 32-bit: 52083 Ronald> 64-bit: 60871 Ronald> 64-bit code is significantly faster here (all of this on a Ronald> MacBook Pro 2.33Ghz/3GByte) Thanks. Is that something available on the entire line of Core 2 Duo CPUs? Is it something I can enable on my dual processor G5 or my G4 PowerBook? If so, let me know and I'll add more rows. Skip From ronaldoussoren at mac.com Sun Jan 20 16:36:09 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 20 Jan 2008 16:36:09 +0100 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <18323.26729.11295.975487@montanaro.dyndns.org> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <18323.26729.11295.975487@montanaro.dyndns.org> Message-ID: <84CC5225-2AA6-4821-BAC7-F24D259FC376@mac.com> On 20 Jan, 2008, at 16:27, skip at pobox.com wrote: > Ronald> What is interesting though is the difference between 32- > bit and > Ronald> 64-bit code: > > Ronald> Python 2.5.2a0 (60124) > > Ronald> 32-bit: 52083 > Ronald> 64-bit: 60871 > > Ronald> 64-bit code is significantly faster here (all of this on a > Ronald> MacBook Pro 2.33Ghz/3GByte) > > Thanks. Is that something available on the entire line of Core 2 > Duo CPUs? > Is it something I can enable on my dual processor G5 or my G4 > PowerBook? If > so, let me know and I'll add more rows. All Core2 systems are capable of running 64-bit code. I currently build 64-bit interpreters using this command-line: ./configure --disable-toolbox-glue CFLAGS="-arch x86_64" LDFLAGS="- arch x86_64" OPT="-arch x86_64 -O3 -fwrapv" (and then the make/make install dance). G4 systems cannot run 64-bit code, G5's are the only PPC systems capable of running 64-bit code. The framework that Apple ships with leopard is 64-bit as well, but they don't ship a 64-bit commandline interpreter with it. That's easy enough to fix, but I haven't managed to actually make time to do that. Another long term plan, but probably shorter-term now that I know how much difference running in 64-bit mode makes, is creating a patch for python-2.6 that makes is possible to do a 4-way universal build on Leopard systems. Ronald > > > Skip -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080120/b2c428cd/attachment.bin From hraban at fiee.net Sun Jan 20 17:12:42 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sun, 20 Jan 2008 17:12:42 +0100 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <18322.24793.66158.694691@montanaro.dyndns.org> References: <18322.24793.66158.694691@montanaro.dyndns.org> Message-ID: Am 2008-01-19 um 21:43 schrieb skip at pobox.com: > If you could help by adding some rows to the table, especially for > current > MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd > appreciate it. I guess it doesn't really matter, but my trusty old steam powered G4/400 on OSX 10.4 gets... - 6112 with Apple's 2.3 - 7788 with 2.4.4 Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From daniellord at mac.com Sun Jan 20 19:23:02 2008 From: daniellord at mac.com (Daniel Lord) Date: Sun, 20 Jan 2008 10:23:02 -0800 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> Message-ID: <15320647-F813-431F-9658-3373195ECE5D@mac.com> I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB RAM) and was a bit surprised to see little improvement over the Core Duo numbers. 63019.7 pystones/second I am assuming the GIL is limiting threading and therefore I am really running on one or two cores--hence the tangible improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth increase as well. This is the 32-bit number, I'll find some time to try 64-bit--but first want to make sure it doesn't mess up my system as I am using Apple Python 2.5.1 exclusively right now and want to avoid the split brain problem. Daniel On Jan 20, 2008, at 1:27 AM, Ronald Oussoren wrote: > > On 19 Jan, 2008, at 21:43, skip at pobox.com wrote: > >> >> My Powerbook G4 is getting rather long-in-the-tooth. It's display is >> starting to act up, so I think I'm going to buy a new Mac something >> in the >> fairly near future, but I'm not yet sure what. To that end, I've >> started a >> table of pystone numbers for Macs on the Python wiki: >> >> http://wiki.python.org/moin/MacPython/MacModelPerformance >> >> If you could help by adding some rows to the table, especially for >> current >> MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd >> appreciate it. > > I've posted some numbers as well, which in itself doesn't warrent an > e-mail. What is interesting though is the difference between 32-bit > and 64-bit code: > > Python 2.5.2a0 (60124) > > 32-bit: 52083 > 64-bit: 60871 > > 64-bit code is significantly faster here (all of this on a MacBook > Pro 2.33Ghz/3GByte) > > Ronald >> >> >> Thanks, >> >> -- >> Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ >> >> The major difference between Democrats and Republicans is that >> Republicans don't know that Randy Newman's lyrics are full of >> sarcasm. >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From skip at pobox.com Sun Jan 20 20:53:09 2008 From: skip at pobox.com (skip at pobox.com) Date: Sun, 20 Jan 2008 13:53:09 -0600 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <15320647-F813-431F-9658-3373195ECE5D@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> Message-ID: <18323.42661.966996.710992@montanaro.dyndns.org> Daniel> I am assuming the GIL is limiting threading and therefore I am Daniel> really running on one or two cores--hence the tangible Daniel> improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a Daniel> bit of the memory bandwidth increase as well. The GIL doesn't enter into things here. The pystones benchmark isn't multithreaded so even if Python was free-threaded the pystones benchmark wouldn't benefit from it. Skip From Jack.Jansen at cwi.nl Sun Jan 20 20:53:53 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sun, 20 Jan 2008 20:53:53 +0100 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <15320647-F813-431F-9658-3373195ECE5D@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> Message-ID: On 20-Jan-2008, at 19:23 , Daniel Lord wrote: > I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB > RAM) and was a bit surprised to see little improvement over the Core > Duo numbers. > > 63019.7 pystones/second > > I am assuming the GIL is limiting threading and therefore I am really > running on one or two cores--hence the tangible improvement is just > CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth > increase as well. Interesting... My first generation quadcore at 2.6 Ghz clocks at 62578.2. So there's another limiting factor: from my machine to yours is a 15% speed bump, but only a 1% increase in pystone numbers. Somebody told me recently that MacOSX is not very good for fast task switching with multiprocessors, because apparently (his words, and possibly misrepresented by me) the implementation of semaphores sucks. This seems to corroborate that. Hmm, what is your bus speed? Mine is 1.33 Ghz, is yours that as well is it 1.5 Ghz? If the former it could be that semaphores somehow run at bus speed and semaphore overhead dwarves any processing done. If your bus runs at 1.5Ghz there must be yet another bottleneck... -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From ibaird at gmail.com Sun Jan 20 21:01:28 2008 From: ibaird at gmail.com (Ian Baird) Date: Sun, 20 Jan 2008 13:01:28 -0700 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> Message-ID: It would be interesting to see if that held up on ppc64. My guess is that it would benchmark slower in 64-bit mode than 32-bit mode on ppc. - Ian On Jan 20, 2008, at 2:27 AM, Ronald Oussoren wrote: > > On 19 Jan, 2008, at 21:43, skip at pobox.com wrote: > >> >> My Powerbook G4 is getting rather long-in-the-tooth. It's display is >> starting to act up, so I think I'm going to buy a new Mac something >> in the >> fairly near future, but I'm not yet sure what. To that end, I've >> started a >> table of pystone numbers for Macs on the Python wiki: >> >> http://wiki.python.org/moin/MacPython/MacModelPerformance >> >> If you could help by adding some rows to the table, especially for >> current >> MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd >> appreciate it. > > I've posted some numbers as well, which in itself doesn't warrent an > e-mail. What is interesting though is the difference between 32-bit > and 64-bit code: > > Python 2.5.2a0 (60124) > > 32-bit: 52083 > 64-bit: 60871 > > 64-bit code is significantly faster here (all of this on a MacBook > Pro 2.33Ghz/3GByte) > > Ronald >> >> >> Thanks, >> >> -- >> Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ >> >> The major difference between Democrats and Republicans is that >> Republicans don't know that Randy Newman's lyrics are full of >> sarcasm. >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From skip at pobox.com Sun Jan 20 21:16:00 2008 From: skip at pobox.com (skip at pobox.com) Date: Sun, 20 Jan 2008 14:16:00 -0600 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> Message-ID: <18323.44032.7331.256572@montanaro.dyndns.org> Ian> It would be interesting to see if that held up on ppc64. My guess Ian> is that it would benchmark slower in 64-bit mode than 32-bit mode Ian> on ppc. I added a pystone entry to the table for my G5 with the Python 2.6a0 interpreter compiled with -fast -fPIC -fwrapv. I saw a reasonable speedup (35461 -> 37313). Skip From Jack.Jansen at cwi.nl Sun Jan 20 21:39:43 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sun, 20 Jan 2008 21:39:43 +0100 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <18323.42661.966996.710992@montanaro.dyndns.org> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> <18323.42661.966996.710992@montanaro.dyndns.org> Message-ID: <9178BA31-4989-43F2-BC71-53AED00D68C9@cwi.nl> On 20-Jan-2008, at 20:53 , skip at pobox.com wrote: > Daniel> I am assuming the GIL is limiting threading and therefore > I am > Daniel> really running on one or two cores--hence the tangible > Daniel> improvement is just CPU speed: from 2.33 GHz to 3.0 GHz > and a > Daniel> bit of the memory bandwidth increase as well. > > The GIL doesn't enter into things here. The pystones benchmark isn't > multithreaded so even if Python was free-threaded the pystones > benchmark > wouldn't benefit from it. Hmm, you're right. And there aren't any magic threads either (happens far too often nowadays, grmpf), I just checked that with gdb. So: any other speculations as to why 2.66Ghz->3.0Ghz gives only a 1% increase in pystones? I can't physically reach my Mac Pro for another week, but maybe someone else could try disabling three cores? If that increases the pystone number (in stead of decreasing it) this could point to a processor affinity problem in MacOSX. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From ibaird at gmail.com Sun Jan 20 22:02:40 2008 From: ibaird at gmail.com (Ian Baird) Date: Sun, 20 Jan 2008 14:02:40 -0700 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <18323.44032.7331.256572@montanaro.dyndns.org> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <18323.44032.7331.256572@montanaro.dyndns.org> Message-ID: <4127B074-751E-49A2-8348-44EB61B59294@gmail.com> Hmm - that appears to be negligible if not within the bounds of statistical error. However, you're right - a small bump in speed. A Quick Aside: Benchmarking the diff routines on my app (Changes - http://changesapp.com/) showed a 10-15% performance increase going from 32-bit i386 to 64- bit x86-64. I'm pretty sure that this is due to vast architectural improvements in x86-64 vs. i386 (more GPRs, etc.). Unfortunately, due to bugs in 64-bit Cocoa, I can't ship a 64-bit binary. The results of benchmarking 32-bit ppc to 64-bit ppc64 showed a negligible/non- existent improvement. This app was implemented using C/C++ and ObjC. - Ian On Jan 20, 2008, at 1:16 PM, skip at pobox.com wrote: > > Ian> It would be interesting to see if that held up on ppc64. My > guess > Ian> is that it would benchmark slower in 64-bit mode than 32-bit > mode > Ian> on ppc. > > I added a pystone entry to the table for my G5 with the Python 2.6a0 > interpreter compiled with -fast -fPIC -fwrapv. I saw a reasonable > speedup > (35461 -> 37313). > > Skip From skip at pobox.com Mon Jan 21 00:44:13 2008 From: skip at pobox.com (skip at pobox.com) Date: Sun, 20 Jan 2008 17:44:13 -0600 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <9178BA31-4989-43F2-BC71-53AED00D68C9@cwi.nl> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> <18323.42661.966996.710992@montanaro.dyndns.org> <9178BA31-4989-43F2-BC71-53AED00D68C9@cwi.nl> Message-ID: <18323.56525.753903.188933@montanaro.dyndns.org> Jack> So: any other speculations as to why 2.66Ghz->3.0Ghz gives only a 1% Jack> increase in pystones? Maybe compilation flags. Skip From ronaldoussoren at mac.com Mon Jan 21 08:05:10 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 21 Jan 2008 08:05:10 +0100 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <15320647-F813-431F-9658-3373195ECE5D@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> Message-ID: <9F57BE21-F805-451D-A02C-3EB0CDA4A88A@mac.com> On 20 Jan, 2008, at 19:23, Daniel Lord wrote: > I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB > RAM) and was a bit surprised to see little improvement over the Core > Duo numbers. > > 63019.7 pystones/second > > I am assuming the GIL is limiting threading and therefore I am really > running on one or two cores--hence the tangible improvement is just > CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth > increase as well. Pystone is completely single-threaded. Beyond that multi-threaded Python code cannot make optimal use from multiple CPU's unless most threads run C code (due to the GIL). > > > This is the 32-bit number, I'll find some time to try 64-bit--but > first want to make sure it doesn't mess up my system as I am using > Apple Python 2.5.1 exclusively right now and want to avoid the split > brain problem. That's easy enough: install the 64-bit version in a location that is not on your shell's search path, and don't install it as a framework. Ronald > > > Daniel > > On Jan 20, 2008, at 1:27 AM, Ronald Oussoren wrote: > >> >> On 19 Jan, 2008, at 21:43, skip at pobox.com wrote: >> >>> >>> My Powerbook G4 is getting rather long-in-the-tooth. It's display >>> is >>> starting to act up, so I think I'm going to buy a new Mac something >>> in the >>> fairly near future, but I'm not yet sure what. To that end, I've >>> started a >>> table of pystone numbers for Macs on the Python wiki: >>> >>> http://wiki.python.org/moin/MacPython/MacModelPerformance >>> >>> If you could help by adding some rows to the table, especially for >>> current >>> MacBook, MacBook Pro or (in the near future, MacBook Air) models, >>> I'd >>> appreciate it. >> >> I've posted some numbers as well, which in itself doesn't warrent an >> e-mail. What is interesting though is the difference between 32-bit >> and 64-bit code: >> >> Python 2.5.2a0 (60124) >> >> 32-bit: 52083 >> 64-bit: 60871 >> >> 64-bit code is significantly faster here (all of this on a MacBook >> Pro 2.33Ghz/3GByte) >> >> Ronald >>> >>> >>> Thanks, >>> >>> -- >>> Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ >>> >>> The major difference between Democrats and Republicans is that >>> Republicans don't know that Randy Newman's lyrics are full of >>> sarcasm. >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080121/f5aa023d/attachment.bin From daniellord at mac.com Mon Jan 21 08:07:09 2008 From: daniellord at mac.com (Daniel Lord) Date: Sun, 20 Jan 2008 23:07:09 -0800 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <9F57BE21-F805-451D-A02C-3EB0CDA4A88A@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> <9F57BE21-F805-451D-A02C-3EB0CDA4A88A@mac.com> Message-ID: Will do, though I am not expecting great results given what we know now. I'll post the numbers as soon as I can get it done. On Jan 20, 2008, at 11:05 PM, Ronald Oussoren wrote: > > On 20 Jan, 2008, at 19:23, Daniel Lord wrote: > >> I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB >> RAM) and was a bit surprised to see little improvement over the Core >> Duo numbers. >> >> 63019.7 pystones/second >> >> I am assuming the GIL is limiting threading and therefore I am >> really >> running on one or two cores--hence the tangible improvement is just >> CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth >> increase as well. > > Pystone is completely single-threaded. Beyond that multi-threaded > Python code cannot make optimal use from multiple CPU's unless most > threads run C code (due to the GIL). >> >> >> This is the 32-bit number, I'll find some time to try 64-bit--but >> first want to make sure it doesn't mess up my system as I am using >> Apple Python 2.5.1 exclusively right now and want to avoid the split >> brain problem. > > That's easy enough: install the 64-bit version in a location that is > not on your shell's search path, and don't install it as a framework. > > Ronald > >> >> >> Daniel >> >> On Jan 20, 2008, at 1:27 AM, Ronald Oussoren wrote: >> >>> >>> On 19 Jan, 2008, at 21:43, skip at pobox.com wrote: >>> >>>> >>>> My Powerbook G4 is getting rather long-in-the-tooth. It's >>>> display is >>>> starting to act up, so I think I'm going to buy a new Mac something >>>> in the >>>> fairly near future, but I'm not yet sure what. To that end, I've >>>> started a >>>> table of pystone numbers for Macs on the Python wiki: >>>> >>>> http://wiki.python.org/moin/MacPython/MacModelPerformance >>>> >>>> If you could help by adding some rows to the table, especially for >>>> current >>>> MacBook, MacBook Pro or (in the near future, MacBook Air) models, >>>> I'd >>>> appreciate it. >>> >>> I've posted some numbers as well, which in itself doesn't warrent an >>> e-mail. What is interesting though is the difference between 32-bit >>> and 64-bit code: >>> >>> Python 2.5.2a0 (60124) >>> >>> 32-bit: 52083 >>> 64-bit: 60871 >>> >>> 64-bit code is significantly faster here (all of this on a MacBook >>> Pro 2.33Ghz/3GByte) >>> >>> Ronald >>>> >>>> >>>> Thanks, >>>> >>>> -- >>>> Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ >>>> >>>> The major difference between Democrats and Republicans is that >>>> Republicans don't know that Randy Newman's lyrics are full of >>>> sarcasm. >>>> _______________________________________________ >>>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>> >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > From daniellord at mac.com Mon Jan 21 08:05:36 2008 From: daniellord at mac.com (Daniel Lord) Date: Sun, 20 Jan 2008 23:05:36 -0800 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> Message-ID: <56701870-3CF5-4746-B09F-C3F63A689D64@mac.com> Jack, My bus is 1.33 GHz--I think the 2nd Gen Quad-cores are bumped to 1.5 GHz maybe. I'll see if there is anything I can do to bump the numbers. My system is just like yours but with a second Quad core chip that only a few apps can take advantage of. It helps me with Modo, Lightwave, Shake, Photoshop, and Final Cut Studio (which is why I got it in the first place) but not with Python and most other apps as well. Skip is right of course--the Global Interpreter Lock doesn't play here since the benchmark wasn't written to take advantage of multi-core machines--silly me I thought any good benchmark would be. In the end my error doesn't matter since, if one made the benchmark multi- threaded in the true sense of the term, the GIL would clamp down and limit the benefit anyway. Which is what I was alluding to and should have been more clear about. My point was that, as I understand it, thanks to the GIL--Python cannot easily take advantage of multi-cores period even when the program uses multiple threads--it it is a limitation of the implementation of the language interpreter. I guess that tells us we ought to write multi-core code in C/C++/ObjC instead. Either that or Python's implementation needs to embrace threading more expansively. Still Python is a great language as it is. No one language fits all-- as much as we'd like it to for simplicity's sake. Daniel On Jan 20, 2008, at 11:53 AM, Jack Jansen wrote: > > On 20-Jan-2008, at 19:23 , Daniel Lord wrote: > >> I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB >> RAM) and was a bit surprised to see little improvement over the Core >> Duo numbers. >> >> 63019.7 pystones/second >> >> I am assuming the GIL is limiting threading and therefore I am >> really >> running on one or two cores--hence the tangible improvement is just >> CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth >> increase as well. > > > Interesting... > My first generation quadcore at 2.6 Ghz clocks at 62578.2. > > So there's another limiting factor: from my machine to yours is a > 15% speed bump, but only a 1% increase in pystone numbers. > > Somebody told me recently that MacOSX is not very good for fast task > switching with multiprocessors, because apparently (his words, and > possibly misrepresented by me) the implementation of semaphores > sucks. This seems to corroborate that. > > Hmm, what is your bus speed? Mine is 1.33 Ghz, is yours that as well > is it 1.5 Ghz? If the former it could be that semaphores somehow run > at bus speed and semaphore overhead dwarves any processing done. If > your bus runs at 1.5Ghz there must be yet another bottleneck... > -- > Jack Jansen, , http://www.cwi.nl/~jack > If I can't dance I don't want to be part of your revolution -- Emma > Goldman > > From georgewr at bigpond.net.au Mon Jan 21 07:07:45 2008 From: georgewr at bigpond.net.au (George Wright) Date: Mon, 21 Jan 2008 17:07:45 +1100 Subject: [Pythonmac-SIG] Help with path settings In-Reply-To: References: Message-ID: I'm having trouble with PYTHONPATH .. george-g5:~ georgewright$ env TERM_PROGRAM=Apple_Terminal ... PYTHONDOCS=/Users/georgewright/Python_stuff/Python-Docs-2.4.2/ PATH=/usr/local/bin:/usr/local/sbin:/usr/local/:/usr/local/mysql/bin:/ opt/local/bin/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:/ opt/local/bin/:/usr/local/include/:/System/Library/Frameworks/ Python.framework/Versions/Current/bin/ ... PYTHONPATH =/usr/local/Zope-3.3.0/lib/python I want to change this to PYTHONPATH='' I can't find where I set it to the current value. I know I set it that way some months ago so I could do zope things in interactive python - but I don't recall how! I have changed .bash_profile to what I want and searched for .pth files that might help but to no avail. I have changed .profile too Also the PATH=... :/System/Library/Frameworks/Python.framework/ Versions/Current/bin/ points to a 2.3 installation and I want to change that to ... / Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ and I don't know how to do it. (I actually get python 2.4 when I start it in terminal!) Can anyone help me sort out this mess? George Wright http://users.bigpond.net.au/George.Wright/ http://www.labyrinth.net.au/~gwright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080121/37d24962/attachment-0001.htm From ed_hartley at mac.com Mon Jan 21 12:31:36 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Mon, 21 Jan 2008 11:31:36 +0000 Subject: [Pythonmac-SIG] py2app 0.4.2 recipe errors Message-ID: > > Edward Hartley wrote: > > ** > > *From: *michael ferraro > > > > *Date: *13 January 2008 17:27:12 GMT > > *To: *Ronald Oussoren > > > > *Cc: *pythonmac-sig at python.org python.org>, > > michael ferraro > >, Edward Hartley > > > > > *Subject: **Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors* > > > > > >> thanks for your efforts > >> > >> m > >> > >> > >> On Jan 13, 2008, at 9:28 AM, Ronald Oussoren wrote: > >> > >> On 12 Jan, 2008, at 19:35, Edward Hartley wrote: > >> Hi Ronald, > >> further to my previous on py2app modulegraph > >> > >> With these changes py2app is not to working at all. > >> > >> Arghh.... I guess my merge of the version of py2app and friends > from > >> Leopard wasn't complete. I'm currently working on some cleanups > in the > >> pyobjc repository and a port of pyobjc to 64-bit PPC and will look > >> into this issue when that's finished. With some luck that will be > >> later today. > >> > >> BTW. Thank's for mentioning that the PyAvenger sample is broken as > >> well, that will make it a lot easier to debug the problem. > > > > Yes thanks for your efforts and a further calibration point in > all of this: > > > > I downloaded the latest wxPython 2.8.7.1 for OS X 10.4 an update > on my > > previous 2.8.0.1 version installed IIRC > > sometime after I upgraded to 2.5. > > The demo package for version 2.8.7.1 has a bundled demo.app > which has a > > working demo of the wxPython glcanvas. > > So I conclude that building apps with OpenGL and wxPython presumably > > with py2app? > > If that's the case could anyone comment on which versions of py2app, > > setuptools etc.? > > > > wxPython's demo.app uses the old bundlebuilder.py tool in such a way > that it is not bundling wxPython or anything else other than the demo > code itself, and is using the installed Python, wxPython, PyOpenGL and > any other packages it needs, all from the sys.path. > OK thanks for this information. Its a useful piece of input. Sorry for the delay in replying, a few mails I was sent seem to have got dropped somewhere. Best Ed Hartley -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080121/71b3fa49/attachment.htm From skip at pobox.com Mon Jan 21 14:35:00 2008 From: skip at pobox.com (skip at pobox.com) Date: Mon, 21 Jan 2008 07:35:00 -0600 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <56701870-3CF5-4746-B09F-C3F63A689D64@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> <56701870-3CF5-4746-B09F-C3F63A689D64@mac.com> Message-ID: <18324.40836.314823.839168@montanaro.dyndns.org> Daniel> ... the benchmark wasn't written to take advantage of multi-core Daniel> machines--silly me I thought any good benchmark would be. A little bit of pystone history. Python's pystone benchmark is a translation of the Dhrystone benchmark, which was originally written in Ada in the mid 80s, then translated to C. I'm pretty sure Guido used the C version as the basis for pystone. There is no multithreading in Dhrystone, so it's understandable that pystone is thread-free as well. One value of a benchmark is its stability over time. Since its addition to Python in 1995 it has had just two bug fixes to the implementation. You could certainly fork pystone to create a version that did use multiple threads, but you'd have to call it something else, pystone-t perhaps. It would be a different benchmark. The only other changes of note to the benchmark are due to the speed of modern CPUs. The number of passes of the algorithm to run by default has grown over the years as processor speeds have increased. When first included in Python in 1995 it ran 1000 passes of the main loop. Today it defaults to 50,000 to get reasonable runtimes on modern CPUs. Even so, on most current 2-3 GHz CPUs it will run in about a second, so it's probably time to increase the number of passes again. More detail about the Dhrystone benchmark, including a floating point predecessor, the Whetstone benchmark, and a couple versions of the C source you can build and run, are on Wikipedia: http://en.wikipedia.org/wiki/Dhrystone For the history of the pystone benchmark, UTSL: http://svn.python.org/view/python/trunk/Lib/test/pystone.py Skip From kent37 at tds.net Mon Jan 21 14:33:32 2008 From: kent37 at tds.net (Kent Johnson) Date: Mon, 21 Jan 2008 08:33:32 -0500 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <56701870-3CF5-4746-B09F-C3F63A689D64@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> <56701870-3CF5-4746-B09F-C3F63A689D64@mac.com> Message-ID: <47949F2C.1060207@tds.net> Daniel Lord wrote: > My point was that, as I understand it, thanks to the GIL--Python > cannot easily take advantage of multi-cores period even when the > program uses multiple threads--it it is a limitation of the > implementation of the language interpreter. I guess that tells us we > ought to write multi-core code in C/C++/ObjC instead. Either that or > Python's implementation needs to embrace threading more expansively. Or don't use threading for multiprocessing. Current best practice seems to be to use a multiprocessing model to distribute Python programs. There are quite a few add-on packages which support this: http://wiki.python.org/moin/ParallelProcessing Kent From wieni77 at yahoo.de Mon Jan 21 15:05:24 2008 From: wieni77 at yahoo.de (Anke) Date: Mon, 21 Jan 2008 14:05:24 +0000 (GMT) Subject: [Pythonmac-SIG] "illegal instruction" while connecting to PostgresDB Message-ID: <575859.4898.qm@web26601.mail.ukl.yahoo.com> Hi, unfortunately, I am not sure if I picked he right list... My working environment is a Power PC G5, Tiger 10.4.11, Python 2.5.1. and of course I am fighting with a python script :-). In fact I am nearly sure that its a simple problem, but I am new on the Mac-System and using Ubuntu I never had those problems.... The aim of the script is to connect to postgres-Database...The beginning of the code - which already produces problems is: import string from pyPgSQL import PgSQL as pg import psyco import sys import re import os.path as path import time print "hallo1" psyco.full() print "hallo2" con = pg.connect(host='localhost', user='dbuser', password='dbuser', database='DB_SNP_RECEPTOR_GENE') print "hallo3" After "hallo2" the program stops with "Illegal instruction". I found a log file which says the following: Date/Time: 2008-01-21 14:33:48.617 +0100 OS Version: 10.4.11 (Build 8S165) Report Version: 4 Command: Python Path: /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python Parent: bash [632] Version: 2.5a0 (2.5alpha0) PID: 698 Thread: 0 Exception: EXC_BAD_INSTRUCTION (0x0002) Code[0]: 0x00000002 Code[1]: 0x0200801c Thread 0 Crashed: 0 <<00000000>> 0x0200801c 0 + 33587228 1 org.python.python 0x002ae7f8 PyEval_EvalFrameEx + 424 (ceval.c:3223) 2 org.python.python 0x002b4e10 PyEval_EvalCodeEx + 2096 (ceval.c:2831) 3 org.python.python 0x002b2f08 PyEval_EvalFrameEx + 18616 (ceval.c:3660) 4 org.python.python 0x002b4e10 PyEval_EvalCodeEx + 2096 (ceval.c:2831) 5 org.python.python 0x002b4fb0 PyEval_EvalCode + 48 (ceval.c:500) 6 org.python.python 0x002dacbc PyRun_FileExFlags + 300 (pythonrun.c:1272) 7 org.python.python 0x002daf00 PyRun_SimpleFileExFlags + 448 (pythonrun.c:877) 8 org.python.python 0x002ea8bc Py_Main + 3052 (main.c:523) 9 org.python.python 0x000019bc 0x1000 + 2492 10 org.python.python 0x000016c0 0x1000 + 1728 Thread 0 crashed with PPC Thread State 64: srr0: 0x000000000200801c srr1: 0x100000000208f030 vrsave: 0x0000000000000000 cr: 0x88224242 xer: 0x0000000000000000 lr: 0x0000000001065124 ctr: 0x0000000002008000 r0: 0x0000000000624298 r1: 0x00000000bfffef40 r2: 0x0000000002008000 r3: 0x0000000002008070 r4: 0x00000000006242c0 r5: 0x0000000000624298 r6: 0x00000000bfffef78 r7: 0x0000000000000a80 r8: 0x0000000000000000 r9: 0x0000000000000001 r10: 0x00000000007bca60 r11: 0x0000000000000001 r12: 0x0000000002008000 r13: 0x0000000000000000 r14: 0x00000000006242d0 r15: 0x000000000079830c r16: 0x00000000003445f4 r17: 0x0000000000000000 r18: 0x000000000000000a r19: 0xef298001ef200001 r20: 0x0000000000624160 r21: 0x0000000001054e80 r22: 0x0000000000624160 r23: 0x0000000000000000 r24: 0x0000000000000001 r25: 0x00000000007bc2e0 r26: 0x0000000000000000 r27: 0x00000000007afed0 r28: 0x0000000000785bf0 r29: 0x0000000000000000 r30: 0x00000000007bca60 r31: 0x0000000000000000 Binary Images Description: 0x1000 - 0x1fff org.python.python 2.5a0 (2.5alpha0) /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python 0x44000 - 0x44fff _weakref.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_weakref.so 0xa2000 - 0xa5fff strop.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/strop.so 0xb1000 - 0xbefff mxDateTime.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mx/DateTime/mxDateTime/mxDateTime.so 0xd5000 - 0xd7fff time.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/time.so 0xe0000 - 0xe1fff math.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/math.so 0xe8000 - 0xedfff array.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/array.so 0x205000 - 0x322fff org.python.python 2.5a0 (2.5) /Library/Frameworks/Python.framework/Versions/2.5/Python 0x745000 - 0x75cfff libpq.5.dylib /usr/local/pgsql/lib/libpq.5.dylib 0x1008000 - 0x101cfff libpqmodule.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyPgSQL/libpq/libpqmodule.so 0x1051000 - 0x10a9fff _psyco.so /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/psyco/_psyco.so 0x8fe00000 - 0x8fe52fff dyld 46.16 /usr/lib/dyld 0x90000000 - 0x901bcfff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x90214000 - 0x90219fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib 0x907bb000 - 0x90895fff com.apple.CoreFoundation 6.4.9 (368.31) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x908de000 - 0x908defff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x908e0000 - 0x909e2fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x90a3c000 - 0x90ac0fff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90aea000 - 0x90b5cfff com.apple.framework.IOKit 1.4.1 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x90b72000 - 0x90b84fff libauto.dylib /usr/lib/libauto.dylib 0x90b8b000 - 0x90e62fff com.apple.CoreServices.CarbonCore 681.17 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x90ec8000 - 0x90f48fff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x90f92000 - 0x90fd4fff com.apple.CFNetwork 129.22 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x90fe9000 - 0x91001fff com.apple.WebServices 1.1.2 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore 0x91011000 - 0x91092fff com.apple.SearchKit 1.0.7 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x910d8000 - 0x91101fff com.apple.Metadata 10.4.4 (121.36) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x91112000 - 0x91120fff libz.1.dylib /usr/lib/libz.1.dylib 0x91123000 - 0x912defff com.apple.security 4.6 (29770) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x913dd000 - 0x913e6fff com.apple.DiskArbitration 2.1.2 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x913ed000 - 0x913f5fff libbsm.dylib /usr/lib/libbsm.dylib 0x913f9000 - 0x91421fff com.apple.SystemConfiguration 1.8.3 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x91434000 - 0x9143ffff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x91a19000 - 0x91ae0fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib 0x94c57000 - 0x94c78fff libmx.A.dylib /usr/lib/libmx.A.dylib 0x94f5a000 - 0x94f87fff com.apple.LDAPFramework 1.4.1 (69.0.1) /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP 0x94f8e000 - 0x94f9efff libsasl2.2.dylib /usr/lib/libsasl2.2.dylib 0x94fa2000 - 0x94fd1fff libssl.0.9.7.dylib /usr/lib/libssl.0.9.7.dylib 0x94fe1000 - 0x94ffefff libresolv.9.dylib /usr/lib/libresolv.9.dylib 0x954fc000 - 0x9562afff edu.mit.Kerberos 5.5.25 /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos The "funny" thing is, that I do not have problems when I connect to the the database on the python shell. I already thought about a path-problem... I hope somebody has any suggestion??? Thanks in advance... Anke Jetzt Mails schnell in einem Vorschaufenster ?berfliegen. Dies und viel mehr bietet das neue Yahoo! Mail - www.yahoo.de/mail From grzessnik at interia.pl Mon Jan 21 23:00:22 2008 From: grzessnik at interia.pl (Grzegorz Laszczyk) Date: Mon, 21 Jan 2008 23:00:22 +0100 Subject: [Pythonmac-SIG] Illustrator no_color_info problem Message-ID: <479515F6.8010602@interia.pl> Hi. I have a little problem working with Illustrator objects color. When I have a list with 4 elements, I can make cmyk_color_info, 3 - rgb_color_info. I'm trying to make no_color_info, but I can't. It's interesting, because I tried to use example from AI CS3 apple script reference, pasted into AS_Translate. It makes CMYK, RGB but shows error when uses no_color_inf. This is a code I paste into AS_Translate tell application "Adobe Illustrator" activate make new document with properties {color space:RGB} make new rectangle in document 1 with properties {position:{200, 500}, width:300, height:100} set the fill color of the result to {class:RGB color info, red:255, green:0, blue:0} make new rectangle in document 1 with properties {position:{150, 550}, width:200, height:100} set the fill color of the result to {class:RGB color info, red:0, green:255, blue:0} delay 1 set the fill color of path item 1 of document 1 to {class:no color info} end tell It's an error or I made mistake? Could you check, does it works? Greetings Grzesiek ---------------------------------------------------------------------- Sprawdz, ktore komorki sa najmodniejsze! Kliknij >>> http://link.interia.pl/f1cd4 From kw at codebykevin.com Tue Jan 22 15:37:53 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 22 Jan 2008 09:37:53 -0500 Subject: [Pythonmac-SIG] PythonLauncher not working properly on Leopard Message-ID: <4795FFC1.90304@codebykevin.com> I've just filed a bug report on this at bugs.python.org: http://bugs.python.org/issue1905 Essentially, double-clicking on a Python script on Leopard, using 2.5.1, does not launch Terminal and execute the script. A new Terminal window pops up, but no Python. The only way I can execute a Python script is the old fashioned way, i.e. cd to the working directory in Terminal and run "python myscript.py." I get these error messages in Console: 1/22/08 9:28:56 AM Python Launcher[53692] doscript: Could not activate Terminal 1/22/08 9:28:56 AM Python Launcher[53692] doscript: AESend(activate): error -600 1/22/08 9:28:56 AM Python Launcher[53692] Exit status: -600 1/22/08 9:28:56 AM com.apple.launchd[118] ([0x0-0x434434].org.python.PythonLauncher[53692]) Stray process with PGID equal to this dead job: PID 53694 PPID 1 Terminal Hope someone can look into this, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From grzessnik at interia.pl Tue Jan 22 17:18:56 2008 From: grzessnik at interia.pl (Grzegorz Laszczyk) Date: Tue, 22 Jan 2008 17:18:56 +0100 Subject: [Pythonmac-SIG] is py-appscript compile possible? Message-ID: <47961770.8090409@interia.pl> Hi. I wonder if it is possible to compile my py-appscript with for example tkinter GUI into working application. I'm working on a few different mac's and it will be great to use my simple apps without installing appscript. Regards Grzesiek ---------------------------------------------------------------------- Sprawdz, ktore komorki sa najmodniejsze! Kliknij >>> http://link.interia.pl/f1cd4 From daniellord at mac.com Wed Jan 23 01:27:35 2008 From: daniellord at mac.com (Daniel Lord) Date: Tue, 22 Jan 2008 16:27:35 -0800 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <47949F2C.1060207@tds.net> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> <56701870-3CF5-4746-B09F-C3F63A689D64@mac.com> <47949F2C.1060207@tds.net> Message-ID: <044EE77D-327F-44B4-B53D-711616A6AFF6@mac.com> Kent, Thanks for the link. I am just lazy (that's why I like Python over C/ CPP/ObjC when I can get away with it) and would prefer the lightweight (to design and code that is not as in process overhead) threads over separate application processes. But certainly you get more flexibility and power for the increased effort. TANSTAAFL. I'll give it a shot and see what it can do. Maybe spawning a number python interpreters (one for each processor core) and see what the cumulative pystone is though it would be an Apples to Oranges comparison...oh wait... ;-) On Jan 21, 2008, at 5:33 AM, Kent Johnson wrote: > Daniel Lord wrote: >> My point was that, as I understand it, thanks to the GIL--Python >> cannot easily take advantage of multi-cores period even when the >> program uses multiple threads--it it is a limitation of the >> implementation of the language interpreter. I guess that tells us >> we ought to write multi-core code in C/C++/ObjC instead. Either >> that or Python's implementation needs to embrace threading more >> expansively. > > Or don't use threading for multiprocessing. Current best practice > seems to be to use a multiprocessing model to distribute Python > programs. There are quite a few add-on packages which support this: > http://wiki.python.org/moin/ParallelProcessing > > Kent From kent37 at tds.net Wed Jan 23 04:22:17 2008 From: kent37 at tds.net (Kent Johnson) Date: Tue, 22 Jan 2008 22:22:17 -0500 Subject: [Pythonmac-SIG] Pystone numbers for different Macs... In-Reply-To: <044EE77D-327F-44B4-B53D-711616A6AFF6@mac.com> References: <18322.24793.66158.694691@montanaro.dyndns.org> <91B0A4D3-2E0E-4A16-BE41-7E24CD8E1205@mac.com> <15320647-F813-431F-9658-3373195ECE5D@mac.com> <56701870-3CF5-4746-B09F-C3F63A689D64@mac.com> <47949F2C.1060207@tds.net> <044EE77D-327F-44B4-B53D-711616A6AFF6@mac.com> Message-ID: <4796B2E9.1080306@tds.net> Daniel Lord wrote: > Kent, > > Thanks for the link. I am just lazy (that's why I like Python over > C/CPP/ObjC when I can get away with it) and would prefer the lightweight > (to design and code that is not as in process overhead) threads over > separate application processes. But certainly you get more flexibility > and power for the increased effort. It looks from the examples like it may not be much effort. Certainly designing a correct program with threading has some challenges also. The 'processing' package explicitly attempts to mimic the API of threading: http://pypi.python.org/pypi/processing The examples for pp look pretty straightforward as well: http://www.parallelpython.com/content/view/17/31/ Kent From nospamme at jat.com.au Mon Jan 21 19:58:12 2008 From: nospamme at jat.com.au (j47) Date: Mon, 21 Jan 2008 10:58:12 -0800 (PST) Subject: [Pythonmac-SIG] python23 under leopard (intel mac) In-Reply-To: References: <8E43322B-C17E-4702-A98E-1E93FA7E0F87@taywa.ch> Message-ID: <15003863.post@talk.nabble.com> I am also having trouble with Python 2.3.6 under Leopard (yes, I'm stuck with this version). Tried everything as below. I still get: Undefined symbols: "__dummy", referenced from: ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [python.exe] Error 1 Any ideas? Yves Serrano wrote: > > I used "export MACOSX_DEPLOYMENT_TARGET=10.5" and edited pyconfig.h > after configure. > > I changed this values: > #undef _POSIX_C_SOURCE > #undef _XOPEN_SOURCE > #define HAVE_BROKEN_POSIX_SEMAPHORES > after that it worked > regards Yves > -- View this message in context: http://www.nabble.com/python23-under-leopard-%28intel-mac%29-tp14205076p15003863.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From ronaldoussoren at mac.com Wed Jan 23 07:55:27 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 23 Jan 2008 07:55:27 +0100 Subject: [Pythonmac-SIG] python23 under leopard (intel mac) In-Reply-To: <15003863.post@talk.nabble.com> References: <8E43322B-C17E-4702-A98E-1E93FA7E0F87@taywa.ch> <15003863.post@talk.nabble.com> Message-ID: On 21 Jan, 2008, at 19:58, j47 wrote: > > I am also having trouble with Python 2.3.6 under Leopard (yes, I'm > stuck with > this version). That's too bad, this version is not supported on Leopard. > > > Tried everything as below. I still get: > > Undefined symbols: > "__dummy", referenced from: > ld: symbol(s) not found > collect2: ld returned 1 exit status > make: *** [python.exe] Error 1 > > Any ideas? The error you're getting seems to be related to the build procedure, hence I'd look into the differences in compiler/linker arguments between 2.3.6 and 2.5.1 to try to detect what's going on. Note that the python branch for 2.3.x is closed, it won't be possible to get a patch for this into the repository. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080123/804ffad0/attachment.bin From Jack.Jansen at cwi.nl Wed Jan 23 08:29:16 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue, 22 Jan 2008 23:29:16 -0800 Subject: [Pythonmac-SIG] python23 under leopard (intel mac) In-Reply-To: References: <8E43322B-C17E-4702-A98E-1E93FA7E0F87@taywa.ch> <15003863.post@talk.nabble.com> Message-ID: On 22-Jan-2008, at 22:55 , Ronald Oussoren wrote: > > On 21 Jan, 2008, at 19:58, j47 wrote: > >> >> I am also having trouble with Python 2.3.6 under Leopard (yes, I'm >> stuck with >> this version). > > That's too bad, this version is not supported on Leopard. >> >> >> Tried everything as below. I still get: >> >> Undefined symbols: >> "__dummy", referenced from: >> ld: symbol(s) not found >> collect2: ld returned 1 exit status >> make: *** [python.exe] Error 1 >> >> Any ideas? > > The error you're getting seems to be related to the build procedure, > hence I'd look into the differences in compiler/linker arguments > between 2.3.6 and 2.5.1 to try to detect what's going on. IIRC that "__dummy" was a workaround for something not being loaded into the shared library that's at the heart of the Python framework. Don't ask me what wasn't being loaded, this is really long ago (OSX 10.2, or 10.3 at the latest). If you look through the Makefile (Makefile.pre.in, configure.in, etc) you should be able to find it, there's probably a linker flag "-u __dummy" somewhere. Try removing it, and see what breaks. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From hengist.podd at virgin.net Wed Jan 23 11:05:19 2008 From: hengist.podd at virgin.net (has) Date: Wed, 23 Jan 2008 10:05:19 +0000 Subject: [Pythonmac-SIG] Illustrator no_color_info problem In-Reply-To: References: Message-ID: <1BE51005-C87A-43FE-A9B8-9C70ABAA61BE@virgin.net> Grzegorz Laszczyk wrote: > I have a little problem working with Illustrator objects color. > When I have a list with 4 elements, I can make cmyk_color_info, 3 - > rgb_color_info. > I'm trying to make no_color_info, but I can't. > It's interesting, because I tried to use example from AI CS3 apple > script reference, pasted into AS_Translate. > It makes CMYK, RGB but shows error when uses no_color_inf. The following script, translated from your AppleScript via ASTranslate and tidied for appearance, works with CS3 here: ai = app('Adobe Illustrator').activate() doc = ai.make(new=k.document, with_properties={k.color_space: k.RGB}) doc.make(new=k.rectangle, with_properties={k.position: [200, 500], k.height: 100, k.width: 300}) doc.layers[1].path_items[1].fill_color.set({k.blue: 0, k.class_: k.RGB_color_info, k.green: 0, k.red: 255}) doc.make(new=k.rectangle, with_properties={k.position: [150, 550], k.height: 100, k.width: 200}) doc.layers[1].path_items[1].fill_color.set({k.blue: 0, k.class_: k.RGB_color_info, k.green: 255, k.red: 0}) doc.path_items[1].fill_color.set({k.class_: k.no_color_info}) What was your original Python script, and what error did it give? has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From hengist.podd at virgin.net Wed Jan 23 11:10:50 2008 From: hengist.podd at virgin.net (has) Date: Wed, 23 Jan 2008 10:10:50 +0000 Subject: [Pythonmac-SIG] is py-appscript compile possible? Message-ID: <062533B6-4FB9-45DB-A1AA-7DE427142F29@virgin.net> Grzegorz Laszczyk wrote: > I wonder if it is possible to compile my py-appscript with for example > tkinter GUI into working application. > I'm working on a few different mac's and it will be great to use my > simple apps without installing appscript. Use py2app to build standalone application bundles. http://cheeseshop.python.org/pypi/py2app/ has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From piet at cs.uu.nl Tue Jan 29 10:54:31 2008 From: piet at cs.uu.nl (Piet van Oostrum) Date: Tue, 29 Jan 2008 10:54:31 +0100 Subject: [Pythonmac-SIG] Help with path settings In-Reply-To: (George Wright's message of "Mon\, 21 Jan 2008 17\:07\:45 +1100") References: Message-ID: >>>>> George Wright (GW) wrote: >GW> I'm having trouble with PYTHONPATH .. >GW> george-g5:~ georgewright$ env >GW> TERM_PROGRAM=Apple_Terminal >GW> ... >GW> PYTHONDOCS=/Users/georgewright/Python_stuff/Python-Docs-2.4.2/ >GW> PATH=/usr/local/bin:/usr/local/sbin:/usr/local/:/usr/local/mysql/bin:/ >GW> opt/local/bin/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:/ >GW> opt/local/bin/:/usr/local/include/:/System/Library/Frameworks/ >GW> Python.framework/Versions/Current/bin/ >GW> ... >GW> PYTHONPATH =/usr/local/Zope-3.3.0/lib/python >GW> I want to change this to PYTHONPATH='' >GW> I can't find where I set it to the current value. I know I set it that way >GW> some months ago so I could do zope things in interactive python - but I >GW> don't recall how! >GW> I have changed .bash_profile to what I want and searched for .pth files >GW> that might help but to no avail. >GW> I have changed .profile too >GW> Also the PATH=... :/System/Library/Frameworks/Python.framework/ >GW> Versions/Current/bin/ >GW> points to a 2.3 installation and I want to change that to ... / >GW> Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ >GW> and I don't know how to do it. (I actually get python 2.4 when I start it >GW> in terminal!) The reason you get 2.4 is most probable because the 2.4 installation has python in /usr/local/bin which is first in your PATH. >GW> Can anyone help me sort out this mess? I guess you are running Tiger because your system Python is 2.3. There are quite a lot of places where environment variables can be set. E.g. ~/.profile ~/.bashrc ~/.login ~/.bash_profile, ~/.bash_login, ~/.cshrc ~/.tcshrc /etc/csh.cshrc /etc/csh.login /etc/profile /etc/bashrc ~/.MacOSX/environment.plist Apparently Zope has added something. Systems like these tend to insert stuff in the /etc files because these are system-wide. -- Piet van Oostrum URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: piet at vanoostrum.org From Chris.Barker at noaa.gov Tue Jan 29 20:55:05 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 29 Jan 2008 11:55:05 -0800 Subject: [Pythonmac-SIG] Py2App and adding paths to sys.path Message-ID: <479F8499.20200@noaa.gov> Hi all, I'm trying to bundle up a pretty complicated app. During the app's initialization, a path is added to sys.path, so that it can see the app's "library" code: app_root = os.path.dirname(os.path.dirname(os.path.abspath( os.path.realpath(__file__)))) app_lib_dir = os.path.join(app_root, "lib") sys.path.insert(0, app_lib_dir) So it looks to see where the initialization file lives, then it adds the "lib" dir relative to that. This clearly won't work right with py2app. My solution, so far, is to wrap the above in a "if sys.frozen is not None" call, so it doesn't run. Then, I added that path in the top of my setup.py, so py2app can find all the modules it needs. This works mostly OK with the app bundle, but doesn't work when I try to run in alias mode, which I'd really like to be able to do. Also, while it mostly works with the app bundle, I am having some trouble with the durus database, which uses pickles -- I think it's having trouble finding the modules it needs to unpickle some stuff. I'll need to dig into this deeper, but it seems maybe I'm just not doing this right. Suggestions welcome. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Tue Jan 29 23:36:56 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 29 Jan 2008 14:36:56 -0800 Subject: [Pythonmac-SIG] Py2App and adding paths to sys.path In-Reply-To: <4fd268780801291204s7541a497tc1f917f7c5c27fa7@mail.gmail.com> References: <479F8499.20200@noaa.gov> <4fd268780801291204s7541a497tc1f917f7c5c27fa7@mail.gmail.com> Message-ID: <479FAA88.8080908@noaa.gov> Kenneth Miller wrote: > I do the same thing, can't you just include the Library code in > the Bundle (py2app knows how to do this) and have it also search there? Yes, I could, but then the entire package gets included, not just the pyc files that I need -- not really a big deal, but it doesn't seem as clean as it could be. > As for the durus database, i've had problems with py2app bundling zope > in the past. I think I've got this figure out. The database itself is created with a separate program. This program just reads it. However, it needs to have all the modules that were used to create the database in order to unpickle the objects in the database. py2app didn't include this module, because it's imported on unpickling, and therefor never explicitly on an import line. Solution: Force the inclusion of the module at hand. the module I need is: cameo.model.reactivity However, I tried that with: OPTIONS = {... 'packages': ['cameo.model'], ... } but what got put in the package was: model so that it would import as: model.reactivity so I did: 'packages': ['cameo'], which did work, but then I got ALL of the cameo package, including both .py and .pyc files, plus most of them were included in the site_packages zip file anyway. I'd think there'd be a way to specify a single module to be included in the site_packages zip -- WITH the same package structure (in this case, cameo.model. was there, with other modules, just not this one. Anyway, the solution for now is just to put a: import cameo.model.reactivity line in one of the main modules of the app, so now py2app is finding it. It seems there should be a more elegant way, though. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Wed Jan 30 00:33:03 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 29 Jan 2008 15:33:03 -0800 Subject: [Pythonmac-SIG] py2app and command line options Message-ID: <479FB7AF.7090909@noaa.gov> Hey all, I've got a py2app bundle working nicely, and it works fine when I fire ti up from the command line, but when I double click on it, I get a sys.argv that looks like: sys.argv is: ['/Users/cbarker/HAZMAT/hazweb/trunk/cameo/StandAlone/dist/cameo_standalone.app/Contents/Resources/cameo_standalone.py', '-psn_0_21364737'] Where is that "-psn_0_21364737" coming from, and how to I get rid of it? My setup.py: from setuptools import setup Plist={} APP = ['../bin/cameo_standalone.py'] DATA_FILES = ['CameoWeb.icns', '../cameo.durus', '../static'] OPTIONS = {'argv_emulation': False, # this puts the names of dropped files into sys.argv when starting the app. 'iconfile': 'CameoWeb.icns', 'plist': Plist, # 'packages': ['cameo'],# this works, but includes a lot of extra stuff 'packages': [], } setup( app=APP, data_files=DATA_FILES, #version=cameo.__version__, description="Cameo Chemicals database stand alone application", author="NOAA Emergency Response Division", author_email="ORR.CAMEO at noaa.gov", options={'py2app': OPTIONS}, setup_requires=['py2app'], ) 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 georgewr at bigpond.net.au Wed Jan 30 08:09:21 2008 From: georgewr at bigpond.net.au (George Wright) Date: Wed, 30 Jan 2008 18:09:21 +1100 Subject: [Pythonmac-SIG] Help with path settings In-Reply-To: References: Message-ID: Piet van Oostrum wrote: > >>>>>> George Wright (GW) wrote: > >> GW> I'm having trouble with PYTHONPATH .. >> >> GW> ... >> GW> PYTHONPATH =/usr/local/Zope-3.3.0/lib/python > >> GW> I want to change this to PYTHONPATH='' >> GW> I can't find where I set it to the current value. > I guess you are running Tiger because your system Python is 2.3. > Yes 10.4.11 I guess I should leave the python 2.3 where it is > There are quite a lot of places where environment variables can be > set. > > E.g. ~/.profile ~/.bashrc ~/.login ~/.bash_profile, ~/.bash_login, > ~/.cshrc > ~/.tcshrc > /etc/csh.cshrc /etc/csh.login /etc/profile /etc/bashrc > ~/.MacOSX/environment.plist > Well this is a very helpful list. First time I've seen them all at once. Are there any more? Turns out that /etc/profile actually listened to my request to: export PYTHONPATH='' where the others just ignored it. In addition I found that it was in: > ~/.MacOSX/environment.plist where I had set PYTHONPATH to > /usr/local/Zope-3.3.0/lib/python and then forgot I had done it! Now I have removed that. Anyhow it seems to have done the trick. So many thanks. I will flag your email in case I forget again. George Wright http://users.bigpond.net.au/George.Wright/ http://www.labyrinth.net.au/~gwright -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080130/86f6fe8e/attachment.htm From ed_hartley at mac.com Wed Jan 30 12:44:25 2008 From: ed_hartley at mac.com (Edward Hartley) Date: Wed, 30 Jan 2008 11:44:25 +0000 Subject: [Pythonmac-SIG] Subject: Re: Help with path settings Message-ID: <20D5C433-52A5-46B8-9700-3751C1987CEB@mac.com> Hi > I guess I should leave the python 2.3 where it is > There are quite a lot of places where environment variables can be > set. > > E.g. ~/.profile ~/.bashrc ~/.login ~/.bash_profile, ~/.bash_login, > ~/.cshrc > ~/.tcshrc > /etc/csh.cshrc /etc/csh.login /etc/profile /etc/bashrc > ~/.MacOSX/environment.plist > > Well this is a very helpful list. First time I've seen them all at > once. Are there any more? I agree, > Turns out that /etc/profile actually listened to my request to: > export PYTHONPATH='' > where the others just ignored it. Something to watch out for as well is system updates resetting these to their defaults. Best Ed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080130/9afb2e33/attachment.htm From tobias.rodaebel at mac.com Wed Jan 30 20:27:08 2008 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Wed, 30 Jan 2008 20:27:08 +0100 Subject: [Pythonmac-SIG] py2app and command line options In-Reply-To: <479FB7AF.7090909@noaa.gov> References: <479FB7AF.7090909@noaa.gov> Message-ID: Hi Chris, On 30.01.2008, at 00:33, Christopher Barker wrote: > Hey all, > > I've got a py2app bundle working nicely, and it works fine when I fire > ti up from the command line, but when I double click on it, I get a > sys.argv that looks like: > > sys.argv is: > ['/Users/cbarker/HAZMAT/hazweb/trunk/cameo/StandAlone/dist/ > cameo_standalone.app/Contents/Resources/cameo_standalone.py', > '-psn_0_21364737'] > > Where is that "-psn_0_21364737" > > coming from, and how to I get rid of it? The -psn argument is a bit of an historical leftover. It stands for carbon process serial number. Every time you start an application from within the finder/desktop by double clicking it, this option will be attached automatically as the first command line option (sys.argv[1]) after the script name. Set argv_emulation=True (in your setup.py in OPTIONS) or delete it within your application (__main__): if len(sys.argv) > 1: del sys.argv[1] Here is a little sample setup: setup.py file: from setuptools import setup OPTIONS = {'argv_emulation': False} setup( app=['foo.py'], description="A foo.", options={'py2app': OPTIONS}, setup_requires=['py2app'], ) foo.py file in same directory: import sys if "__main__" == __name__: if len(sys.argv) > 1: del sys.argv[1] print sys.argv Greetings, Tobias From Chris.Barker at noaa.gov Wed Jan 30 21:50:00 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 30 Jan 2008 12:50:00 -0800 Subject: [Pythonmac-SIG] py2app and command line options In-Reply-To: References: <479FB7AF.7090909@noaa.gov> Message-ID: <47A0E2F8.9080009@noaa.gov> Tobias Rod?bel wrote: > The -psn argument is a bit of an historical leftover. It stands for > carbon process serial number. great, thanks! The question is, is it still useful? > Set argv_emulation=True (in your setup.py in > OPTIONS) The thing is, I don't want argv_emulation -- that puts the name of dropped files in argv, and this app can't do anything with dropped files. It does take other args, though, and -psn was confusing it. > or delete it within your application (__main__): I can't do that, 'cause when it's not in an app bundle, that would break something. I could put it in a if frozen: clause, I suppose. In fact, the solution I came up with is that it doesn't need to do anything with arv when bundled anyway, so I just ignore all options in that case. However, it strikes me that it would be nice to have a: show_carbon_process = False option in py2app. I'm not going to write it though! 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 robin at alldunn.com Wed Jan 30 22:47:18 2008 From: robin at alldunn.com (Robin Dunn) Date: Wed, 30 Jan 2008 13:47:18 -0800 Subject: [Pythonmac-SIG] py2app and command line options In-Reply-To: <47A0E2F8.9080009@noaa.gov> References: <479FB7AF.7090909@noaa.gov> <47A0E2F8.9080009@noaa.gov> Message-ID: <47A0F066.7060106@alldunn.com> Christopher Barker wrote: > Tobias Rod?bel wrote: >> The -psn argument is a bit of an historical leftover. It stands for >> carbon process serial number. > > great, thanks! > > The question is, is it still useful? > >> Set argv_emulation=True (in your setup.py in >> OPTIONS) > > The thing is, I don't want argv_emulation -- that puts the name of > dropped files in argv, and this app can't do anything with dropped > files. It does take other args, though, and -psn was confusing it. > >> or delete it within your application (__main__): > > I can't do that, 'cause when it's not in an app bundle, that would break > something. I could put it in a if frozen: clause, I suppose. Or this: if len(sys.argv) > 1 and sys.argv.startswith('-psn'): del sys.argv[1] -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!