From wddozier at mac.com Sun Oct 1 04:07:53 2006 From: wddozier at mac.com (Bill Dozier) Date: Sat, 30 Sep 2006 19:07:53 -0700 Subject: [Pythonmac-SIG] pyobjc build from svn checkout? Message-ID: <5D88916E-059C-473B-AF98-A8E78BDDD896@mac.com> What else do I need to do? mbp:~/build/pyobjc daddy$ ls Doc Install.txt MANIFEST.in ReadMe.html Xcode setup-lib Examples Installer Package Modules ReadMe.txt ez_setup setup.py HISTORIC.txt Lib NEWS.html Scripts libffi- src source-deps Install.html License.txt NEWS.txt Tools sandbox mbp:~/build/pyobjc daddy$ svn update Fetching external item into 'ez_setup' External at revision 2239. Fetching external item into 'source-deps/unicode-source' External at revision 975. At revision 1885. mbp:~/build/pyobjc daddy$ python setup.py build Traceback (most recent call last): File "setup.py", line 732, in dependency_links = [], File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/core.py", line 112, in setup _setup_distribution = dist = klass(attrs) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/setuptools-0.6c3-py2.5.egg/setuptools/ dist.py", line 219, in __init__ File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/setuptools-0.6c3-py2.5.egg/setuptools/ dist.py", line 243, in fetch_build_eggs File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/pkg_resources.py", line 487, in resolve raise VersionConflict(dist,req) # XXX put more info here pkg_resources.VersionConflict: (bdist-mpkg 0.4.2.dev-r0 (/Library/ Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ bdist_mpkg-0.4.2.dev_r0-py2.5.egg), Requirement.parse('bdist- mpkg>=0.4.2')) mbp:~/build/pyobjc daddy$ -- "I can sum that up in one word: youneverknow." -- Joaquin Andujar Bill Dozier wddozier at mac.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20060930/16e378a3/attachment.html From ronaldoussoren at mac.com Sun Oct 1 11:08:11 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 1 Oct 2006 11:08:11 +0200 Subject: [Pythonmac-SIG] [4suite] python2.5 error building 4Suite-1.0rc4 In-Reply-To: <451B6D12.30505@ogbuji.net> References: <4F4005B6-E56C-42D6-9280-0D5133E24429@lbl.gov> <451B6D12.30505@ogbuji.net> Message-ID: On Sep 28, 2006, at 8:34 AM, Uche Ogbuji wrote: >> >> From Ft/Xml/src/expat/lib/xmlparse.c >> 18 #ifndef HAVE_UINTPTR_T >> 19 #if SIZEOF_VOID_P <= SIZEOF_INT >> 20 typedef unsigned int uintptr_t; >> >> It appears like the problem is with the python2.5 installation, >> anybody >> else have this problem? > > Yes. This was reported and we put a workaround in recently. Try a > recent 4Suite CVS snapshot. It seems to be a problem in the configure script for python 2.5, the configure script seems to be checking if untptr_t is a built-in type. I have a patch and have asked on python-dev if this is indeed a correct patch. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061001/5d66d420/attachment.bin From jeremy.kloth at 4suite.org Sun Oct 1 19:18:08 2006 From: jeremy.kloth at 4suite.org (Jeremy Kloth) Date: Sun, 1 Oct 2006 11:18:08 -0600 Subject: [Pythonmac-SIG] [4suite] python2.5 error building 4Suite-1.0rc4 In-Reply-To: References: <4F4005B6-E56C-42D6-9280-0D5133E24429@lbl.gov> <451B6D12.30505@ogbuji.net> Message-ID: <200610011118.08965.jeremy.kloth@4suite.org> On Sunday, October 1, 2006 3:08 am, Ronald Oussoren wrote: > On Sep 28, 2006, at 8:34 AM, Uche Ogbuji wrote: > >> From Ft/Xml/src/expat/lib/xmlparse.c > >> 18 #ifndef HAVE_UINTPTR_T > >> 19 #if SIZEOF_VOID_P <= SIZEOF_INT > >> 20 typedef unsigned int uintptr_t; > >> > >> It appears like the problem is with the python2.5 installation, > >> anybody > >> else have this problem? > > > > Yes. This was reported and we put a workaround in recently. Try a > > recent 4Suite CVS snapshot. > > It seems to be a problem in the configure script for python 2.5, the > configure script seems to be checking if untptr_t is a built-in type. > I have a patch and have asked on python-dev if this is indeed a > correct patch. I believe that this is also present in Python 2.4. I mention only as 2.4.4 is being prepared for release. -- Jeremy Kloth http://4suite.org/ From rsfinn at gmail.com Mon Oct 2 05:09:11 2006 From: rsfinn at gmail.com (Russell Finn) Date: Sun, 1 Oct 2006 23:09:11 -0400 Subject: [Pythonmac-SIG] pyobjc build from svn checkout? In-Reply-To: <5D88916E-059C-473B-AF98-A8E78BDDD896@mac.com> References: <5D88916E-059C-473B-AF98-A8E78BDDD896@mac.com> Message-ID: On 9/30/06, Bill Dozier wrote: > > What else do I need to do? Read this thread in the pyobjc-dev mailing list: http://article.gmane.org/gmane.comp.python.pyobjc.devel/4155 http://article.gmane.org/gmane.comp.python.pyobjc.devel/4169 (It's one logical thread; for some reason my comments got put in a separate physical thread. Is there a better way to reference the list archives? The sourceforge interface seems less useful...) -- Russell Finn From rowen at cesmail.net Mon Oct 2 20:10:27 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Mon, 02 Oct 2006 11:10:27 -0700 Subject: [Pythonmac-SIG] Are python extensions compatible between 32 and 64 bit Macs? Message-ID: Will C extensions to Python that are built on 64 bit Macs (such as the new iMacs) will work on 32 bit Macs, and visa versa? -- Russell From bob at redivi.com Mon Oct 2 20:28:26 2006 From: bob at redivi.com (Bob Ippolito) Date: Mon, 2 Oct 2006 11:28:26 -0700 Subject: [Pythonmac-SIG] Are python extensions compatible between 32 and 64 bit Macs? In-Reply-To: References: Message-ID: <6a36e7290610021128q43aadfb0u57eef17416d7e295@mail.gmail.com> On 10/2/06, Russell E. Owen wrote: > Will C extensions to Python that are built on 64 bit Macs (such as the > new iMacs) will work on 32 bit Macs, and visa versa? Definitely if the universal binary distribution for Python 2.5 or 2.4.3 are used, because it explicitly compiles for (32-bit) i386 and ppc only. -bob From Chris.Barker at noaa.gov Mon Oct 2 21:07:28 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 02 Oct 2006 12:07:28 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220217r2c0b3798qfb9de084eb3f4c32@mail.gmail.com> <6a36e7290609220233p5ccdfa3fy8ab2eafa0b5d8fc@mail.gmail.com> <45140CB1.7020102@noaa.gov> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> Message-ID: <45216370.1040309@noaa.gov> konrad.hinsen at laposte.net wrote: >>> What I was looking for is actually a bit more modest: I want to >>> create an installer that checks that all dependencies are fulfilled. > True, but I don't mind. The users I am thinking of know nothing about > Python and would just install packages. I want to be able to warn > them if they forget one or try to install them in the wrong order. > If there is no such tool, I guess it would be easy to write in > Python The fundamental issue here is that Apple has not given us a full-featured package management tool. Perhaps it would be better to figure out the best system for Python, rather than kludging around the limitations of .mpkgs. My first thought on that is setup-tools -- it seems to have all the features you want, except for the ability for a non-python-aware user to just click on something. That being the case, what we need is a little micro-gui to associate with eggs, so that people can just click on them, and get a little dialog asking if they want to install, etc. The trick here is: what to write it in? PyObjC, wxPython, Tk, all need to be installed correctly before they can be used. Maybe we could use the wxPython that Apple delivers (do they deliver a usable Tk?), or maybe it could be written in ObjC instead of Python (NO! say it isn't so!) Another option is to make sure that the MacPython installer installs something usable by default -- PyObjC, wxPython, TK, or??? Other thoughts? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Mon Oct 2 21:14:16 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 02 Oct 2006 12:14:16 -0700 Subject: [Pythonmac-SIG] building statically with bdist_mpkg In-Reply-To: References: Message-ID: <45216508.8000008@noaa.gov> listservs at mac.com wrote: > I've looked around for some docs on how to do this, but was > unsuccessful: How do you build statically using bdist_mpkg? At the > moment, I am building manually using > > python setup.py config -L ../staticlibs build install > > where staticlibs holds all of the libraries I need. If you add that path in your setup.py, then it will be used by bdist_mpkg. I don't remember exactly the incantation to do this, but it's something like library_dirs. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Mon Oct 2 21:17:28 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 02 Oct 2006 12:17:28 -0700 Subject: [Pythonmac-SIG] Problems with MacPython packages at pythonmac.org - numpy, scipy, matplotlib In-Reply-To: <10136E08-8476-40C4-83E6-FE773765C05D@peterbull.com> References: <10136E08-8476-40C4-83E6-FE773765C05D@peterbull.com> Message-ID: <452165C8.1050409@noaa.gov> Adam Bull wrote: > Hi, I'm told this is the right place to discuss problems with the > packages at pythonmac.org? There are a few things that need fixing: > > The supplied version of scipy, 1.5.0, doesn't work with the supplied > version of of numpy, 1.0b5; it gives an error when importing. > Updating numpy to 1.0rc1 would fix the problem. hmm. Charlie Moad built all of those, I thought he kept them compatible. Darn. If he hasn't responded, you can find him on the MPL list. This should all settle down soon. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From bob at redivi.com Mon Oct 2 21:24:20 2006 From: bob at redivi.com (Bob Ippolito) Date: Mon, 2 Oct 2006 12:24:20 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <45216370.1040309@noaa.gov> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> Message-ID: <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> On 10/2/06, Christopher Barker wrote: > konrad.hinsen at laposte.net wrote: > >>> What I was looking for is actually a bit more modest: I want to > >>> create an installer that checks that all dependencies are fulfilled. > > > True, but I don't mind. The users I am thinking of know nothing about > > Python and would just install packages. I want to be able to warn > > them if they forget one or try to install them in the wrong order. > > > If there is no such tool, I guess it would be easy to write in > > Python > > The fundamental issue here is that Apple has not given us a > full-featured package management tool. Perhaps it would be better to > figure out the best system for Python, rather than kludging around the > limitations of .mpkgs. > > My first thought on that is setup-tools -- it seems to have all the > features you want, except for the ability for a non-python-aware user > to just click on something. That being the case, what we need is a > little micro-gui to associate with eggs, so that people can just click > on them, and get a little dialog asking if they want to install, etc. > > The trick here is: what to write it in? > > PyObjC, wxPython, Tk, all need to be installed correctly before they can > be used. > > Maybe we could use the wxPython that Apple delivers (do they deliver a > usable Tk?), or maybe it could be written in ObjC instead of Python (NO! > say it isn't so!) Another option is to make sure that the MacPython > installer installs something usable by default -- PyObjC, wxPython, TK, > or??? > > Other thoughts? It's not a great idea to put a front-end on easy_install at this point. It would be an enormous amount of work for very little gain. It's also not at all designed such that it's easy to break what it's doing up into little chunks so that you can properly display status and whatnot from a GUI. Using easy_install is quite easy -- you type "easy_install WhatYouNeed" and press return. That's it. Users currently need some familiarity with Terminal in order to get anything done with Python anyway. -bob From Chris.Barker at noaa.gov Mon Oct 2 22:55:01 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 02 Oct 2006 13:55:01 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> Message-ID: <45217CA5.5070807@noaa.gov> Bob Ippolito wrote: > It's not a great idea to put a front-end on easy_install at this > point. It would be an enormous amount of work for very little gain. > It's also not at all designed such that it's easy to break what it's > doing up into little chunks so that you can properly display status > and whatnot from a GUI. I wasn't imagining a lot of work -- just *something* that allows new users to point and click at a egg and get something useful. > Using easy_install is quite easy -- you type "easy_install > WhatYouNeed" and press return. That's it. Users currently need some > familiarity with Terminal in order to get anything done with Python > anyway. That's a good point, just the same. Now if just put a copy of easy_install in the standard MacPython installer, we'd be one step in the right direction. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From bob at redivi.com Mon Oct 2 23:12:26 2006 From: bob at redivi.com (Bob Ippolito) Date: Mon, 2 Oct 2006 14:12:26 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <45217CA5.5070807@noaa.gov> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> <45217CA5.5070807@noaa.gov> Message-ID: <6a36e7290610021412n20ce91wf34159f77c3e2b4f@mail.gmail.com> On 10/2/06, Christopher Barker wrote: > Bob Ippolito wrote: > > It's not a great idea to put a front-end on easy_install at this > > point. It would be an enormous amount of work for very little gain. > > It's also not at all designed such that it's easy to break what it's > > doing up into little chunks so that you can properly display status > > and whatnot from a GUI. > > I wasn't imagining a lot of work -- just *something* that allows new > users to point and click at a egg and get something useful. Well it's possible to create an association with .egg files to open up a terminal and run easy_install, but that's kinda pointless because nobody downloads eggs manually. > > Using easy_install is quite easy -- you type "easy_install > > WhatYouNeed" and press return. That's it. Users currently need some > > familiarity with Terminal in order to get anything done with Python > > anyway. > > That's a good point, just the same. Now if just put a copy of > easy_install in the standard MacPython installer, we'd be one step in > the right direction. That would deviate from the norm where MacPython ships only with what comes with Python -- nothing third party (beyond dependencies of extensions that ship with Python). That said, I'm +0. -bob From ronaldoussoren at mac.com Tue Oct 3 08:10:55 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 3 Oct 2006 08:10:55 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> Message-ID: <944F3206-A1B1-4F56-8AF3-683BB7815EFB@mac.com> On Oct 2, 2006, at 9:24 PM, Bob Ippolito wrote: >> >> PyObjC, wxPython, Tk, all need to be installed correctly before >> they can >> be used. On 10.4 Tk is already installed and could be used, it has appearently has issues but an egg frontend could be kept simple enough to work around those. But that isn't really an issue anyway, the setuptools frontend could, and probably should, be build as a (semi-) standalone application bundle. That way you can include all libraries you want into the application bundle without depending on what the user wants to have installed. >> >> Maybe we could use the wxPython that Apple delivers (do they >> deliver a >> usable Tk?), or maybe it could be written in ObjC instead of >> Python (NO! >> say it isn't so!) Another option is to make sure that the MacPython >> installer installs something usable by default -- PyObjC, >> wxPython, TK, >> or??? >> >> Other thoughts? > > It's not a great idea to put a front-end on easy_install at this > point. It would be an enormous amount of work for very little gain. > It's also not at all designed such that it's easy to break what it's > doing up into little chunks so that you can properly display status > and whatnot from a GUI. I somewhat agree with this, anyone that want to build a frontend for easy_install should be prepared to work with PJE to enhance setuptools/easy_install to make it easier to write a frontend to setuptools. Writing the actual UI is pretty easy. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061003/72612855/attachment-0001.bin From ronaldoussoren at mac.com Tue Oct 3 08:27:15 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 3 Oct 2006 08:27:15 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <6a36e7290610021412n20ce91wf34159f77c3e2b4f@mail.gmail.com> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> <45217CA5.5070807@noaa.gov> <6a36e7290610021412n20ce91wf34159f77c3e2b4f@mail.gmail.com> Message-ID: <0C9B78E7-2D85-45A7-AAFC-EFB881D2410A@mac.com> On Oct 2, 2006, at 11:12 PM, Bob Ippolito wrote: >> >> That's a good point, just the same. Now if just put a copy of >> easy_install in the standard MacPython installer, we'd be one step in >> the right direction. > > That would deviate from the norm where MacPython ships only with what > comes with Python -- nothing third party (beyond dependencies of > extensions that ship with Python). > > That said, I'm +0. I'm -0 on this. Easy-install is very convenient and I wish it were part of Python 2.5 but it isn't. MacPython is at this point in time "just" the official binary distribution of the python.org tree. Growing it beyond that (that is include third party libraries and tools) could be useful, but even then I'd be more inclined towards adding useful GUI tools than libraries. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061003/23d198ea/attachment.bin From konrad.hinsen at laposte.net Tue Oct 3 12:16:47 2006 From: konrad.hinsen at laposte.net (Konrad Hinsen) Date: Tue, 3 Oct 2006 12:16:47 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> Message-ID: On Oct 2, 2006, at 21:24, Bob Ippolito wrote: > Using easy_install is quite easy -- you type "easy_install > WhatYouNeed" and press return. That's it. Users currently need some > familiarity with Terminal in order to get anything done with Python > anyway. Not necessarily. I know one person who uses nothing but IDLE and is quite scared of the command line. On Oct 2, 2006, at 23:12, Bob Ippolito wrote: > Well it's possible to create an association with .egg files to open up > a terminal and run easy_install, but that's kinda pointless because > nobody downloads eggs manually. I know lots of users who would prefer to download packages and then install them, rather than do everything on one step. There are various reasons for this: - You can decide to download only from trustworthy places, or install only packages handed to you by a trustworthy person. - You can archive the packages you download, so you always know exactly what you installed and you can always reproduce an installation at a later time. - You can install on a machine without an internet connection (laptops on the road, high-security sites, cluster nodes, ...) - If you are behind a strict firewall, you can download using your preconfigured browser and don't have to configure proxies for additional tools. Therefore, if it is possible to download and install eggs manually, then I am sure there would be a client base for a GUI-based installer associated with .egg files. That said, I have to add that I am not a big fan of setuptools. Last time I checked, they didn't handle installation of C header files in a useful way. Since most of my packages include C header files and depend on other packages' C header files, setuptools are of little use for me. Konrad. From ronaldoussoren at mac.com Tue Oct 3 12:43:50 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 3 Oct 2006 12:43:50 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> Message-ID: On Oct 3, 2006, at 12:16 PM, Konrad Hinsen wrote: > > That said, I have to add that I am not a big fan of setuptools. Last > time I checked, they didn't handle installation of C header files in > a useful way. Since most of my packages include C header files and > depend on other packages' C header files, setuptools are of little > use for me. I have a patch for setuptools 0.7 that includes header files in eggs and ensures that other setuptools-aware packages see those during build_ext. PJE has indicated that something like this will be added to setuptools in 0.7 timeframe. I'm rather happy with setuptools, there are some cosmetic problems (like the header-file thingy), but the core seems pretty well thought out. The main thing I'm missing right now are nice command-line utilities for managing installed eggs (easy_install is cool, but I want to be able to list installed eggs and uninstall them as well). ls (1) and rm(1) work for those tasks, but aren't ideal. This features is appearently also on the list for the 0.7 release (but not yet implemented). Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061003/3a7b795e/attachment.bin From charles.hartman at conncoll.edu Tue Oct 3 15:19:42 2006 From: charles.hartman at conncoll.edu (Charles Hartman) Date: Tue, 3 Oct 2006 09:19:42 -0400 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython Message-ID: <7F5EDC34-54B5-45D6-A098-C59FB7ED7ACB@conncoll.edu> Bob Ippolito said: > Using easy_install is quite easy -- you type "easy_install > WhatYouNeed" and press return. That's it. Users currently need some > familiarity with Terminal in order to get anything done with Python > anyway. But hasn't there been real progress toward making that not true? And isn't that a good thing? Can't Python be an OSX programming enrivonment rather than (as well as) a Darwin one? I suppose the simple way would be a tiny Applescript drag-and-drop that just called easy_install . . . Charles Hartman From Chris.Barker at noaa.gov Tue Oct 3 18:24:54 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 03 Oct 2006 09:24:54 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <7F5EDC34-54B5-45D6-A098-C59FB7ED7ACB@conncoll.edu> References: <7F5EDC34-54B5-45D6-A098-C59FB7ED7ACB@conncoll.edu> Message-ID: <45228ED6.8060104@noaa.gov> Charles Hartman wrote: > Bob Ippolito said: >> Users currently need some familiarity with Terminal in order to get >> anything done with Python anyway. > But hasn't there been real progress toward making that not true? And > isn't that a good thing? Can't Python be an OSX programming > enrivonment rather than (as well as) a Darwin one? Exactly. Heck, for lots of packages: $ sudo python setup.py install works fine too, but I still think it's worth building mpkgs of those. It seems to me that that the community on this list has shared the goal of making Python on OS-X as easy to use and "mac-like" as possible. That's why we have the repository of binary packages on pythonmac.org. So far, it appears the easiest way to make a package easy to install for a mac user is to make a *.mpgk of it. In fact, I've advocated for years that the best way to make python accessible on all platforms if to have packages in a "native" format -- that means rpms on rpm based linux systems, MS installers for windows, and mpkgs for the Mac. However, Apple has not provided us with a full-featured package management system. So we are faced with either kludging around its limitations, or using something else as the default way to distribute packages for OS-X. Right now, setuptools is really the only other option. In fact, at this point, there is at least one important package that isn't available as a *.mpkg (Py2App). People need to install the Python package, then go find an easy-install script somewhere, install it, then use it to install py2app. This really isn't a huge deal, but it is too much for the "casual mac user" -- it took me a little poking around to figure out, which is way too much for anyone that is new to python and the whole command line thing. Shouldn't there at least be a package for easy-install itself? Ronald Oussoren wrote: > I'm rather happy with setuptools, there are some cosmetic problems > (like the header-file thingy), but the core seems pretty well thought > out. > This features is apparently also on the list for the 0.7 release (but > not yet implemented). Which reinforces that setuptools is a good option to pursue. > I'm -0 on this. Easy-install is very convenient and I wish it were part > of Python 2.5 but it isn't. MacPython is at this point in time "just" > the official binary distribution of the python.org tree. > > Growing it beyond that (that is include third party libraries and tools) > could be useful, but even then I'd be more inclined towards adding > useful GUI tools than libraries. Which is what I'm talking about. I don't agree that "MacPython is at this point in time "just" the official binary distribution of the python.org tree". I've certainly got the impression that the goal is to make Python work smoothly and "natively" on the Mac. I suppose the only real additions are the pythonw (now called python) front end and a little tweaking of shell start-up scripts, but those are important. Maybe installing setuptools by default is the thin end of the wedge, but I think it's critical that we do have a standard and easy way for people to install packages. setuptools is still a bit of a mystery to me, but I'm still confused as to why it is more than trivial to make a small gui that will: Pop up a dialog when you click on a *.egg, with a message like: Would you like to install the python package: blah-blah-blah: [install] [cancel] if [install] is clicked, it would ask for the admin password, then install the package. If dependencies are required, it would pop up another dialog: The following other packages are required to install this one. Would you like these to be auto-downloaded for you, or would you like to download and install them by hand? [auto-download] [I'll do it] Thats it. I think setuptools provides that functionality at this point. Am I wrong? Key is that there is a default way to download an egg, click on it, select all the defaults in a series of dialogs, and get your package installed. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From bob at redivi.com Tue Oct 3 19:09:18 2006 From: bob at redivi.com (Bob Ippolito) Date: Tue, 3 Oct 2006 10:09:18 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> Message-ID: <6a36e7290610031009o1e45cfcer1510e0a92ede9a38@mail.gmail.com> On 10/3/06, Konrad Hinsen wrote: > On Oct 2, 2006, at 21:24, Bob Ippolito wrote: > > > Using easy_install is quite easy -- you type "easy_install > > WhatYouNeed" and press return. That's it. Users currently need some > > familiarity with Terminal in order to get anything done with Python > > anyway. > > Not necessarily. I know one person who uses nothing but IDLE and is > quite scared of the command line. > > On Oct 2, 2006, at 23:12, Bob Ippolito wrote: > > > Well it's possible to create an association with .egg files to open up > > a terminal and run easy_install, but that's kinda pointless because > > nobody downloads eggs manually. > > I know lots of users who would prefer to download packages and then > install them, rather than do everything on one step. There are > various reasons for this: > > - You can decide to download only from trustworthy places, or install > only packages handed to you by a trustworthy person. > > - You can archive the packages you download, so you always know > exactly what you installed and you can always reproduce an > installation at a later time. > > - You can install on a machine without an internet connection > (laptops on the road, high-security sites, cluster nodes, ...) > > - If you are behind a strict firewall, you can download using your > preconfigured browser and don't have to configure proxies for > additional tools. > > > Therefore, if it is possible to download and install eggs manually, > then I am sure there would be a client base for a GUI-based installer > associated with .egg files. It's still very atypical. You'd be coding a GUI client that three people use. There are options with easy_install to do all of these things. I'm pretty sure there's an option to download packages without installing them that people use to download the eggs (e.g. for transfer to another machine or archival), and there's an option to use a filesystem path instead of the internet for installing packages. > That said, I have to add that I am not a big fan of setuptools. Last > time I checked, they didn't handle installation of C header files in > a useful way. Since most of my packages include C header files and > depend on other packages' C header files, setuptools are of little > use for me. Any other problems you have you should report to distutils-sig so that they get fixed. It's definitely not going to get any less popular, so you're going to have to live with setuptools. -bob From rowen at cesmail.net Tue Oct 3 19:18:43 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Tue, 03 Oct 2006 10:18:43 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> <944F3206-A1B1-4F56-8AF3-683BB7815EFB@mac.com> Message-ID: In article <944F3206-A1B1-4F56-8AF3-683BB7815EFB at mac.com>, Ronald Oussoren wrote: > On Oct 2, 2006, at 9:24 PM, Bob Ippolito wrote: > > >> > >> PyObjC, wxPython, Tk, all need to be installed correctly before > >> they can > >> be used. > > On 10.4 Tk is already installed and could be used, it has appearently > has issues but an egg frontend could be kept simple enough to work > around those. I agree. The installed Tcl/Tk 8.4.7 is perfectly adequate for something like this. (Using PyObjC could probably make more Mac-standard interface, but if Bob feels uncomfortable including that in MacPython then Tcl/Tk does seem like the obvious choice.) -- Russell From ronaldoussoren at mac.com Tue Oct 3 19:24:24 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 3 Oct 2006 19:24:24 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <45228ED6.8060104@noaa.gov> References: <7F5EDC34-54B5-45D6-A098-C59FB7ED7ACB@conncoll.edu> <45228ED6.8060104@noaa.gov> Message-ID: <9F20976C-11D3-4E3E-B02C-6BA1A8DB5192@mac.com> On Oct 3, 2006, at 6:24 PM, Christopher Barker wrote: > > So far, it appears the easiest way to make a package easy to > install for > a mac user is to make a *.mpgk of it. In fact, I've advocated for > years > that the best way to make python accessible on all platforms if to > have > packages in a "native" format -- that means rpms on rpm based linux > systems, MS installers for windows, and mpkgs for the Mac. That depends on how you look at things ;-). As a system administrator I really prefer software that is installed using native packages, that way I have one repository to query to see what is installed. The disadvantage of using a native package system is that the python user has to remember which tool he has to use on every partical box instead of using something familiar. But for the mac we don't really have a choice, as you mentioned Apple doesn't ship a good package manager anyway, so we won't miss out a lot when we don't use .mpkg's. > > Ronald Oussoren wrote: >> I'm rather happy with setuptools, there are some cosmetic problems >> (like the header-file thingy), but the core seems pretty well thought >> out. > >> This features is apparently also on the list for the 0.7 release (but >> not yet implemented). > > Which reinforces that setuptools is a good option to pursue. Yup. > >> I'm -0 on this. Easy-install is very convenient and I wish it were >> part >> of Python 2.5 but it isn't. MacPython is at this point in time "just" >> the official binary distribution of the python.org tree. >> >> Growing it beyond that (that is include third party libraries and >> tools) >> could be useful, but even then I'd be more inclined towards adding >> useful GUI tools than libraries. > > Which is what I'm talking about. I don't agree that "MacPython is at > this point in time "just" the official binary distribution of the > python.org tree". I've certainly got the impression that the goal > is to > make Python work smoothly and "natively" on the Mac. I suppose the > only > real additions are the pythonw (now called python) front end and a > little tweaking of shell start-up scripts, but those are important. Sure, but at this point in time all that work is done within the boundaries of the official python.org tree. That's not to say that this cannot change, and IMHO this should change at some point. I'd love to see better GUI tools than IDLE included with the official distribution. > > Maybe installing setuptools by default is the thin end of the > wedge, but > I think it's critical that we do have a standard and easy way for > people > to install packages. There is one major problem with setuptools w.r.t. this: at least some of the python.org maintainers really dislike it for some reason or the other. That makes it including setuptools in the official python distribution for the mac a bit hairy. > > setuptools is still a bit of a mystery to me, but I'm still > confused as > to why it is more than trivial to make a small gui that will: > > Pop up a dialog when you click on a *.egg, with a message like: > > Would you like to install the python package: blah-blah-blah: > [install] [cancel] > > if [install] is clicked, it would ask for the admin password, then > install the package. > > If dependencies are required, it would pop up another dialog: > > The following other packages are required to install this one. > Would you > like these to be auto-downloaded for you, or would you like to > download > and install them by hand? > [auto-download] [I'll do it] > > Thats it. I think setuptools provides that functionality at this > point. > Am I wrong? > > Key is that there is a default way to download an egg, click on it, > select all the defaults in a series of dialogs, and get your package > installed. Building such a gui would be straightforward if setuptools had the hooks to do so. Last time I checked setuptools had some hooks, but isn't capable of playing nice with a GUI event loop. My guess is that it is much more convenient to build a very shallow wrapper around easy_install, basicly just a window with a textbox where you can enter an easy_install command-line and larger textview to show the output of easy_install. Double-clicking on an egg can open this window with the right command-line filled in. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061003/3a7f0b07/attachment.bin From rowen at cesmail.net Tue Oct 3 19:26:37 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Tue, 03 Oct 2006 10:26:37 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> <6a36e7290610031009o1e45cfcer1510e0a92ede9a38@mail.gmail.com> Message-ID: In article <6a36e7290610031009o1e45cfcer1510e0a92ede9a38 at mail.gmail.com>, "Bob Ippolito" wrote: >... > There are options with easy_install to do all of these things. I'm > pretty sure there's an option to download packages without installing > them that people use to download the eggs (e.g. for transfer to > another machine or archival), and there's an option to use a > filesystem path instead of the internet for installing packages. I hope so. I would love to be able to install packages from egg files, as it could simplify some local code development and distribution. I tried to figure out how to do it from the easy_install manual (which I do not find very clear) and gave up. -- Russell From ronaldoussoren at mac.com Tue Oct 3 19:27:19 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 3 Oct 2006 19:27:19 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> <944F3206-A1B1-4F56-8AF3-683BB7815EFB@mac.com> Message-ID: <1ACDAB1E-6C4B-4557-812D-8D03262848DD@mac.com> On Oct 3, 2006, at 7:18 PM, Russell E. Owen wrote: > In article <944F3206-A1B1-4F56-8AF3-683BB7815EFB at mac.com>, > Ronald Oussoren wrote: > >> On Oct 2, 2006, at 9:24 PM, Bob Ippolito wrote: >> >>>> >>>> PyObjC, wxPython, Tk, all need to be installed correctly before >>>> they can >>>> be used. >> >> On 10.4 Tk is already installed and could be used, it has appearently >> has issues but an egg frontend could be kept simple enough to work >> around those. > > I agree. The installed Tcl/Tk 8.4.7 is perfectly adequate for > something > like this. (Using PyObjC could probably make more Mac-standard > interface, but if Bob feels uncomfortable including that in MacPython > then Tcl/Tk does seem like the obvious choice.) *I* don't want to include PyObjC in the standard MacPython distribution just yet. Ronald > > -- Russell > > _______________________________________________ > 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: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061003/3f1371f7/attachment.bin From rowen at cesmail.net Tue Oct 3 19:28:44 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Tue, 03 Oct 2006 10:28:44 -0700 Subject: [Pythonmac-SIG] Are python extensions compatible between 32 and 64 bit Macs? References: <6a36e7290610021128q43aadfb0u57eef17416d7e295@mail.gmail.com> Message-ID: In article <6a36e7290610021128q43aadfb0u57eef17416d7e295 at mail.gmail.com>, "Bob Ippolito" wrote: > On 10/2/06, Russell E. Owen wrote: > > Will C extensions to Python that are built on 64 bit Macs (such as the > > new iMacs) will work on 32 bit Macs, and visa versa? > > Definitely if the universal binary distribution for Python 2.5 or > 2.4.3 are used, because it explicitly compiles for (32-bit) i386 and > ppc only. Thanks! I wonder what folks who want 64-bit numpy are going to do. But my own code doesn't need it, so I'm happy. -- Russell From njriley at uiuc.edu Tue Oct 3 19:33:36 2006 From: njriley at uiuc.edu (Nicholas Riley) Date: Tue, 3 Oct 2006 12:33:36 -0500 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <9F20976C-11D3-4E3E-B02C-6BA1A8DB5192@mac.com> References: <7F5EDC34-54B5-45D6-A098-C59FB7ED7ACB@conncoll.edu> <45228ED6.8060104@noaa.gov> <9F20976C-11D3-4E3E-B02C-6BA1A8DB5192@mac.com> Message-ID: <20061003173336.GB47248@uiuc.edu> On Tue, Oct 03, 2006 at 07:24:24PM +0200, Ronald Oussoren wrote: > My guess is that it is much more convenient to build a very shallow > wrapper around easy_install, basicly just a window with a textbox > where you can enter an easy_install command-line and larger textview > to show the output of easy_install. Double-clicking on an egg can > open this window with the right command-line filled in. Or it could just build a .term file and launch Terminal with it. That should be good enough, I think, and you don't have to worry if something weird happens because there'd be a fully capable terminal with which the user can interact. -- Nicholas Riley | From bob at redivi.com Tue Oct 3 19:38:34 2006 From: bob at redivi.com (Bob Ippolito) Date: Tue, 3 Oct 2006 10:38:34 -0700 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <45228ED6.8060104@noaa.gov> References: <7F5EDC34-54B5-45D6-A098-C59FB7ED7ACB@conncoll.edu> <45228ED6.8060104@noaa.gov> Message-ID: <6a36e7290610031038k12def08tfdb1766b9440c8aa@mail.gmail.com> On 10/3/06, Christopher Barker wrote: > Charles Hartman wrote: > > Bob Ippolito said: > >> Users currently need some familiarity with Terminal in order to get > >> anything done with Python anyway. > > > But hasn't there been real progress toward making that not true? And > > isn't that a good thing? Can't Python be an OSX programming > > enrivonment rather than (as well as) a Darwin one? > > Exactly. Heck, for lots of packages: > > $ sudo python setup.py install > > works fine too, but I still think it's worth building mpkgs of those. The big difference is that easy_install goes ahead and downloads the latest version for you in the same step. No download and unpacking. You can even point it at the URL of a tarball and it will do this for you... > It seems to me that that the community on this list has shared the goal > of making Python on OS-X as easy to use and "mac-like" as possible. > That's why we have the repository of binary packages on pythonmac.org. > > So far, it appears the easiest way to make a package easy to install for > a mac user is to make a *.mpgk of it. In fact, I've advocated for years > that the best way to make python accessible on all platforms if to have > packages in a "native" format -- that means rpms on rpm based linux > systems, MS installers for windows, and mpkgs for the Mac. No argument about this currently being the easiest way. The problem with native packages is that there is no good way to make a database with dependencies and have packages automatically get installed. This prevents Python developers from making or using small libraries, instead they want to throw everything in one package so that the dependency tree is very small. That is bad for Python. setuptools + Cheese Shop fixes this problem. > However, Apple has not provided us with a full-featured package > management system. So we are faced with either kludging around its > limitations, or using something else as the default way to distribute > packages for OS-X. Right now, setuptools is really the only other option. Even if they did we'd still be going the setuptools route, but perhaps easy_install would use the package management system in the process. > In fact, at this point, there is at least one important package that > isn't available as a *.mpkg (Py2App). People need to install the Python > package, then go find an easy-install script somewhere, install it, then > use it to install py2app. This really isn't a huge deal, but it is too > much for the "casual mac user" -- it took me a little poking around to > figure out, which is way too much for anyone that is new to python and > the whole command line thing. > > Shouldn't there at least be a package for easy-install itself? Probably, but it's not totally trivial to build a correct one, so I don't. I don't have the need or time to look into it. You only have to install it once, then you can "easy_install -U setuptools" to upgrade whenever necessary. > Ronald Oussoren wrote: > > I'm rather happy with setuptools, there are some cosmetic problems > > (like the header-file thingy), but the core seems pretty well thought > > out. > > > This features is apparently also on the list for the 0.7 release (but > > not yet implemented). > > Which reinforces that setuptools is a good option to pursue. > > > I'm -0 on this. Easy-install is very convenient and I wish it were part > > of Python 2.5 but it isn't. MacPython is at this point in time "just" > > the official binary distribution of the python.org tree. > > > > Growing it beyond that (that is include third party libraries and tools) > > could be useful, but even then I'd be more inclined towards adding > > useful GUI tools than libraries. > > Which is what I'm talking about. I don't agree that "MacPython is at > this point in time "just" the official binary distribution of the > python.org tree". I've certainly got the impression that the goal is to > make Python work smoothly and "natively" on the Mac. I suppose the only > real additions are the pythonw (now called python) front end and a > little tweaking of shell start-up scripts, but those are important. MacPython is exactly what's in the Python svn tree and nothing more (beyond dependencies). That's all Ronald is saying. There is 0 lines of code that doesn't live at svn.python.org. > Maybe installing setuptools by default is the thin end of the wedge, but > I think it's critical that we do have a standard and easy way for people > to install packages. > > setuptools is still a bit of a mystery to me, but I'm still confused as > to why it is more than trivial to make a small gui that will: > > Pop up a dialog when you click on a *.egg, with a message like: > > Would you like to install the python package: blah-blah-blah: > [install] [cancel] > > if [install] is clicked, it would ask for the admin password, then > install the package. > > If dependencies are required, it would pop up another dialog: > > The following other packages are required to install this one. Would you > like these to be auto-downloaded for you, or would you like to download > and install them by hand? > [auto-download] [I'll do it] > > Thats it. I think setuptools provides that functionality at this point. > Am I wrong? setuptools provides this functionality, but the starting point is typically the name of a package not an egg file. So the GUI app would also have to provide a Cheese Shop browser. > Key is that there is a default way to download an egg, click on it, > select all the defaults in a series of dialogs, and get your package > installed. The series of dialogs is what makes the GUI difficult. easy_install is not currently built in a way that makes all of those hooks available. It doesn't have dialogs at the console level at all, just output. You'd either have to duplicate or rewrite a large chunk of what easy_install does to get it to do GUI stuff. It's just too much work for too little gain at this point, especially when setuptools is a moving target. You'd really have to care a whole hell of a lot and be willing to put a lot of effort and coordination into the task. I definitely don't, because I wouldn't use it even if it existed. Using easy_install from the console is always going to be faster and easier for anyone who is at all comfortable with typing "sudo easy_install SomePackage" and pressing return. -bob From hengist.podd at virgin.net Tue Oct 3 23:49:59 2006 From: hengist.podd at virgin.net (has) Date: Tue, 3 Oct 2006 22:49:59 +0100 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: References: Message-ID: <1F0BC034-53DF-4334-B6B8-603A0C5A8297@virgin.net> Charles Hartman wrote: >> Using easy_install is quite easy -- you type "easy_install >> WhatYouNeed" and press return. That's it. Users currently need some >> familiarity with Terminal in order to get anything done with Python >> anyway. > > But hasn't there been real progress toward making that not true? > And isn't that a good thing? Can't Python be an OSX programming > enrivonment rather than (as well as) a Darwin one? > > I suppose the simple way would be a tiny Applescript drag-and-drop > that just called easy_install . . . I already wrote a quick-n-dirty Studio frontend to distutils; wouldn't be hard to add egg support to that: http://freespace.virgin.net/hamish.sanderson/Distutils-GUI-1.2.1.dmg.gz Lacks a little polish, mind you - it'd present better if it was an all-in-one solution, rather than firing up Terminal to run distutils and display the installation log. HTH has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net From konrad.hinsen at laposte.net Wed Oct 4 09:28:43 2006 From: konrad.hinsen at laposte.net (konrad.hinsen at laposte.net) Date: Wed, 4 Oct 2006 09:28:43 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> Message-ID: On 03.10.2006, at 12:43, Ronald Oussoren wrote: > I have a patch for setuptools 0.7 that includes header files in > eggs and ensures that other setuptools-aware packages see those > during build_ext. PJE has indicated that something like this will > be added to setuptools in 0.7 timeframe. That's good news. I will look at setuptools again when 0.7 is out. > I'm rather happy with setuptools, there are some cosmetic problems > (like the header-file thingy), but the core seems pretty well > thought out. The main I wouldn't call that a cosmetic problem. It probably affects few packages, but for those it is a showstopper. Konrad. From konrad.hinsen at laposte.net Wed Oct 4 09:35:21 2006 From: konrad.hinsen at laposte.net (konrad.hinsen at laposte.net) Date: Wed, 4 Oct 2006 09:35:21 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: <6a36e7290610031009o1e45cfcer1510e0a92ede9a38@mail.gmail.com> References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> <6a36e7290610031009o1e45cfcer1510e0a92ede9a38@mail.gmail.com> Message-ID: <2E41FD5F-A376-41F5-AB6C-8D57250C7DD6@laposte.net> On 03.10.2006, at 19:09, Bob Ippolito wrote: >> Therefore, if it is possible to download and install eggs manually, >> then I am sure there would be a client base for a GUI-based installer >> associated with .egg files. > > It's still very atypical. You'd be coding a GUI client that three > people use. I don't know. It is very hard to say what is "typical" without some hard data. In my immediate work environment I already see very different habits in installingh software, ranging from the PhD student who administrates his own PC as he likes to a large paranoid research lab where only one person is allowed to install software downloaded from the Internet. > There are options with easy_install to do all of these things. I'm > pretty sure there's an option to download packages without installing > them that people use to download the eggs (e.g. for transfer to > another machine or archival), and there's an option to use a > filesystem path instead of the internet for installing packages. That sounds fine. Still, there is always a need for GUI installers in my opinion. > Any other problems you have you should report to distutils-sig so that > they get fixed. It's definitely not going to get any less popular, so > you're going to have to live with setuptools. As long as there are no plans to abandon the standard distutils installation, I feel safe... and I can't find any other problems with setuptools before the one that blocks my packages (all of them) is solved. Konrad. From ronaldoussoren at mac.com Wed Oct 4 09:51:44 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 04 Oct 2006 09:51:44 +0200 Subject: [Pythonmac-SIG] Why Do I Explicitly Need MacPython In-Reply-To: References: <97E9D1F2-C60F-4349-97CE-644183059E8A@airmail.net> <8c7f10c60609220923u87fa311v9e78dd210dc320@mail.gmail.com> <45141343.5020200@noaa.gov> <6a36e7290609220951w49e14a65oe649214183776d95@mail.gmail.com> <70F42318-DE8E-4804-98A3-AD2AFF16E7F5@laposte.net> <826654B5-B74A-4727-BDFA-0A5EFF8AA302@laposte.net> <6a36e7290609271035v1ad1fd63t6fb45dd713f566e2@mail.gmail.com> <4C624ACF-55CE-460E-AA56-F48129B11CBE@laposte.net> <45216370.1040309@noaa.gov> <6a36e7290610021224p2fb501b7j9a20b168ee856787@mail.gmail.com> Message-ID: <9817256.1159948304367.JavaMail.ronaldoussoren@mac.com> On Wednesday, October 04, 2006, at 09:28AM, wrote: >On 03.10.2006, at 12:43, Ronald Oussoren wrote: > >> I'm rather happy with setuptools, there are some cosmetic problems >> (like the header-file thingy), but the core seems pretty well >> thought out. The main > >I wouldn't call that a cosmetic problem. It probably affects few >packages, but for those it is a showstopper. You're right, but it is a rather shallow problem. I had implemented a fix for that within the hour, without having looked at the setuptools source before. There are probably more little wringles like those and some of those will be showstoppers for some people. Ronald From M.Laloux at mrw.wallonie.be Wed Oct 4 10:06:31 2006 From: M.Laloux at mrw.wallonie.be (LALOUX Martin) Date: Wed, 04 Oct 2006 10:06:31 +0200 Subject: [Pythonmac-SIG] IDLE (and others), 2.4.3 and Tkinter solution (for me) Message-ID: <6.1.2.0.0.20061004092512.02d58c08@pop.promibra.intra.mrw.wallonie.be> I work on 10.3.9 and since i upgrade to python 2.4.3 universal, i cannot run IDLE without freezing but also other apps like mayavi that I must use in my work. Ronald Oussoren writes "but IDLE in MacPython 2.4 doesn't work for me after all. I'm seeing the same behaviour as you: IDLE starts, but hangs immediately " For people like me who cannot update to Tiger (work, money....) I found a solution : noting that this problem did not exist with macpython 2.4.1, I replace the Tkinter.so of 2.4.3 by the one of 2.4.1 and no more problem : all works perfectly Martin Martin Laloux Dr Sc. Geologue Universit? Catholique de Louvain D?tach? au M.R.W. - DGRNE Cellule g?ologie Division de la Pr?vention et des Autorisations 15, avenue Prince de Li?ge B-5100 Namur t?l. : 081 / 33 61 24 fax : 081 / 33 61 22 mailto:M.Laloux at mrw.wallonie.be http://environnement.wallonie.be/cartosig/cartegeologique ________________________________________________________________ Ce message n'engage aucunement la DGRNE et reste informel. Tout courrier officiel doit toujours actuellement ?tre confirm? par lettre et rev?tu de la signature d'un agent d?ment mandat?. ________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061004/8033c2c8/attachment.html From senn at maya.com Wed Oct 4 03:58:34 2006 From: senn at maya.com (Jeff Senn) Date: Tue, 3 Oct 2006 21:58:34 -0400 Subject: [Pythonmac-SIG] bugs in _Qtmodule Message-ID: <9C435809-53D9-4C54-8D7E-93A2EEFC7F0B@maya.com> While attempting to use the QuickTime sequence grabber interfaces from Python I notice that there is some confusion between Component and ComponentInstance in _Qtmodule.c. I believe most of the instances of "CmpObj_{Convert,New}" in _Qtmodule should actually be "CmpInstObj_{Convert,New}" (There are a few that are correctly CmpObj_...) I have a (moderately tested) patch... -Jas [Please CC relevant replies to me directly as I don't read the list regularly] From Jack.Jansen at cwi.nl Wed Oct 4 11:12:43 2006 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed, 4 Oct 2006 11:12:43 +0200 Subject: [Pythonmac-SIG] bugs in _Qtmodule In-Reply-To: <9C435809-53D9-4C54-8D7E-93A2EEFC7F0B@maya.com> References: <9C435809-53D9-4C54-8D7E-93A2EEFC7F0B@maya.com> Message-ID: <240AFD83-C37B-492A-A80F-7BEF6D2FF5E3@cwi.nl> On 4-okt-2006, at 3:58, Jeff Senn wrote: > > While attempting to use the QuickTime sequence grabber > interfaces from Python I notice that there is some > confusion between Component and ComponentInstance > in _Qtmodule.c. > > I believe most of the instances of "CmpObj_{Convert,New}" > in _Qtmodule should actually be "CmpInstObj_{Convert,New}" > (There are a few that are correctly CmpObj_...) > > I have a (moderately tested) patch... A patch won't help much, because _Qtmodule is generated (through qtscan.py/qtsupport.py). I assume that there's a one-line mistake in qtsupport, which leads to one C type being handled as CmpObj in stead of CmpInstObj. Hmm, well at least the patch will contain that information, I guess. Could you put it on sourceforge and assign it to me? -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2255 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061004/228c7050/attachment.bin From senn at maya.com Wed Oct 4 16:04:55 2006 From: senn at maya.com (Jeff Senn) Date: Wed, 4 Oct 2006 10:04:55 -0400 Subject: [Pythonmac-SIG] bugs in _Qtmodule In-Reply-To: <240AFD83-C37B-492A-A80F-7BEF6D2FF5E3@cwi.nl> References: <9C435809-53D9-4C54-8D7E-93A2EEFC7F0B@maya.com> <240AFD83-C37B-492A-A80F-7BEF6D2FF5E3@cwi.nl> Message-ID: <921C49CA-0D08-4E83-9C87-82838DF3861F@maya.com> On Oct 4, 2006, at 5:12 AM, Jack Jansen wrote: > > A patch won't help much, because _Qtmodule is generated (through > qtscan.py/qtsupport.py). I assume that there's a one-line mistake > in qtsupport, which leads to one C type being handled as CmpObj in > stead of CmpInstObj. Ah, I see. Yes a bunch of lines in qtsupport.py.... > Hmm, well at least the patch will contain that information, I > guess. Could you put it on sourceforge and assign it to me? I'll sourceforge the patch to qtsupport.py; it's obvious. -Jas From heafnerj at sticksandshadows.com Wed Oct 4 19:44:49 2006 From: heafnerj at sticksandshadows.com (Joe Heafner) Date: Wed, 4 Oct 2006 13:44:49 -0400 Subject: [Pythonmac-SIG] porting VPython to OS X Message-ID: Hello. I'm an astronomy/physics instructor who makes heavy use of VPython (http://www.vpython.org) in teaching introductory calculus-based physics. Currently, the only way to use VPython under OS X is via Fink, which indeed works very well. However, we *REALLY? need a native OS X port that can run without the need for X11. Neither I nor the original VPython developers are Mac programmers and therein lies the purpose of my request. Is there a kind soul out there who would be willing to port VPython so that it runs with the latest Mac native version of Python (currently 2.5 afaik)? I would be most willing to help with testing and anything else not related to writing Mac code, which I currently just can't do. You would be helping the physics teaching community as well as the Mac and Python communities and there would certainly be undying gratitude from all of us! If you're willing to help us out, contact me on list or off list (email in sig). I would really appreciate it! Joe Heafner heafnerj(at)sticksandshadows(dot)com www(dot)SticksAndShadows(dot)com From halamillo at wsu.edu Thu Oct 5 17:35:13 2006 From: halamillo at wsu.edu (halamillo) Date: Thu, 5 Oct 2006 08:35:13 -0700 Subject: [Pythonmac-SIG] Help loading a module Message-ID: Newbie BioGrad student here (again): First, thanks for the help on the root node variable last time. It was most helpful! Now, I am trying to load a new module into MacPython, but after doing $ python setup.py install, or $ python setup.py build, then $ python setup.py the files on the module I downloaded are the following: DEVELOPERS Legal.htm PKG-INFO Src customize.py rpm_build.sh Demo Lib Packages Test makeclean.sh rpm_install.sh INSTALL MANIFEST README build makedist.bat setup.cfg Include Misc RPM.README changes.txt makedist.sh setup.py The INSTALL file says I don't need to configure the module if I'm running versions greater than OSX, which I am, but when I run the setup file in the last line of a bunch of erros it tells me the gcc failed. Thanks again for your help. You guys rock. Hugo Alamillo Biological Sciences 265 Eastlick PO Box 644236 Washington State University Pullman, WA 99164 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061005/bf1471ae/attachment.htm From konrad.hinsen at laposte.net Thu Oct 5 18:26:53 2006 From: konrad.hinsen at laposte.net (Konrad Hinsen) Date: Thu, 5 Oct 2006 18:26:53 +0200 Subject: [Pythonmac-SIG] porting VPython to OS X In-Reply-To: References: Message-ID: On Oct 4, 2006, at 19:44, Joe Heafner wrote: > I'm an astronomy/physics instructor who makes heavy use of VPython > (http://www.vpython.org) in teaching introductory calculus-based > physics. Currently, the only way to use VPython under OS X is via > Fink, which indeed works very well. However, we *REALLY? need a > native OS X port that can run without the need for X11. Neither I nor > the original VPython developers are Mac programmers and therein lies I am not enough of a Mac expert to be of any help, nor do I have time for such projects at the moment. Nevertheless, I would like to express my moral support to your request - VPython is a terrific tool that would be great to have in a native version on the Mac. Konrad (physicist) From bob at redivi.com Thu Oct 5 18:32:22 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 5 Oct 2006 09:32:22 -0700 Subject: [Pythonmac-SIG] Help loading a module In-Reply-To: References: Message-ID: <6a36e7290610050932n6ba92574u96c362785d066710@mail.gmail.com> On 10/5/06, halamillo wrote: > > > > Newbie BioGrad student here (again): > > First, thanks for the help on the root node variable last time. It was > most helpful! > > Now, I am trying to load a new module into MacPython, but after doing $ > python setup.py install, or $ python setup.py build, then $ python > setup.py > > the files on the module I downloaded are the following: > > DEVELOPERS Legal.htm PKG-INFO Src > customize.py rpm_build.sh > Demo Lib Packages Test > makeclean.sh rpm_install.sh > INSTALL MANIFEST README build > makedist.bat setup.cfg > Include Misc RPM.README changes.txt > makedist.sh setup.py > > > The INSTALL file says I don't need to configure the module if I'm running > versions greater than OSX, which I am, but when I run the setup file in > the last line of a bunch of erros it tells me the gcc failed. Your error report doesn't really any any information in it. How about: 1. What version of Python you're using 2. What version of Mac OS X you're using 3. Some clue as to what the heck, specifically, you're trying to install 4. Actual error messages! -bob From delza at livingcode.org Thu Oct 5 18:57:37 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 5 Oct 2006 09:57:37 -0700 Subject: [Pythonmac-SIG] porting VPython to OS X In-Reply-To: References: Message-ID: <2C02B630-EB0C-4513-8F6E-B5870B9EF8A4@livingcode.org> I have tried to work on this in the past and would be willing to help again. My main problem is with the build environment. If I can get it to build consistently, I can write the bits that are needed for OS X. What I need is someone who understands autoconf better than I do. Do you know of *anyone* who has been able to build the latest beta versions of VPython on OS X, even with Fink and X? --Dethe On 4-Oct-06, at 10:44 AM, Joe Heafner wrote: > Hello. > > I'm an astronomy/physics instructor who makes heavy use of VPython > (http://www.vpython.org) in teaching introductory calculus-based > physics. Currently, the only way to use VPython under OS X is via > Fink, which indeed works very well. However, we *REALLY? need a > native OS X port that can run without the need for X11. Neither I nor > the original VPython developers are Mac programmers and therein lies > the purpose of my request. Is there a kind soul out there who would > be willing to port VPython so that it runs with the latest Mac native > version of Python (currently 2.5 afaik)? I would be most willing to > help with testing and anything else not related to writing Mac code, > which I currently just can't do. You would be helping the physics > teaching community as well as the Mac and Python communities and > there would certainly be undying gratitude from all of us! If you're > willing to help us out, contact me on list or off list (email in > sig). I would really appreciate it! > > Joe Heafner > heafnerj(at)sticksandshadows(dot)com > www(dot)SticksAndShadows(dot)com > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig Windows has detected the mouse has moved. Please restart your system for changes to take effect. From cwmoad at gmail.com Tue Oct 10 21:47:22 2006 From: cwmoad at gmail.com (Charlie Moad) Date: Tue, 10 Oct 2006 15:47:22 -0400 Subject: [Pythonmac-SIG] [Matplotlib-users] Installation Problems on Mac OS X In-Reply-To: <452BD39D.1050504@umit.maine.edu> References: <452A6C84.3090102@umit.maine.edu> <452BD39D.1050504@umit.maine.edu> Message-ID: <6382066a0610101247v2258986dp5673e3a314641403@mail.gmail.com> On 10/10/06, R. Padraic Springuel wrote: > I haven't tried the binaries because there isn't one for python 2.5 and > Mac OS 10.4 (the particular combination that I have). I could use the > binaries if I went back to python 2.4, but I'm trying avoid that if > possible. So actually there is a build for you... actually two. I built "matplotlib-0.87.6-py2.5-macosx-10.3-fat.egg" with python2.5 on OS 10.4. For some strange reason setuptools or distutils tags it with 10.3. It might be because the build targets to 10.3.9 SDK, so it should be compatible with 10.3.9 and up. "matplotlib-0.87.6-py2.5-macosx10.4.zip" is the exact same build but bundled with bdist_mpkg. It is understanding how this is confusing. I am cc'ing the pythonmac-sig list to see if someone can better explain the thought process behind this. - Charlie From Chris.Barker at noaa.gov Wed Oct 11 23:55:51 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 11 Oct 2006 14:55:51 -0700 Subject: [Pythonmac-SIG] [Fwd: Re: [Matplotlib-users] Installation Problems on Mac OS X] Message-ID: <452D6867.4030305@noaa.gov> > -------- Original Message -------- > From: R. Padraic Springuel > To: Matplotlib User Support > > Oh, and I tried downloading the .egg file to install, but for some > reason my Mac wants to open the file with Excel, which is obviously > wrong. How exactly do you use a .egg file as a binary installer? Which is why it would be nice to have an "egg handler", no matter how simple. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From bob at redivi.com Thu Oct 12 00:16:59 2006 From: bob at redivi.com (Bob Ippolito) Date: Wed, 11 Oct 2006 15:16:59 -0700 Subject: [Pythonmac-SIG] [Fwd: Re: [Matplotlib-users] Installation Problems on Mac OS X] In-Reply-To: <452D6867.4030305@noaa.gov> References: <452D6867.4030305@noaa.gov> Message-ID: <6a36e7290610111516v691e70bh10d88b6109ef60fe@mail.gmail.com> On 10/11/06, Christopher Barker wrote: > > -------- Original Message -------- > > From: R. Padraic Springuel > > To: Matplotlib User Support > > > > Oh, and I tried downloading the .egg file to install, but for some > > reason my Mac wants to open the file with Excel, which is obviously > > wrong. How exactly do you use a .egg file as a binary installer? > > Which is why it would be nice to have an "egg handler", no matter how > simple. $ easy_install url_or_path_to_egg -bob From hengist.podd at virgin.net Thu Oct 12 00:50:02 2006 From: hengist.podd at virgin.net (has) Date: Wed, 11 Oct 2006 23:50:02 +0100 Subject: [Pythonmac-SIG] [OT] [ann] Ruby appscript 0.1.1 released Message-ID: <12B0CA12-A7A9-423E-B409-BA86565B4C93@virgin.net> Hi folks, Just to let you know that Phase Two of my grand plan for world domination has now begun: http://rb-appscript.rubyforge.org/ Sharks with laser beams are sure to follow. has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From loredo at astro.cornell.edu Thu Oct 12 05:41:36 2006 From: loredo at astro.cornell.edu (Tom Loredo) Date: Wed, 11 Oct 2006 23:41:36 -0400 Subject: [Pythonmac-SIG] gcc/fortran compilers for building extensions with Tiger/MacPython Message-ID: <1160624496.452db970f0f63@astrosun2.astro.cornell.edu> Hi folks, I've just upgraded my G4 (PPC) from Pather to Tiger, and just installed MacPython. I now need to build a slew of numerical extensions. I'm building them from source (I have lots of custom extensions to build from source in any case). I see the binaries available for Tiger are built with gcc 3.3 for PPC and gcc 4 for Intel; I think they may be tied to ActivePython but I'm not sure. When I start MacPython, I see it is built with gcc 4. Is this what I should be using? I'll also be compiling fortran extensions; I presume I should use gfortran rather than g77 for this (g77 is what worked with gcc 3.3). Is this correct? Thanks, Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From delza at livingcode.org Thu Oct 12 06:49:55 2006 From: delza at livingcode.org (Dethe Elza) Date: Wed, 11 Oct 2006 21:49:55 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app Message-ID: Hi folks, I'm switching to to a recent py2app and moving to use setuptools- based builds instead of distutils. I've had several problems, but since I've been coding here and there in spare moments (including on the bus in the mornings), I haven't done a very good job of documenting them, I'm afraid. I do have one persistent problem building both apps and plugins, which is that the settings I add to my plist don't appear in the resulting app/Contents/Info.plist. After much hair-pulling I think that is the source of many of the weird problems I've been seeing. For example, with the following setup: from setuptools import setup setup( plugin=['PastelsView.py'], setup_requires=['py2app'], options=dict( py2app=dict( extension='.saver', plist = dict( NSPrincipalClass='PastelsView', CFBundleShortVersionString = 'Pastels 0.3', CFBBundleDisplayName = 'Pastels', CFBundleIdentifier = 'org.livingcode.applications.pastels', ) ) ) ) I end up with an Info.plist that has the following: CFBundleIdentifier = org.pythonmac.unspecified.PastelsView CFBundleDisplayName = PastelsView CFBundleName = PastelsView NSPrincipalClass = PastelsView So it does end up with the right principal class, but other values are wrong, and the principal class appears to be set correctly more because that is the name of the script file than because I set it explicitly. In another program the app failed to pick up its icon from the plist specifier CFBundleIconFile, but successfully got the icon when I added iconfile in the py2app options. When I try to load the above screensaver I get the console messages: 'import site' failed; use -v for traceback Traceback (most recent call last): File "/Users/delza/Library/Screen Savers/PastelsView.saver/ Contents/Resources/__boot__.py", line 7, in ? _disable_linecache() File "/Users/delza/Library/Screen Savers/PastelsView.saver/ Contents/Resources/__boot__.py", line 2, in _disable_linecache import linecache ImportError: No module named linecache 2006-10-11 21:19:00.209 System Preferences[382] PastelsView has encountered a fatal error, and will now terminate. 2006-10-11 21:19:00.209 System Preferences[382] An uncaught exception was raised during execution of the main script: ImportError: No module named linecache This may mean that an unexpected error has occurred, or that you do not have all of the dependencies for this bundle. 2006-10-11 21:19:00.210 System Preferences[382] ScreenSaverModules: can't get principalClass for /Users/delza/Library/Screen Savers/ PastelsView.saver Details: Python 2.4.3 PyObjC pyobjc-1.4.1a0 installed with "python setup.py bdist_mpkg --open" py2app 0.3.4 Setuptools 0.7a1dev_r51485 OS X 10.4.7 (Intel) Code for the screensaver available from Google Code: http:// code.google.com/p/pastels/source Code works from the command-line (not built into a bundle) with my test harness. The linecache module is in place, the message that it is missing is spurious. When I change the Info.plist by hand to reflect the desired bundle name (Pastels) I still see it as PastelsView, and it still fails to load, so I'm obviously missing something important. If anyone has a clue as to what I'm doing wrong, please let me know. If there's any other information that would be helfpul, please let me know. Thanks! --Dethe All space and matter, organic or inorganic, has some degree of life in it [...] All matter/space has some degree of "self" in it. If either of these claims comes, in future, to be considered true, that would radically change our picture of the universe. --Christopher Alexander From jrus at hcs.harvard.edu Thu Oct 12 07:18:10 2006 From: jrus at hcs.harvard.edu (Jacob Rus) Date: Thu, 12 Oct 2006 01:18:10 -0400 Subject: [Pythonmac-SIG] [Fwd: Re: [Matplotlib-users] Installation Problems on Mac OS X] In-Reply-To: <6a36e7290610111516v691e70bh10d88b6109ef60fe@mail.gmail.com> References: <452D6867.4030305@noaa.gov> <6a36e7290610111516v691e70bh10d88b6109ef60fe@mail.gmail.com> Message-ID: >> Which is why it would be nice to have an "egg handler", no matter how >> simple. > > $ easy_install url_or_path_to_egg Wouldn't it be pretty easy to wrap that in an Easy Install.app? -Jacob From bob at redivi.com Thu Oct 12 12:01:21 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 12 Oct 2006 03:01:21 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: Message-ID: <6a36e7290610120301s127273ay58c2c037e27e7161@mail.gmail.com> On 10/11/06, Dethe Elza wrote: > Hi folks, > > I'm switching to to a recent py2app and moving to use setuptools- > based builds instead of distutils. I've had several problems, but > since I've been coding here and there in spare moments (including on > the bus in the mornings), I haven't done a very good job of > documenting them, I'm afraid. Plugins are currently broken. This is a known issue... patches accepted, I'm not sure when I'll have time to get to it. -bob From bob at redivi.com Thu Oct 12 12:03:49 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 12 Oct 2006 03:03:49 -0700 Subject: [Pythonmac-SIG] [Fwd: Re: [Matplotlib-users] Installation Problems on Mac OS X] In-Reply-To: References: <452D6867.4030305@noaa.gov> <6a36e7290610111516v691e70bh10d88b6109ef60fe@mail.gmail.com> Message-ID: <6a36e7290610120303n3f483529j6f86f548a0b84497@mail.gmail.com> On 10/11/06, Jacob Rus wrote: > >> Which is why it would be nice to have an "egg handler", no matter how > >> simple. > > > > $ easy_install url_or_path_to_egg > > Wouldn't it be pretty easy to wrap that in an Easy Install.app? Yes, it is, and there's an example in the py2app sources that does exactly that.. but it falls apart if you need options or if you have proxy issues. Additionally, the common use case is "easy_install name" rather than "easy_install i_went_through_the_trouble_to_download_this_file_to_my_harddrive.egg" so it proved to be rather useless in a general context (for anyone that knows about easy_install a priori). -bob From ronaldoussoren at mac.com Thu Oct 12 12:03:58 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Oct 2006 12:03:58 +0200 Subject: [Pythonmac-SIG] Python 2.4.4c1 is released Message-ID: Hi, As some of you might have noticed RC 1 of Python 2.4.4 is available on python.org. For the mac the most important changes are inclusion of the new icons (the same as in Python 2.5) and having universal binary support in the official python.org tree (instead of the python24-fat tree at pythonmac.org). There is one major omission w.r.t. the python24-fat tree: I haven't merged the changes to IDLE to the official tree because those changes were IMO to invasive for a minor release. If you want to use IDLE you're better of with Python 2.5, that version of IDLE is the best one available for mac users. I'd appriate if some of you could test this version, I may have missed something in the port from the pythonmac tree to the official tree. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/63ad81e2/attachment.bin From ronaldoussoren at mac.com Thu Oct 12 14:34:54 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Oct 2006 14:34:54 +0200 Subject: [Pythonmac-SIG] Python 2.4.4c1 is released In-Reply-To: <44F8E19F-66B8-4B9B-A1C4-355A6A37DE52@chello.at> References: <44F8E19F-66B8-4B9B-A1C4-355A6A37DE52@chello.at> Message-ID: <0461BE46-95A3-44D2-86C1-EA783A93BC46@mac.com> On Oct 12, 2006, at 2:31 PM, Kaweh Kazemi wrote: > this is great. thanks. > > does 2.4.4 include the 2.5 fix for the python launcher (using the > script's current directory as the startup directory)? I didn't rember if I backported that, but yes that fix is included. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/91c34be9/attachment.bin From kaweh.kazemi at chello.at Thu Oct 12 14:31:16 2006 From: kaweh.kazemi at chello.at (Kaweh Kazemi) Date: Thu, 12 Oct 2006 14:31:16 +0200 Subject: [Pythonmac-SIG] Python 2.4.4c1 is released In-Reply-To: References: Message-ID: <44F8E19F-66B8-4B9B-A1C4-355A6A37DE52@chello.at> this is great. thanks. does 2.4.4 include the 2.5 fix for the python launcher (using the script's current directory as the startup directory)? cheers, kaweh On 12.10.2006, at 12:03, Ronald Oussoren wrote: > Hi, > > As some of you might have noticed RC 1 of Python 2.4.4 is available > on python.org. For the mac the most important changes are inclusion > of the new icons (the same as in Python 2.5) and having universal > binary support in the official python.org tree (instead of the > python24-fat tree at pythonmac.org). > > There is one major omission w.r.t. the python24-fat tree: I haven't > merged the changes to IDLE to the official tree because those > changes were IMO to invasive for a minor release. If you want to > use IDLE you're better of with Python 2.5, that version of IDLE is > the best one available for mac users. > > I'd appriate if some of you could test this version, I may have > missed something in the port from the pythonmac tree to the > official tree. > > Ronald_______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From delza at livingcode.org Thu Oct 12 15:59:02 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 12 Oct 2006 06:59:02 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <6a36e7290610120301s127273ay58c2c037e27e7161@mail.gmail.com> References: <6a36e7290610120301s127273ay58c2c037e27e7161@mail.gmail.com> Message-ID: On 12-Oct-06, at 3:01 AM, Bob Ippolito wrote: > Plugins are currently broken. This is a known issue... patches > accepted, I'm not sure when I'll have time to get to it. Can you give any more specifics about how it is broken. I'm trying to write an article about how easy it is to build plugins with PyObjC and I'd really like it to be true again. Is it documented somewhere that plugins are broken? I've already wasted a few days of my hobby coding time trying to work around this. And the plist thing doesn't just happen with plugins: the reason I started the switch to setuptools was that my icons stopped being added to applications under distutils. Unfortunately, setuptools not only didn't fix the problem, it brought a host of other problems which I'm still digging out from under. And here I thought I was a late adopter of setuptools. Hints about the known problems and where to begin with solving them would be really appreciated. Once I know what the problems are, I could even take a stab at improving the documentation. --Dethe It was odd: even though I was pretty much being eaten alive, I didn't really mind. I suppose it's the same sort of feeling Jesus had while on the cross, or how Buddha felt when Mechabuddha beat him up in downtown Tokyo. --AJ Packman From jrus at hcs.harvard.edu Thu Oct 12 18:11:58 2006 From: jrus at hcs.harvard.edu (Jacob Rus) Date: Thu, 12 Oct 2006 12:11:58 -0400 Subject: [Pythonmac-SIG] [Fwd: Re: [Matplotlib-users] Installation Problems on Mac OS X] In-Reply-To: <6a36e7290610120303n3f483529j6f86f548a0b84497@mail.gmail.com> References: <452D6867.4030305@noaa.gov> <6a36e7290610111516v691e70bh10d88b6109ef60fe@mail.gmail.com> <6a36e7290610120303n3f483529j6f86f548a0b84497@mail.gmail.com> Message-ID: Bob Ippolito wrote: > Yes, it is, and there's an example in the py2app sources that does > exactly that.. but it falls apart if you need options or if you have > proxy issues. Additionally, the common use case is "easy_install name" > rather than "easy_install > i_went_through_the_trouble_to_download_this_file_to_my_harddrive.egg" > so it proved to be rather useless in a general context (for anyone > that knows about easy_install a priori). I'm actually just in this to find a place to put the egg icon. :p But it seems, on general principle, that it would be good to have some app that knows what egg files are to associate with launch services, even if all it does is pop up an informative message that says "run the following command from the terminal?" or something. I'm really not joking about this one. Users new to python have no idea what a .egg file is, and there's nothing that I could find in the standard python docs about what they are or how to use them (For instance, neither the [Installing Python Modules][ipm] page, nor the Library Reference, nor the Tutorial makes any mention of eggs). Double clicking an egg file currently pops up a message that the system doesn't know what it is. The whole point of eggs is that they're supposed to make life *easy*, and *just work*. [ipm]: http://python.org/doc/current/inst/inst.html Further down the line, it would be neat to have some sort of GUI app for browsing through python packages. I don't know exactly what eggs look like internally, but it's my understanding that they contain code, plus information about dependencies, etc? Maybe we could make a cocoa app for looking through all the installed packages on a user's computer, with a web view showing docstrings pulled out of the code, or even a text view showing the full code itself. This app could show which packages were installed with which python version, and exactly where they were located on disk, etc. I propose the name `Egg Basket.app`. :) Maybe this is too much to dream, as no one really has the time to make such a thing. But we're Mac users here. We should strive for discoverable, clear, intuitive interfaces, even when it comes to programming. -Jacob From bob at redivi.com Thu Oct 12 18:49:32 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 12 Oct 2006 09:49:32 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <6a36e7290610120301s127273ay58c2c037e27e7161@mail.gmail.com> Message-ID: <6a36e7290610120949i7c7ee102u9cdb5ebbf2019fca@mail.gmail.com> On 10/12/06, Dethe Elza wrote: > On 12-Oct-06, at 3:01 AM, Bob Ippolito wrote: > > > Plugins are currently broken. This is a known issue... patches > > accepted, I'm not sure when I'll have time to get to it. > > Can you give any more specifics about how it is broken. I'm trying > to write an article about how easy it is to build plugins with PyObjC > and I'd really like it to be true again. Is it documented somewhere > that plugins are broken? I've already wasted a few days of my hobby > coding time trying to work around this. And the plist thing doesn't > just happen with plugins: the reason I started the switch to > setuptools was that my icons stopped being added to applications > under distutils. Unfortunately, setuptools not only didn't fix the > problem, it brought a host of other problems which I'm still digging > out from under. > > And here I thought I was a late adopter of setuptools. > > Hints about the known problems and where to begin with solving them > would be really appreciated. Once I know what the problems are, I > could even take a stab at improving the documentation. plist thing just doesn't happen? The plugin bootstrap is broken. They won't start. The fact that plugins are broken is not documented, but neither is anything else about plugins. -bob From ronaldoussoren at mac.com Thu Oct 12 19:08:23 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Oct 2006 19:08:23 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: Message-ID: On Oct 12, 2006, at 6:49 AM, Dethe Elza wrote: [.. description of a problem ...] > > When I try to load the above screensaver I get the console messages: > > 'import site' failed; use -v for traceback > Traceback (most recent call last): > File "/Users/delza/Library/Screen Savers/PastelsView.saver/ > Contents/Resources/__boot__.py", line 7, in ? > _disable_linecache() > File "/Users/delza/Library/Screen Savers/PastelsView.saver/ > Contents/Resources/__boot__.py", line 2, in _disable_linecache > import linecache > ImportError: No module named linecache > 2006-10-11 21:19:00.209 System Preferences[382] PastelsView has > encountered a fatal error, and will now terminate. > 2006-10-11 21:19:00.209 System Preferences[382] An uncaught exception > was raised during execution of the main script: > > ImportError: No module named linecache Could you try again with the latest version of py2app, that is subversion revision 46. Using 'easy_install py2app==dev' should do the trick. I just checked in a patch that fixes the Info.plist template, at least as far as the PYTHONPATH is concerned. This seems to be enough to create functional versions of PyObjC's Screensaver examples again, but I haven't done a full review therefore other issues might remain. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/7fcff204/attachment.bin From bob at redivi.com Thu Oct 12 19:20:34 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 12 Oct 2006 10:20:34 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <9A9F421A-6122-4414-81C4-0A6F196493CF@livingcode.org> References: <6a36e7290610120301s127273ay58c2c037e27e7161@mail.gmail.com> <6a36e7290610120949i7c7ee102u9cdb5ebbf2019fca@mail.gmail.com> <9A9F421A-6122-4414-81C4-0A6F196493CF@livingcode.org> Message-ID: <6a36e7290610121020l5565509bge81859ed5c8870e3@mail.gmail.com> On 10/12/06, Dethe Elza wrote: > On 12-Oct-06, at 9:49 AM, Bob Ippolito wrote: > > > plist thing just doesn't happen? > > Doesn't appear to. I still don't know what you're talking about. > > The plugin bootstrap is broken. They won't start. > > So where do I look? This used to work beautifully. Is the plugin > bootstrap the __boot__.py file or is it in C or Objective-C? Do we > know how long this has been broken, so I can look at the context- > appropriate diffs? I think it's been broken since the release of 0.3, but it could've happened some time later. I didn't have any easy to run examples or use cases for them when I was finishing it, so they fell out of maintenance. I haven't used py2app or PyObjC for months... been really busy with work, and no GUI toy projects. This leaves me with very little free coding time, and when I have it I'm not very motivated to work on stuff I don't have any plans to use any time soon. > > The fact that plugins are broken is not documented, but neither is > > anything else about plugins. > > They're minimally documented, but that was enough to get me going and > I've been building plugins reliably for months, until now. Right now > I'm looking at how to return to distutils-based builds and an earlier > version of py2app, since that worked. The documentationf or 0.3 makes a couple mentions of plugins, but there is no documentation at all for how to create one. You must be referring to the old documentation. -bob From delza at livingcode.org Thu Oct 12 19:15:05 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 12 Oct 2006 10:15:05 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <6a36e7290610120949i7c7ee102u9cdb5ebbf2019fca@mail.gmail.com> References: <6a36e7290610120301s127273ay58c2c037e27e7161@mail.gmail.com> <6a36e7290610120949i7c7ee102u9cdb5ebbf2019fca@mail.gmail.com> Message-ID: <9A9F421A-6122-4414-81C4-0A6F196493CF@livingcode.org> On 12-Oct-06, at 9:49 AM, Bob Ippolito wrote: > plist thing just doesn't happen? Doesn't appear to. > The plugin bootstrap is broken. They won't start. So where do I look? This used to work beautifully. Is the plugin bootstrap the __boot__.py file or is it in C or Objective-C? Do we know how long this has been broken, so I can look at the context- appropriate diffs? > The fact that plugins are broken is not documented, but neither is > anything else about plugins. They're minimally documented, but that was enough to get me going and I've been building plugins reliably for months, until now. Right now I'm looking at how to return to distutils-based builds and an earlier version of py2app, since that worked. --Dethe You know, Hobbes, some days even my lucky rocketship underpants don't help. --Calvin From ronaldoussoren at mac.com Thu Oct 12 19:34:00 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Oct 2006 19:34:00 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <9A9F421A-6122-4414-81C4-0A6F196493CF@livingcode.org> References: <6a36e7290610120301s127273ay58c2c037e27e7161@mail.gmail.com> <6a36e7290610120949i7c7ee102u9cdb5ebbf2019fca@mail.gmail.com> <9A9F421A-6122-4414-81C4-0A6F196493CF@livingcode.org> Message-ID: <093FCE35-10BB-4BAF-B234-2EEFEAB0FC2F@mac.com> On Oct 12, 2006, at 7:15 PM, Dethe Elza wrote: > On 12-Oct-06, at 9:49 AM, Bob Ippolito wrote: > >> plist thing just doesn't happen? > > Doesn't appear to. > >> The plugin bootstrap is broken. They won't start. > > So where do I look? This used to work beautifully. Is the plugin > bootstrap the __boot__.py file or is it in C or Objective-C? Do we > know how long this has been broken, so I can look at the context- > appropriate diffs? > >> The fact that plugins are broken is not documented, but neither is >> anything else about plugins. > > They're minimally documented, but that was enough to get me going and > I've been building plugins reliably for months, until now. Right now > I'm looking at how to return to distutils-based builds and an earlier > version of py2app, since that worked. Could you please try the latest version in the py2app repository again? I think I fixed the pythonpath issue, that should get you going again. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/9973d0c4/attachment.bin From delza at livingcode.org Thu Oct 12 19:58:20 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 12 Oct 2006 10:58:20 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: Message-ID: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> On 12-Oct-06, at 10:08 AM, Ronald Oussoren wrote: > Could you try again with the latest version of py2app, that is > subversion revision 46. Using 'easy_install py2app==dev' should do > the trick. When I try that (after a long time) get a stack trace as follows: delza$ easy_install py2app==dev Searching for py2app==dev Reading http://www.python.org/pypi/py2app/ Reading http://undefined.org/python/#py2app Reading http://www.python.org/pypi/py2app/0.3.4 Best match: py2app dev Downloading http://svn.pythonmac.org/py2app/py2app/trunk#egg=py2app-dev Doing subversion checkout from http://svn.pythonmac.org/py2app/py2app/ trunk to /tmp/easy_install-q6o67p/trunk Processing trunk Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-q6o67p/ trunk/egg-dist-tmp-vup0ad Traceback (most recent call last): File "/usr/local/pybin/easy_install", line 7, in ? sys.exit( File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 1588, in main with_ei_usage(lambda: File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 1577, in with_ei_usage return f() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 1592, in distclass=DistributionWithoutHelpCommands, **kw File "/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 471, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/sandbox.py", line 26, in run_setup DirectorySandbox(setup_dir).run( File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/sandbox.py", line 63, in run return func() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/sandbox.py", line 29, in {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 92, in ? File "/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/dist.py", line 965, in run_command cmd_obj.ensure_finalized() File "/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/cmd.py", line 117, in ensure_finalized self.finalize_options() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/bdist_egg.py", line 94, in finalize_options ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info") File "/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/cmd.py", line 319, in get_finalized_command cmd_obj.ensure_finalized() File "/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/cmd.py", line 117, in ensure_finalized self.finalize_options() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/egg_info.py", line 85, in finalize_options self.vtags = self.tags() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/egg_info.py", line 179, in tags ): version += '-r%s' % self.get_svn_revision() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/setuptools-0.7a1dev_r51485-py2.4.egg/ setuptools/command/egg_info.py", line 196, in get_svn_revision dirurl = urlre.search(data).group(1) # get repository URL AttributeError: 'NoneType' object has no attribute 'group' > I just checked in a patch that fixes the Info.plist template, at > least as far as the PYTHONPATH is concerned. This seems to be > enough to create functional versions of PyObjC's Screensaver > examples again, but I haven't done a full review therefore other > issues might remain. Thanks for taking a look at this. > Ronald --Dethe Ninety percent of the technology hasn't even been developed yet. -- Tim Armstrong, Google From pedz at easesoftware.com Thu Oct 12 20:02:48 2006 From: pedz at easesoftware.com (Perry Smith) Date: Thu, 12 Oct 2006 13:02:48 -0500 Subject: [Pythonmac-SIG] Das Keyboard Message-ID: I bought a keyboard called Das Keyboard. When I plug it in, the Mac needs me to hit two keys so it can identify the keyboard. Does Python on the Mac have any way to catch this "event" (it may not be an event actually)? The other question is for this keyboard, the command and option keys are flipped. There is a control panel that can be used to flip them but I would like two applications to flip them or to set them back to normal (I use this keyboard on a laptop so I am frequently plugging it in and out). Thanks, Perry Smith Ease Software, Inc. pedz at easesoftware.com http://www.easesoftware.com SATA Products for IBMs RS/6000, pSeries, and AIX systems -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/8af934e8/attachment.html From ronaldoussoren at mac.com Thu Oct 12 22:33:22 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Oct 2006 22:33:22 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> Message-ID: On Oct 12, 2006, at 7:58 PM, Dethe Elza wrote: > On 12-Oct-06, at 10:08 AM, Ronald Oussoren wrote: > >> Could you try again with the latest version of py2app, that is >> subversion revision 46. Using 'easy_install py2app==dev' should do >> the trick. > > When I try that (after a long time) get a stack trace as follows: Why are you using setuptools 0.7? 0.6 is the stable version of setuptools and works with both python 2.4 and 2.5. I'm using 0.6c3 and that works just fine. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/4618aa9c/attachment.bin From bob at redivi.com Thu Oct 12 22:44:03 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 12 Oct 2006 13:44:03 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> Message-ID: <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> On 10/12/06, Ronald Oussoren wrote: > > On Oct 12, 2006, at 7:58 PM, Dethe Elza wrote: > > > On 12-Oct-06, at 10:08 AM, Ronald Oussoren wrote: > > > >> Could you try again with the latest version of py2app, that is > >> subversion revision 46. Using 'easy_install py2app==dev' should do > >> the trick. > > > > When I try that (after a long time) get a stack trace as follows: > > Why are you using setuptools 0.7? 0.6 is the stable version of > setuptools and works with both python 2.4 and 2.5. I'm using 0.6c3 > and that works just fine. Also if you think that you'll need to hack on py2app at all you'd be better off checking out the source and then "python setup.py develop". That way the egg is your checkout so it's trivial to update and hack on. -bob From delza at livingcode.org Thu Oct 12 23:02:05 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 12 Oct 2006 14:02:05 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> Message-ID: <2661F728-75BF-4B4B-9E76-6A0E05EEC40E@livingcode.org> On 12-Oct-06, at 1:33 PM, Ronald Oussoren wrote: >>> Could you try again with the latest version of py2app, that is >>> subversion revision 46. Using 'easy_install py2app==dev' should >>> do the trick. >> >> When I try that (after a long time) get a stack trace as follows: > > Why are you using setuptools 0.7? 0.6 is the stable version of > setuptools and works with both python 2.4 and 2.5. I'm using 0.6c3 > and that works just fine. Probably from running something like easy_install setuptools=dev, which is the way listed under "Install" on the setuptools page? I've reverted to 0.6c3 and updated to py2app r46, but both problems remain: 1) py2app isnot picking up plist from a dict, although it does pick up plist filename from a string, and 2) cannot load bundle when building a plugin (screensaver). --Dethe "Improved focus can be achieved through activities such as meditations, yoga and turn off Instant Messaging" - Ulrich Mayr From delza at livingcode.org Thu Oct 12 23:06:29 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 12 Oct 2006 14:06:29 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> Message-ID: <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> On 12-Oct-06, at 1:44 PM, Bob Ippolito wrote: > Also if you think that you'll need to hack on py2app at all you'd be > better off checking out the source and then "python setup.py develop". > That way the egg is your checkout so it's trivial to update and hack > on. Good advice. I'm still quite new to setuptools, learning as I go. I had gotten used to PyObjC and py2app Just Working and certainly never thought I'd be hacking on py2app, but so it goes. Bob, sorry to hear you're not working on py2app or PyObjC these days. While I appreciate your work on MochiKit (it's my favorite JS library), we miss you over in OS X land. Ronald, thanks for taking a look at this. Is there any further info I can give that would be helpful? --Dethe "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. " --Brian Kernighan From ronaldoussoren at mac.com Thu Oct 12 23:15:12 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Oct 2006 23:15:12 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> Message-ID: On Oct 12, 2006, at 11:06 PM, Dethe Elza wrote: > On 12-Oct-06, at 1:44 PM, Bob Ippolito wrote: > >> Also if you think that you'll need to hack on py2app at all you'd be >> better off checking out the source and then "python setup.py >> develop". >> That way the egg is your checkout so it's trivial to update and hack >> on. > > Good advice. I'm still quite new to setuptools, learning as I go. > I had gotten used to PyObjC and py2app Just Working and certainly > never thought I'd be hacking on py2app, but so it goes. > > Bob, sorry to hear you're not working on py2app or PyObjC these > days. While I appreciate your work on MochiKit (it's my favorite > JS library), we miss you over in OS X land. > > Ronald, thanks for taking a look at this. Is there any further > info I can give that would be helpful? What are you using to test? I've tested with the SillyBalls screensaver in PyObjC's examples directory (Examples/Plugins/ SillyBallsSaver). I'm also using the SVN HEAD for altgraph, modulegraph and the other related projects, I don't know if that helps. If upgrading doesn't help, or the SillyBallsSaver example doesn't work for you, I'd like to know loads of version information (Python, PyObjC, py2app, altgraph, modulegraph, macholib) and the exact error message you get in Console.app (close SystemPreferences, open Console.app, use the Clear button, then open a freshly build version of your saver or the SillyBals saver). Also make sure you stop SystemPreferences when you want to test a new build of a screensaver, otherwise SystemPreferences doesn't always pick up the new version (or rather almost never). Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/9bc482d0/attachment-0001.bin From delza at livingcode.org Thu Oct 12 23:40:06 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 12 Oct 2006 14:40:06 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> Message-ID: <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> On 12-Oct-06, at 2:15 PM, Ronald Oussoren wrote: > What are you using to test? I've tested with the SillyBalls > screensaver in PyObjC's examples directory (Examples/Plugins/ > SillyBallsSaver). I've been testing with my screensaver, Pastels, but I just tried with SillyBalls and it also failed to load. > I'm also using the SVN HEAD for altgraph, modulegraph and the other > related projects, I don't know if that helps. > If upgrading doesn't help, or the SillyBallsSaver example doesn't > work for you, I'd like to know loads of version information > (Python, PyObjC, py2app, altgraph, modulegraph, macholib) and the > exact error message you get in Console.app (close > SystemPreferences, open Console.app, use the Clear button, then > open a freshly build version of your saver or the SillyBals saver). macholib 1.1 modulegraph 0.7 altgraph 0.6.7 bdist_mpkg 0.4.2 Any others? Console output from opening SillyBalls: 'import site' failed; use -v for traceback Traceback (most recent call last): File "/Users/delza/Library/Screen Savers/SillyBalls.saver/Contents/ Resources/__boot__.py", line 7, in ? _disable_linecache() File "/Users/delza/Library/Screen Savers/SillyBalls.saver/Contents/ Resources/__boot__.py", line 2, in _disable_linecache import linecache ImportError: No module named linecache 2006-10-12 14:37:36.350 System Preferences[839] SillyBalls has encountered a fatal error, and will now terminate. 2006-10-12 14:37:36.350 System Preferences[839] An uncaught exception was raised during execution of the main script: ImportError: No module named linecache This may mean that an unexpected error has occurred, or that you do not have all of the dependencies for this bundle. 2006-10-12 14:37:36.350 System Preferences[839] ScreenSaverModules: can't get principalClass for /Users/delza/Library/Screen Savers/ SillyBalls.saver > Also make sure you stop SystemPreferences when you want to test a > new build of a screensaver, otherwise SystemPreferences doesn't > always pick up the new version (or rather almost never). I've been deleting old versions from ~/Library/Screen Savers/ (which is where I've been installing them), which seems to get my updates picked up OK. > Ronald Thanks for the help! --Dethe "The real trouble with this world of ours is not that it is an unreasonable world, nor even that it is a reasonable one. The commonest kind of trouble is that it is nearly reasonable, but not quite. Life is not an illogicality; yet it is a trap for logicians. It looks just a little more mathematical and regular than it is; its exactitude is obvious, but its inexactitude is hidden; its wildness lies in wait." --G.K. Chesterton From josh.p.marshall at gmail.com Thu Oct 12 23:52:10 2006 From: josh.p.marshall at gmail.com (Josh Marshall) Date: Fri, 13 Oct 2006 07:52:10 +1000 Subject: [Pythonmac-SIG] Das Keyboard In-Reply-To: References: Message-ID: <3CED2A59-9D32-412C-9EE3-516FC1D2220A@gmail.com> On 13/10/2006, at 4:02 AM, Perry Smith < wrote: > > I bought a keyboard called Das Keyboard. When I plug it in, the > Mac needs me to hit two keys so it can identify the keyboard. > > Does Python on the Mac have any way to catch this "event" (it may > not be an event actually)? I don't know, sorry. > > The other question is for this keyboard, the command and option > keys are flipped. There is a control panel that can be used to > flip them but I would like two applications to flip them or to set > them back to normal (I use this keyboard on a laptop so I am > frequently plugging it in and out). This is a bit off-topic, but I'll answer it anyway, since I had the same problem and it is quite frustrating. I found this script somewhere on the net a few months back, but googling now doesn't find it. Add the following to a script in Script Editor: """ tell application "System Preferences" activate set current pane to pane "com.apple.preference.keyboard" end tell tell application "System Events" get properties tell application process "System Preferences" click button "Modifier Keys?" of tab group 1 of window "Keyboard & Mouse" set commandKey to value of pop up button 3 of sheet 1 of window "Keyboard & Mouse" -- DEBUG -- display dialog commandKey -- Default, lets flip if commandKey ends with "Option" then -- click the pop up button menu "Option", this menu does not exist until it is clicked in the GUI click pop up button 3 of sheet 1 of window "Keyboard & Mouse" -- click "Command" of the pop up menu click menu item 4 of menu 1 of pop up button 3 of sheet 1 of window "Keyboard & Mouse" -- delay briefly delay 1 -- click the pop up button menu "Command", this menu does not exist until it is clicked in the GUI click pop up button 4 of sheet 1 of window "Keyboard & Mouse" -- click "Option" of the pop up menu click menu item 3 of menu 1 of pop up button 4 of sheet 1 of window "Keyboard & Mouse" -- Not Default, lets flip it back else click button "Restore Defaults" of sheet 1 of window "Keyboard & Mouse" end if -- click "OK" to dismiss the sheet click button "OK" of sheet 1 of window "Keyboard & Mouse" end tell end tell tell application "System Preferences" to quit """ Enable user interface scripting in System Prefs:Accessibility, put the script in your Library/Scripts folder, and enable the system scripting menu. You can then run this script from the menu, and it'l swap your Command and Option keys. Cheers, Josh > > Thanks, > Perry Smith > Ease Software, Inc. > pedz at easesoftware.com > http://www.easesoftware.com > > SATA Products for IBMs RS/6000, pSeries, and AIX systems From ronaldoussoren at mac.com Thu Oct 12 23:56:45 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 12 Oct 2006 23:56:45 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> Message-ID: <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> On Oct 12, 2006, at 11:40 PM, Dethe Elza wrote: > On 12-Oct-06, at 2:15 PM, Ronald Oussoren wrote: > >> What are you using to test? I've tested with the SillyBalls >> screensaver in PyObjC's examples directory (Examples/Plugins/ >> SillyBallsSaver). > > I've been testing with my screensaver, Pastels, but I just tried > with SillyBalls and it also failed to load. > >> I'm also using the SVN HEAD for altgraph, modulegraph and the >> other related projects, I don't know if that helps. > >> If upgrading doesn't help, or the SillyBallsSaver example doesn't >> work for you, I'd like to know loads of version information >> (Python, PyObjC, py2app, altgraph, modulegraph, macholib) and the >> exact error message you get in Console.app (close >> SystemPreferences, open Console.app, use the Clear button, then >> open a freshly build version of your saver or the SillyBals saver). > > macholib 1.1 > modulegraph 0.7 > altgraph 0.6.7 > bdist_mpkg 0.4.2 I have macholib 1.2, modulegraph 0.7.1, altgraph 0.6.8 and py2app 0.3.5, all fresh checkouts from svn. > > Any others? > > Console output from opening SillyBalls: > > 'import site' failed; use -v for traceback > Traceback (most recent call last): > File "/Users/delza/Library/Screen Savers/SillyBalls.saver/ > Contents/Resources/__boot__.py", line 7, in ? > _disable_linecache() > File "/Users/delza/Library/Screen Savers/SillyBalls.saver/ > Contents/Resources/__boot__.py", line 2, in _disable_linecache > import linecache > ImportError: No module named linecache > 2006-10-12 14:37:36.350 System Preferences[839] SillyBalls has > encountered a fatal error, and will now terminate. > 2006-10-12 14:37:36.350 System Preferences[839] An uncaught > exception was raised during execution of the main script: > > ImportError: No module named linecache Could you check the Info.plist and the structure of the screensaver? Info.plist should have a key PyResourcePackages with an empty array as its value and an PyRuntimeLocations that points to an embedded python framework. The patch I just checked in ensures that PyResourcePackages is empty, with an unpatched version the array will contain some strings and that messes up sys.path. There should be a lib/python2.4 in the Resources directory of the screensaver, that should contain site-packages.zip, site.py and a lib- dynload directory. To make absolutely sure you have my patched version you could check py2app/bundletemplate/plist_template.py, there is a definition of PyResourcePackages in there, the value of which should be an empty list. One way to check: .>> import pprint .>> import py2app.bundletemplate.plist_template .>> pprint.pprint(py2app.bundletemplate.plist_template.infoPlistDict ('dummy')) {'CFBundleDevelopmentRegion': u'English', 'CFBundleDisplayName': u'dummy', 'CFBundleExecutable': u'dummy', 'CFBundleIconFile': u'dummy', 'CFBundleIdentifier': u'org.pythonmac.unspecified.dummy', 'CFBundleInfoDictionaryVersion': u'6.0', 'CFBundleName': u'dummy', 'CFBundlePackageType': u'BNDL', 'CFBundleShortVersionString': u'0.0', 'CFBundleSignature': u'????', 'CFBundleVersion': u'0.0', 'LSHasLocalizedDisplayName': False, 'NSAppleScriptEnabled': False, 'NSHumanReadableCopyright': u'Copyright not specified', 'NSMainNibFile': u'MainMenu', 'NSPrincipalClass': u'dummy', 'PyMainFileNames': [u'__boot__'], 'PyResourcePackages': [], 'PyRuntimeLocations': [u'@executable_path/../Frameworks/ Python.framework/Versions/2.4/Python', u'~/Library/Frameworks/Python.framework/ Versions/2.4/Python', u'/Library/Frameworks/Python.framework/ Versions/2.4/Python', u'/Network/Library/Frameworks/ Python.framework/Versions/2.4/Python', u'/System/Library/Frameworks/ Python.framework/Versions/2.4/Python'], u'PythonInfoDict': {'PythonExecutable': u'/Library/Frameworks/ Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/ Python', 'PythonLongVersion': u'2.4.4c1 (#1, Oct 11 2006, 15:11:04) \n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]', 'PythonShortVersion': u'2.4', u'py2app': {'version': u'0.3.5', 'template': u'bundle'}}} Ronald P.S. Are you sure you installed the latest version of py2app in the right version of Python? If you installed python2.5 after installing python2.4 easy_install might point to the 2.5 version of easy_install (if you have that installed), if it is easy_install-2.4 should pick up the correct version. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061012/060e2a59/attachment.bin From delza at livingcode.org Fri Oct 13 01:15:46 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 12 Oct 2006 16:15:46 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> Message-ID: On 12-Oct-06, at 2:56 PM, Ronald Oussoren wrote: > I have macholib 1.2, modulegraph 0.7.1, altgraph 0.6.8 and py2app > 0.3.5, all fresh checkouts from svn. OK, I now have those versions as well, via easy_install [module]==dev on each one. I had tried building them all from svn the other day, but failed, perhaps because of having the wrong version of setuptools. > Could you check the Info.plist and the structure of the screensaver? > > Info.plist should have a key PyResourcePackages with an empty array > as its value yes, have that > and an PyRuntimeLocations that points to an embedded python framework. PyRuntimeLocaions contains the value: @executable_path/../Frameworks/ Python.framework/Versions/2.4/Python > The patch I just checked in ensures that PyResourcePackages is > empty, with an unpatched version the array will contain some > strings and that messes up sys.path. > > There should be a lib/python2.4 in the Resources directory of the > screensaver, that should contain site-packages.zip, site.py and a > lib-dynload directory. Yes. It also contains a config directory which contains Makefile, Setup, Setup.config, Setup.local. > To make absolutely sure you have my patched version you could check > py2app/bundletemplate/plist_template.py, there is a definition of > PyResourcePackages in there, the value of which should be an empty > list. One way to check: > > .>> import pprint > .>> import py2app.bundletemplate.plist_template > .>> pprint.pprint(py2app.bundletemplate.plist_template.infoPlistDict > ('dummy')) > {'CFBundleDevelopmentRegion': u'English', > 'CFBundleDisplayName': u'dummy', > 'CFBundleExecutable': u'dummy', > 'CFBundleIconFile': u'dummy', > 'CFBundleIdentifier': u'org.pythonmac.unspecified.dummy', > 'CFBundleInfoDictionaryVersion': u'6.0', > 'CFBundleName': u'dummy', > 'CFBundlePackageType': u'BNDL', > 'CFBundleShortVersionString': u'0.0', > 'CFBundleSignature': u'????', > 'CFBundleVersion': u'0.0', > 'LSHasLocalizedDisplayName': False, > 'NSAppleScriptEnabled': False, > 'NSHumanReadableCopyright': u'Copyright not specified', > 'NSMainNibFile': u'MainMenu', > 'NSPrincipalClass': u'dummy', > 'PyMainFileNames': [u'__boot__'], > 'PyResourcePackages': [], > 'PyRuntimeLocations': [u'@executable_path/../Frameworks/ > Python.framework/Versions/2.4/Python', > u'~/Library/Frameworks/Python.framework/ > Versions/2.4/Python', > u'/Library/Frameworks/Python.framework/ > Versions/2.4/Python', > u'/Network/Library/Frameworks/ > Python.framework/Versions/2.4/Python', > u'/System/Library/Frameworks/ > Python.framework/Versions/2.4/Python'], > u'PythonInfoDict': {'PythonExecutable': u'/Library/Frameworks/ > Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/ > Python', > 'PythonLongVersion': u'2.4.4c1 (#1, Oct 11 > 2006, 15:11:04) \n[GCC 4.0.1 (Apple Computer, Inc. build 5341)]', > 'PythonShortVersion': u'2.4', > u'py2app': {'version': u'0.3.5', 'template': > u'bundle'}}} That looks right, I see an empty list as the value of PyResourcePackages. > Ronald > > P.S. Are you sure you installed the latest version of py2app in the > right version of Python? If you installed python2.5 after > installing python2.4 easy_install might point to the 2.5 version of > easy_install (if you have that installed), if it is > easy_install-2.4 should pick up the correct version. I'm sure. I've been checking the site-packages directory before and after running easy_install, and I've gone through and removed old .egg directories (and checked the easy_install.pth) so I can be sure I'm getting the right versions. I've checked to make sure I have the current version of the SillyBalls code too. SillyBalls doesn't even use setuptools, so whatever is broken is broken across both distutils and setuptools (I haven't dug underneath yet to see how these work, so it's still magic under the covers to me). So still no idea why it's working for you, but not for me. Anything else you can think of? I followed the instructions in the py2app docs for removing old versions of py2app. If everything is encapsulated in the .egg, perhaps I can revert to the earlier version that worked? --Dethe It was odd: even though I was pretty much being eaten alive, I didn't really mind. I suppose it's the same sort of feeling Jesus had while on the cross, or how Buddha felt when Mechabuddha beat him up in downtown Tokyo. --AJ Packman From jrodman at mindspring.com Fri Oct 13 04:49:12 2006 From: jrodman at mindspring.com (Jeff Rodman) Date: Thu, 12 Oct 2006 19:49:12 -0700 Subject: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? Message-ID: <97B00D61-F072-484B-A426-B224008AE41E@mindspring.com> is there a simple, current Python module for controlling the audio in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the moment but Intel is possible), preferably in/out simultaneously? I've visited the main sites and lists, I think, but not found a basic answer. "audioop" in the Standard Library manipulates files but does not play/record, "ossaudiodev" does not seem to be included in the actual Python install although documented in the Standard Library manual, and I can't find a mac-targeted form of the "OSS" module over at 4Front. Just want to play and record short files, (I'll take any format, .raw data or wav is fine) in real time for a acoustic application. I'm sure there's a straightforward answer, I'm just missing it. Thanks for any help! Jeff San Francisco From bob at redivi.com Fri Oct 13 05:04:25 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 12 Oct 2006 20:04:25 -0700 Subject: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? In-Reply-To: <97B00D61-F072-484B-A426-B224008AE41E@mindspring.com> References: <97B00D61-F072-484B-A426-B224008AE41E@mindspring.com> Message-ID: <6a36e7290610122004h5b8d6cbfj66d74246377d6920@mail.gmail.com> On 10/12/06, Jeff Rodman wrote: > is there a simple, current Python module for controlling the audio > in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the > moment but Intel is possible), preferably in/out simultaneously? > I've visited the main sites and lists, I think, but not found a basic > answer. "audioop" in the Standard Library manipulates files but does > not play/record, "ossaudiodev" does not seem to be included in the > actual Python install although documented in the Standard Library > manual, and I can't find a mac-targeted form of the "OSS" module over > at 4Front. Just want to play and record short files, (I'll take any > format, .raw data or wav is fine) in real time for a acoustic > application. > > I'm sure there's a straightforward answer, I'm just missing it. > Thanks for any help! I don't think so... last time I did audio input I needed to write my own code in C and Objective-C that called back into Python. You might want to look at something like JACK though. I've never used it, but it looked promising a year or two ago: http://jackaudio.org/ -- separating out the audio into a separate process makes everything easier. Audio output is relatively easy, and can be done with pygame and probably a few other libraries. If JACK works out, you wouldn't need that though. -bob From ronaldoussoren at mac.com Fri Oct 13 07:44:45 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 13 Oct 2006 07:44:45 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> Message-ID: On Oct 13, 2006, at 1:15 AM, Dethe Elza wrote: > > So still no idea why it's working for you, but not for me. > Anything else you can think of? I followed the instructions in the > py2app docs for removing old versions of py2app. If everything is > encapsulated in the .egg, perhaps I can revert to the earlier > version that worked? Reverting to an older version should work as well, with the caveat that the latest pre-setuptools version of py2app has some problems w.r.t. universal binaries (which is why Bob switched to the current version). I'm going to do a fresh install of Python, PyObjC and py2app to see if that helps to find the problem, but don't have time to do so today. One thing that you could try: insert 'import sys; print sys.path' at the top of __boot__.py (in the Resources directory of the saver) to see the value of sys.path. That value seems to be wrong. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061013/9af171ab/attachment.bin From delza at livingcode.org Fri Oct 13 19:35:41 2006 From: delza at livingcode.org (Dethe Elza) Date: Fri, 13 Oct 2006 10:35:41 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> Message-ID: On 12-Oct-06, at 10:44 PM, Ronald Oussoren wrote: > Reverting to an older version should work as well, with the caveat > that the latest pre-setuptools version of py2app has some problems > w.r.t. universal binaries (which is why Bob switched to the current > version). OK, well I need universal binaries, so I'll try to move forward rather than backward. > I'm going to do a fresh install of Python, PyObjC and py2app to see > if that helps to find the problem, but don't have time to do so today. I appreciate the time you've put into this. > One thing that you could try: insert 'import sys; print sys.path' > at the top of __boot__.py (in the Resources directory of the saver) > to see the value of sys.path. That value seems to be wrong. This is a very good clue. Here is the sys.path from a working application built with the same version(s) of all the tools: '/Users/delza/sampleapp/dist/sample.app/Contents/Resources', '/Users/ delza/sampleapp/dist/sample.app/Contents/Resources', '/Users/delza/ sampleapp/dist/sample.app/Contents/Resources/lib/python24.zip', '/ Users/delza/sampleapp/dist/sample.app/Contents/Resources/lib/ python2.4', '/Users/delza/sampleapp/dist/sample.app/Contents/ Resources/lib/python2.4/plat-darwin', '/Users/delza/sampleapp/dist/ sample.app/Contents/Resources/lib/python2.4/plat-mac', '/Users/delza/ sampleapp/dist/sample.app/Contents/Resources/lib/python2.4/plat-mac/ lib-scriptpackages', '/Users/delza/sampleapp/dist/sample.app/Contents/ Resources/lib/python2.4/lib-tk', '/Users/delza/sampleapp/dist/ sample.app/Contents/Resources/lib/python2.4/lib-dynload', '/Users/ delza/sampleapp/dist/sample.app/Contents/Resources/lib/python2.4/site- packages.zip' And here is the sys.path from a plugin: '/Users/delza/Library/Screen Savers/PastelsView.saver/Contents/ Resources', '/Users/delza/Library/Screen Savers/PastelsView.saver/ Contents/Resources', '/Users/delza/Library/Screen Savers/ PastelsView.saver/Contents/Frameworks/Python.framework/Versions/2.4/ lib/python24.zip', '/Users/delza/Library/Screen Savers/ PastelsView.saver/Contents/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/', '/Users/delza/Library/Screen Savers/ PastelsView.saver/Contents/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/plat-darwin', '/Users/delza/Library/Screen Savers/ PastelsView.saver/Contents/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/plat-mac', '/Users/delza/Library/Screen Savers/ PastelsView.saver/Contents/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/plat-mac/lib-scriptpackages', '/Users/delza/Library/ Screen Savers/PastelsView.saver/Contents/Frameworks/Python.framework/ Versions/2.4/lib/python2.4/lib-tk', '/Users/delza/Library/Screen Savers/PastelsView.saver/Contents/Frameworks/Python.framework/ Versions/2.4/lib/python2.4/lib-dynload' Since the ../Contents/Frameworks/Python.framework/Versions/2.4/ directory does not contain a lib directory, these paths are broken. I'm trying to track down where they are set, which appears to be in the bootstrap Objective-C code for setting the RESOURCEPATH environment variable. Does that sound reasonable? --Dethe "We have now become a people who believe that wishing for things makes them happen. Unfortunately, the world just doesn't work that way. The truth is that no combination of alternative fuels or so- called renewables will allow us to run the U.S.A. -- or even a substantial fraction of it -- the way that we're running it now." -- James Howard Kunstler From kevin at macosx.com Fri Oct 13 21:16:13 2006 From: kevin at macosx.com (kevin parks) Date: Fri, 13 Oct 2006 15:16:13 -0400 Subject: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? In-Reply-To: References: Message-ID: <452FE5FD.1000008@macosx.com> I use RTCmix to do real time audio on a Mac w/ Python http://rtcmix.org/ > > Subject: > Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? > From: > "Bob Ippolito" > Date: > Thu, 12 Oct 2006 20:04:25 -0700 > To: > "Jeff Rodman" > > To: > "Jeff Rodman" > CC: > pythonmac-sig at python.org > > > On 10/12/06, Jeff Rodman wrote: >> is there a simple, current Python module for controlling the audio >> in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the >> moment but Intel is possible), preferably in/out simultaneously? >> I've visited the main sites and lists, I think, but not found a basic >> answer. "audioop" in the Standard Library manipulates files but does >> not play/record, "ossaudiodev" does not seem to be included in the >> actual Python install although documented in the Standard Library >> manual, and I can't find a mac-targeted form of the "OSS" module over >> at 4Front. Just want to play and record short files, (I'll take any >> format, .raw data or wav is fine) in real time for a acoustic >> application. >> >> I'm sure there's a straightforward answer, I'm just missing it. >> Thanks for any help! From ronaldoussoren at mac.com Sun Oct 15 18:26:49 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 15 Oct 2006 18:26:49 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> Message-ID: <0EF2F52B-4A5E-4445-8663-5C41F47B090E@mac.com> On Oct 13, 2006, at 7:35 PM, Dethe Elza wrote: > >> One thing that you could try: insert 'import sys; print sys.path' >> at the top of __boot__.py (in the Resources directory of the >> saver) to see the value of sys.path. That value seems to be wrong. > > This is a very good clue. Here is the sys.path from a working > application built with the same version(s) of all the tools: I've done a clean install of python, py2app, PyObjC and related packages and can now reproduce your problem. I hope I've also fixed the problem in revision 47 of py2app. It turns out the app stub and bundle stub use a slightly different way to setup the python environment, which means the right python path must be set in the Info.plist for plugins but not for applications. Setting up the right environment for plugins is also very hard, if not impossible to do completely correct: cpython just isn't designed for having several completely seperate interpreters in one application (and no, Py_NewInterpreter/Py_EndInterpreter don't count). Different plugin bundles with py2app will share part of the environment, such as having a shared sys.path. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061015/ff501f21/attachment.bin From delza at livingcode.org Sun Oct 15 20:23:03 2006 From: delza at livingcode.org (Dethe Elza) Date: Sun, 15 Oct 2006 11:23:03 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: <0EF2F52B-4A5E-4445-8663-5C41F47B090E@mac.com> References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> <0EF2F52B-4A5E-4445-8663-5C41F47B090E@mac.com> Message-ID: On 15-Oct-06, at 9:26 AM, Ronald Oussoren wrote: > I've done a clean install of python, py2app, PyObjC and related > packages and can now reproduce your problem. Thanks so much! > I hope I've also fixed the problem in revision 47 of py2app. It > turns out the app stub and bundle stub use a slightly different way > to setup the python environment, which means the right python path > must be set in the Info.plist for plugins but not for applications. That did it, it's working beautifully now. > Setting up the right environment for plugins is also very hard, if > not impossible to do completely correct: cpython just isn't > designed for having several completely seperate interpreters in one > application (and no, Py_NewInterpreter/Py_EndInterpreter don't > count). Different plugin bundles with py2app will share part of the > environment, such as having a shared sys.path. So does that mean that I shouldn't run two Python plugins in the same program, or that I need to be careful that they have the same dependencies, or that the first contains all the dependencies of subsequent plugins, or what? I'm just trying to understand here. > Ronald Thanks again for taking the time to fix this. --Dethe "Computers are beyond dumb, they're mind-numbingly stupid. They're hostile, rigid, capricious, and unforgiving. They're impossibly demanding and they never learn anything." -- John R. Levine From ronaldoussoren at mac.com Sun Oct 15 22:07:20 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 15 Oct 2006 22:07:20 +0200 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> <0EF2F52B-4A5E-4445-8663-5C41F47B090E@mac.com> Message-ID: On Oct 15, 2006, at 8:23 PM, Dethe Elza wrote: > On 15-Oct-06, at 9:26 AM, Ronald Oussoren wrote: > >> I've done a clean install of python, py2app, PyObjC and related >> packages and can now reproduce your problem. > > Thanks so much! > >> I hope I've also fixed the problem in revision 47 of py2app. It >> turns out the app stub and bundle stub use a slightly different >> way to setup the python environment, which means the right python >> path must be set in the Info.plist for plugins but not for >> applications. > > That did it, it's working beautifully now. Ok, nice to hear that. > >> Setting up the right environment for plugins is also very hard, if >> not impossible to do completely correct: cpython just isn't >> designed for having several completely seperate interpreters in >> one application (and no, Py_NewInterpreter/Py_EndInterpreter don't >> count). Different plugin bundles with py2app will share part of >> the environment, such as having a shared sys.path. > > So does that mean that I shouldn't run two Python plugins in the > same program, or that I need to be careful that they have the same > dependencies, or that the first contains all the dependencies of > subsequent plugins, or what? I'm just trying to understand here. If you have two python plugins for the same program they should at the very least use the same version of python, using different versions of python may or may not work. I'd have to study the plugin main code to be absolutely sure, but AFAIK if plugins A and B both depend on package C they should depend on the same version of C because at runtime they will both use the version that's included in whichever of the plugins was loaded first. If you can arrange for one of the plugins to be loaded first it would be useful to have that plugin include the Python framework and large extensions (like PyObjC). That way other plugins can stay very small and you don't get confusion on what gets loaded. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061015/6d67d70b/attachment.bin From delza at livingcode.org Sun Oct 15 22:55:36 2006 From: delza at livingcode.org (Dethe Elza) Date: Sun, 15 Oct 2006 13:55:36 -0700 Subject: [Pythonmac-SIG] Building plugins with py2app In-Reply-To: References: <0B8F6395-E8BD-48AB-91D2-EC36356E8F7E@livingcode.org> <6a36e7290610121344g6a3987dbn1dbcc65fb9c389b8@mail.gmail.com> <2C5979D8-F569-4CCB-9B10-0C29BD4ED461@livingcode.org> <871BB456-7EC5-4B6D-91D5-AEDF7D9F2EEC@livingcode.org> <5D001845-754C-4374-A45A-23DE16B622B9@mac.com> <0EF2F52B-4A5E-4445-8663-5C41F47B090E@mac.com> Message-ID: <6956AA69-3764-457B-A157-0FEC606DDE60@livingcode.org> On 15-Oct-06, at 1:07 PM, Ronald Oussoren wrote: > Ok, nice to hear that. PyObjC has changed my life for the better, and I'm still just scratching the surface. The hard part is that I've become dependent on it, so when something doesn't work, everything I'm doing comes to a screeching halt. I can't tell you how much I appreciate your quick responses in those cases. > If you have two python plugins for the same program they should at > the very least use the same version of python, using different > versions of python may or may not work. OK, I generally rebuild my plugins with the latest versions of everything anyway, but good to know. > I'd have to study the plugin main code to be absolutely sure, but > AFAIK if plugins A and B both depend on package C they should > depend on the same version of C because at runtime they will both > use the version that's included in whichever of the plugins was > loaded first. That shouldn't be a problem. > If you can arrange for one of the plugins to be loaded first it > would be useful to have that plugin include the Python framework > and large extensions (like PyObjC). That way other plugins can stay > very small and you don't get confusion on what gets loaded. Have you seen SIMBL? It's an input manager that loads plugins, so you can load arbitrary code into an existing application (kind of a gross hack, I know, but terribly useful when code injection wasn't working on Intel). The neat thing about it is how it is configured to only load plugins for certain applications, and only for specified versions of those applications. Having a meta-plugin for Python that did something similar would be cool. I think there is something like that for Quicksilver, but it would be nice to generalize for other plugins. Someday, in all my copious free time, I may even attempt it myself. %-) > Ronald Thanks again! --Dethe "the city carries such a cargo of pathos and longing that daily life there vaccinates us against revelation" -- Pain Not Bread, The Rise and Fall of Human Breath From skip at pobox.com Sun Oct 15 23:43:30 2006 From: skip at pobox.com (skip at pobox.com) Date: Sun, 15 Oct 2006 16:43:30 -0500 Subject: [Pythonmac-SIG] Pysqlite build problem Message-ID: <17714.43906.841444.115520@montanaro.dyndns.org> I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8, gcc-4.0, Python 2.4.4c1). Sqlite built and installed into /usr/local just fine. I adjusted setup.cfg appropriately: [build_ext] define= include_dirs=/usr/local/include:/usr/include library_dirs=/usr/local/lib:/usr/lib libraries=sqlite3 and tried building: running build running build_py creating build creating build/lib.macosx-10.3-fat-2.4 creating build/lib.macosx-10.3-fat-2.4/pysqlite2 copying pysqlite2/__init__.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2 copying pysqlite2/dbapi2.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2 creating build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/__init__.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/dbapi.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/factory.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/hooks.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/regression.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/transactions.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/types.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test copying pysqlite2/test/userfunctions.py -> build/lib.macosx-10.3-fat-2.4/pysqlite2/test running build_ext building 'pysqlite2._sqlite' extension creating build/temp.macosx-10.3-fat-2.4 creating build/temp.macosx-10.3-fat-2.4/src gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c src/module.c -o build/temp.macosx-10.3-fat-2.4/src/module.o In file included from /usr/include/math.h:28, from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/pyport.h:94, from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:55, from src/connection.h:26, from src/module.c:24: /usr/include/architecture/i386/math.h:439: warning: conflicting types for built-in function 'scalb' In file included from /usr/include/math.h:26, from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/pyport.h:94, from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:55, from src/connection.h:26, from src/module.c:24: /usr/include/architecture/ppc/math.h:477: warning: conflicting types for built-in function 'scalb' In file included from /usr/include/wchar.h:112, from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/unicodeobject.h:118, from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:81, from src/connection.h:26In file included from /usr/include/wchar.h:112, from src/module.c:24: , from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/unicodeobject.h:118/usr/include/stdarg.h:4:25:, from /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:81 , from src/connection.h:26error: , from src/module.c:24: stdarg.h: No such file or directory/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory lipo: can't figure out the architecture type of: /var/tmp//ccofOA40.out error: command 'gcc' failed with exit status 1 It seems the compile is failing on the #include_next line in /usr/include/stdarg.h. Running find against /usr indicates that there are several 4.0 versions of stdarg.h: /usr/include/gcc/darwin/3.3/stdarg.h /usr/include/stdarg.h /usr/lib/gcc/i686-apple-darwin8/4.0.0/include/stdarg.h /usr/lib/gcc/i686-apple-darwin8/4.0.0/install-tools/include/stdarg.h /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/stdarg.h /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/install-tools/include/stdarg.h I tried reinstalling XCode 2 from the install disk, but I still don't see a gcc 4.0 version of stdarg.h. /usr/bin/gcc is a symlink to /usr/bin/gcc-4.0. Software Update says my machine is up-to-date. I must be missing something, but what? Thx, Skip From skip at pobox.com Mon Oct 16 03:37:05 2006 From: skip at pobox.com (skip at pobox.com) Date: Sun, 15 Oct 2006 20:37:05 -0500 Subject: [Pythonmac-SIG] Pysqlite build problem In-Reply-To: <17714.43906.841444.115520@montanaro.dyndns.org> References: <17714.43906.841444.115520@montanaro.dyndns.org> Message-ID: <17714.57921.215055.385902@montanaro.dyndns.org> skip> I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8, skip> gcc-4.0, Python 2.4.4c1).... ... skip> stdarg.h: No such file or directory/usr/include/stdarg.h:4:25: skip> error: stdarg.h: No such file or directory I updated setup.cfg to include /usr/lib/gcc/powerpc-apple-darwin8/4.0.0: [build_ext] define= include_dirs=/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include:/usr/local/include:/usr/include library_dirs=/usr/local/lib:/usr/lib/gcc/powerpc-apple-darwin8/4.0.0:/usr/lib libraries=sqlite3 Pysqlite builds with that change and passes all its tests. What does it take to get gcc to consider that directory by default? Skip From ronaldoussoren at mac.com Mon Oct 16 07:57:16 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 16 Oct 2006 07:57:16 +0200 Subject: [Pythonmac-SIG] Pysqlite build problem In-Reply-To: <17714.43906.841444.115520@montanaro.dyndns.org> References: <17714.43906.841444.115520@montanaro.dyndns.org> Message-ID: <0C556A56-9615-4F18-B775-01BBAA339BE3@mac.com> On Oct 15, 2006, at 11:43 PM, skip at pobox.com wrote: > I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8, gcc-4.0, > Python 2.4.4c1). Sqlite built and installed into /usr/local just > fine. I > adjusted setup.cfg appropriately: > > [build_ext] > define= > include_dirs=/usr/local/include:/usr/include > library_dirs=/usr/local/lib:/usr/lib > libraries=sqlite3 Why do you add /usr/include and /usr/lib to include_dirs and library_dirs? Those shouldn't be necessary. The default compiler flags include '-isysroot ...' which picks up the system includes from an SDK, I wouldn't be surprised if mixing -isysroot with -I/usr/ include causes problems. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061016/4137fd25/attachment.bin From skip at pobox.com Mon Oct 16 13:08:14 2006 From: skip at pobox.com (skip at pobox.com) Date: Mon, 16 Oct 2006 06:08:14 -0500 Subject: [Pythonmac-SIG] Pysqlite build problem In-Reply-To: <0C556A56-9615-4F18-B775-01BBAA339BE3@mac.com> References: <17714.43906.841444.115520@montanaro.dyndns.org> <0C556A56-9615-4F18-B775-01BBAA339BE3@mac.com> Message-ID: <17715.26654.675013.534073@montanaro.dyndns.org> >>>>> "Ronald" == Ronald Oussoren writes: Ronald> On Oct 15, 2006, at 11:43 PM, skip at pobox.com wrote: >> I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8, gcc-4.0, >> Python 2.4.4c1). Sqlite built and installed into /usr/local just >> fine. I >> adjusted setup.cfg appropriately: >> >> [build_ext] >> define= >> include_dirs=/usr/local/include:/usr/include >> library_dirs=/usr/local/lib:/usr/lib >> libraries=sqlite3 Ronald> Why do you add /usr/include and /usr/lib to include_dirs and Ronald> library_dirs? I didn't add them. They were there by default. I believe I tried taking them out leaving just /usr/local/* and the results were worse. I'll go back and give it another try when I have a chance. Skip From kw at kevin-walzer.com Mon Oct 16 17:43:51 2006 From: kw at kevin-walzer.com (Kevin Walzer) Date: Mon, 16 Oct 2006 11:43:51 -0400 Subject: [Pythonmac-SIG] Build/install framework Python in non-standard location Message-ID: <4533A8B7.3040900@kevin-walzer.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to build a framework Python 2.5 that installs to a non-standard location (/usr/local/python-unix-framework). The reason I'm doing this is to link to an X11-based version of Tcl/Tk, and still be able to use py2app for app deployment. (I have previously been able to build a standard non-framework Python that links to an X11-based Tcl/Tk, but the resulting binaries cannot be wrapped via py2app, and the other wrapping tools--freeze, cx_freeze, pyinstaller--don't work well or at all on OS X.) I thought that using these build flags would work: ./configure --enable-framework --enable-universalsdk - --prefix=/usr/local/python-unix-framework Everything built fine, but when I ran sudo make install, everything started getting placed in /Library/Frameworks. This isn't what I wanted--that's where the official build of Python 2.5 from python.org is installed (and which links to Tcl/Tk Aqua). I need the second installation to test the X11 version of my application, and the official installation to test the Aqua version. What do I need to hack to get the frameworks to install in my preferred location, instead of the default? And why doesn't Python pick up the ./configure flags correctly anyway? - --Kevin - -- Kevin Walzer Poetic Code http://www.kevin-walzer.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFM6i3rTC5hIgjqTMRAmIKAKCqjLDYWqndY4DaIwA9tCY7TUecVQCbBqJQ 9oGQrBvJw1rnihRSnD4jJsk= =htwQ -----END PGP SIGNATURE----- From bob at redivi.com Mon Oct 16 18:18:06 2006 From: bob at redivi.com (Bob Ippolito) Date: Mon, 16 Oct 2006 09:18:06 -0700 Subject: [Pythonmac-SIG] Build/install framework Python in non-standard location In-Reply-To: <4533A8B7.3040900@kevin-walzer.com> References: <4533A8B7.3040900@kevin-walzer.com> Message-ID: <6a36e7290610160918h75811520n130a25f80ae323e0@mail.gmail.com> On 10/16/06, Kevin Walzer wrote: > > I'm trying to build a framework Python 2.5 that installs to a > non-standard location (/usr/local/python-unix-framework). The reason I'm > doing this is to link to an X11-based version of Tcl/Tk, and still be > able to use py2app for app deployment. (I have previously been able to > build a standard non-framework Python that links to an X11-based Tcl/Tk, > but the resulting binaries cannot be wrapped via py2app, and the other > wrapping tools--freeze, cx_freeze, pyinstaller--don't work well or at > all on OS X.) > > I thought that using these build flags would work: > > ./configure --enable-framework --enable-universalsdk > - --prefix=/usr/local/python-unix-framework > > Everything built fine, but when I ran sudo make install, everything > started getting placed in /Library/Frameworks. This isn't what I > wanted--that's where the official build of Python 2.5 from python.org is > installed (and which links to Tcl/Tk Aqua). I need the second > installation to test the X11 version of my application, and the official > installation to test the Aqua version. > > What do I need to hack to get the frameworks to install in my preferred > location, instead of the default? And why doesn't Python pick up the > ./configure flags correctly anyway? It does pick up the configure flags correctly, but you need to pass the correct configure flags. If you'd have used --help you'd have seen that --enable-framework takes a path, which defaults to /Library/Frameworks. If you want it to go somewhere else, give it a different path. -bob From kw at kevin-walzer.com Mon Oct 16 21:11:22 2006 From: kw at kevin-walzer.com (Kevin Walzer) Date: Mon, 16 Oct 2006 15:11:22 -0400 Subject: [Pythonmac-SIG] Build/install framework Python in non-standard location In-Reply-To: <6a36e7290610160918h75811520n130a25f80ae323e0@mail.gmail.com> References: <4533A8B7.3040900@kevin-walzer.com> <6a36e7290610160918h75811520n130a25f80ae323e0@mail.gmail.com> Message-ID: <4533D95A.50300@kevin-walzer.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bob Ippolito wrote: > On 10/16/06, Kevin Walzer wrote: >> >> I'm trying to build a framework Python 2.5 that installs to a >> non-standard location (/usr/local/python-unix-framework). The reason I'm >> doing this is to link to an X11-based version of Tcl/Tk, and still be >> able to use py2app for app deployment. (I have previously been able to >> build a standard non-framework Python that links to an X11-based Tcl/Tk, >> but the resulting binaries cannot be wrapped via py2app, and the other >> wrapping tools--freeze, cx_freeze, pyinstaller--don't work well or at >> all on OS X.) >> >> I thought that using these build flags would work: >> >> ./configure --enable-framework --enable-universalsdk >> - --prefix=/usr/local/python-unix-framework >> >> Everything built fine, but when I ran sudo make install, everything >> started getting placed in /Library/Frameworks. This isn't what I >> wanted--that's where the official build of Python 2.5 from python.org is >> installed (and which links to Tcl/Tk Aqua). I need the second >> installation to test the X11 version of my application, and the official >> installation to test the Aqua version. >> >> What do I need to hack to get the frameworks to install in my preferred >> location, instead of the default? And why doesn't Python pick up the >> ./configure flags correctly anyway? > > It does pick up the configure flags correctly, but you need to pass > the correct configure flags. > > If you'd have used --help you'd have seen that --enable-framework > takes a path, which defaults to /Library/Frameworks. If you want it to > go somewhere else, give it a different path. > > -bob > > That worked, thanks. For what it's worth, this method still installed the application bits in /Application/MacPython 2.5--but I was able to restore the correct versions from the official MacPython installer. - -- Kevin Walzer Poetic Code http://www.kevin-walzer.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFM9lZrTC5hIgjqTMRArHuAJ9p7VqH0y/glOpDAxV+x53Fh8zrTACffVNb PLxgwHcOYaf9sJ3qHPkdGVg= =MVuU -----END PGP SIGNATURE----- From benoit.dupont at gmail.com Mon Oct 16 22:50:59 2006 From: benoit.dupont at gmail.com (Benoit Dupont) Date: Mon, 16 Oct 2006 22:50:59 +0200 Subject: [Pythonmac-SIG] Problem with installation of Imaging (pil) Message-ID: <9FC7CD52-E160-4971-A26E-44ED1B96200D@gmail.com> Hello, I want to install the Imaging (pil) library on a Mac OS X machine, but I need your help, cause I have the following problem when I try to build the lib using python setup.py install python setup.py install running install running build running build_py running build_ext --- using frameworks at /System/Library/Frameworks building '_imaging' extension gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -DHAVE_LIBJPEG -DHAVE_LIBZ -I/ System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/ Frameworks/Tk.framework/Headers -IlibImaging -I/opt/local/include -I/ Library/Frameworks/Python.framework/Versions/2.5/include -I/usr/local/ include -I/usr/include -I/Library/Frameworks/Python.framework/ Versions/2.5/include/python2.5 -c _imaging.c -o build/ temp.macosx-10.3-fat-2.5/_imaging.o In file included from /usr/include/math.h:26, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/pyport.h:200, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:57, from _imaging.c:74: /usr/include/architecture/ppc/math.h:477: warning: conflicting types for built-in function 'scalb' In file included from /usr/include/wchar.h:112In file included from / usr/include/wchar.h:112, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/unicodeobject.h:118, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:83, from _imaging.c:74: /usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/unicodeobject.h:118, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:83, from _imaging.c:74: /usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory _imaging.c:2765: warning: initialization from incompatible pointer type _imaging.c:2767: warning: 'intargfunc' is deprecated _imaging.c:2767: warning: initialization from incompatible pointer type_imaging.c:2765: warning: initialization from incompatible pointer type _imaging.c:2767: warning: 'intargfunc' is deprecated _imaging.c:2767: warning: initialization from incompatible pointer type _imaging.c:2768: warning: 'intargfunc' is deprecated _imaging.c:2768: warning: initialization from incompatible pointer type _imaging.c:2769: warning: 'intintargfunc' is deprecated _imaging.c:2769: warning: initialization from incompatible pointer type _imaging.c:2770: warning: initialization from incompatible pointer type _imaging.c:2771: warning: initialization from incompatible pointer type _imaging.c:2768: warning: 'intargfunc' is deprecated _imaging.c:2768: warning: initialization from incompatible pointer type _imaging.c:2769: warning: 'intintargfunc' is deprecated _imaging.c:2769: warning: initialization from incompatible pointer type _imaging.c:2770: warning: initialization from incompatible pointer type _imaging.c:2771: warning: initialization from incompatible pointer type lipo: can't figure out the architecture type of: /var/tmp//ccV3P1kE.out ********** When i try python setup.py build_ext -i, and 've got the following message... benoit-duponts-computer:~/Documents/2?me license/IA/Python/ Imaging-1.1.5 benoitdupont$ python setup.py build_ext -i running build_ext --- using frameworks at /System/Library/Frameworks building '_imaging' extension gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -DHAVE_LIBJPEG -DHAVE_LIBZ -I/ System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/ Frameworks/Tk.framework/Headers -IlibImaging -I/opt/local/include -I/ Library/Frameworks/Python.framework/Versions/2.5/include -I/usr/local/ include -I/usr/include -I/Library/Frameworks/Python.framework/ Versions/2.5/include/python2.5 -c _imaging.c -o build/ temp.macosx-10.3-fat-2.5/_imaging.o In file included from /usr/include/math.h:26, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/pyport.h:200, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:57, from _imaging.c:74: /usr/include/architecture/ppc/math.h:477: warning: conflicting types for built-in function 'scalb' In file included from /usr/include/wchar.h:112, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/unicodeobject.h:118, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:83, from _imaging.c:74: /usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory In file included from /usr/include/wchar.h:112, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/unicodeobject.h:118, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:83, from _imaging.c:74: /usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory _imaging.c:2765: warning: initialization from incompatible pointer type _imaging.c:2767: warning: 'intargfunc' is deprecated _imaging.c:2767: warning: initialization from incompatible pointer type _imaging.c:2768: warning: 'intargfunc' is deprecated _imaging.c:2768: warning: initialization from incompatible pointer type _imaging.c:2769: warning: 'intintargfunc' is deprecated _imaging.c:2769: warning: initialization from incompatible pointer type _imaging.c:2770: warning: initialization from incompatible pointer type _imaging.c:2771: warning: initialization from incompatible pointer type _imaging.c:2765: warning: initialization from incompatible pointer type _imaging.c:2767: warning: 'intargfunc' is deprecated _imaging.c:2767: warning: initialization from incompatible pointer type _imaging.c:2768: warning: 'intargfunc' is deprecated _imaging.c:2768: warning: initialization from incompatible pointer type _imaging.c:2769: warning: 'intintargfunc' is deprecated _imaging.c:2769: warning: initialization from incompatible pointer type _imaging.c:2770: warning: initialization from incompatible pointer type _imaging.c:2771: warning: initialization from incompatible pointer type lipo: can't figure out the architecture type of: /var/tmp//ccpJYQST.out error: command 'gcc' failed with exit status 1 benoit-duponts-computer:~/Documents/2?me license/IA/Python/ Imaging-1.1.5 benoitdupont$ ************************** I try to search on the web during three days, but nothing work. Can you help me? I install last version of darwin, and png and jpeg libraries. I can compile and run normally other python programmes, whith eclipse environnement, and I installed python from the cds of my MacBook 10.4.8 Thank you Ben From ronaldoussoren at mac.com Tue Oct 17 07:58:18 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 17 Oct 2006 07:58:18 +0200 Subject: [Pythonmac-SIG] Problem with installation of Imaging (pil) In-Reply-To: <9FC7CD52-E160-4971-A26E-44ED1B96200D@gmail.com> References: <9FC7CD52-E160-4971-A26E-44ED1B96200D@gmail.com> Message-ID: On Oct 16, 2006, at 10:50 PM, Benoit Dupont wrote: > Hello, > > I want to install the Imaging (pil) library on a Mac OS X machine, > but I need your help, cause I have the following problem when I try > to build the lib using python setup.py install Do you have the 10.4 universal SDK installed? If you have that ' / Developer/SDKs/MacOSX10.4u.sdk' exists on you machine. If that directory doesn't exist you should reinstall Xcode and use the 'Customize...' button during installation to select the 10.4u SDK. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061017/4661c0cd/attachment-0001.bin From altern2 at gmail.com Tue Oct 17 18:13:50 2006 From: altern2 at gmail.com (altern) Date: Tue, 17 Oct 2006 18:13:50 +0200 Subject: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? In-Reply-To: <452FE5FD.1000008@macosx.com> References: <452FE5FD.1000008@macosx.com> Message-ID: <4535013E.3060501@gmail.com> there are also some python interface to Supercollider programming language. I think it is http://www.patrickkidd.com/ I havent used it myself so i cannot really say much about it. btw, kevin, how do you find RTCmix? have you tried in other platforms than osx? enrike kevin parks escribi?: > I use RTCmix to do real time audio on a Mac w/ Python > > http://rtcmix.org/ > >> Subject: >> Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? >> From: >> "Bob Ippolito" >> Date: >> Thu, 12 Oct 2006 20:04:25 -0700 >> To: >> "Jeff Rodman" >> >> To: >> "Jeff Rodman" >> CC: >> pythonmac-sig at python.org >> >> >> On 10/12/06, Jeff Rodman wrote: >>> is there a simple, current Python module for controlling the audio >>> in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the >>> moment but Intel is possible), preferably in/out simultaneously? >>> I've visited the main sites and lists, I think, but not found a basic >>> answer. "audioop" in the Standard Library manipulates files but does >>> not play/record, "ossaudiodev" does not seem to be included in the >>> actual Python install although documented in the Standard Library >>> manual, and I can't find a mac-targeted form of the "OSS" module over >>> at 4Front. Just want to play and record short files, (I'll take any >>> format, .raw data or wav is fine) in real time for a acoustic >>> application. >>> >>> I'm sure there's a straightforward answer, I'm just missing it. >>> Thanks for any help! > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From kevin at macosx.com Wed Oct 18 02:47:38 2006 From: kevin at macosx.com (kevin parks) Date: Tue, 17 Oct 2006 20:47:38 -0400 Subject: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? In-Reply-To: <4535013E.3060501@gmail.com> References: <452FE5FD.1000008@macosx.com> <4535013E.3060501@gmail.com> Message-ID: <453579AA.9050102@macosx.com> altern wrote: > there are also some python interface to Supercollider programming > language. I think it is http://www.patrickkidd.com/ That is AWESOME~ wow... Can't wait to try it. I used Supercollider about 10 years ago and did a lot of work in 1.x and 2.x and then just got discouraged as i HATE the syntax with a fiery passion. It is nasty brackets braces parens and semicolons everywhere. Makes purl look clean. Plus it was a moving target patches you wrote under 1.x had to be rewritten in 2.x and then 3.x came out and that was abandoned for Supercollider server or some nonsense. I through my arms up and RAN back to csound and cmix. ... But iffin i get get to those amazing unit generators (SC has great great great sounding filters, oscils, etc. just amazing sounding stuff) without having to put up with macho SC programmers and buttugly and confusing code, I am there. I am pumped for this. I really want to try it. > I havent used it myself so i cannot really say much about it. lemme know if you do. > btw, kevin, how do you find RTCmix? have you tried in other platforms > than osx? I have used in on Linux quite a bit and on OS X. It also runs inside of Max/MSP. RTcmix is great, and has a nice but small following. It is good if you like the precompiled instruments. But it is not easy to make your own, nor is it easy to do any virtual instrument design in it since everything that is precompiled i too high level already... additionally the mixer "bus-config" metaphor for making a signal chain is awkward. But i have done a bunch of stuff in RTcmix and also have had much success reusing Python code inside it. If the python interface for SC is not ready for prime time, i would say give RTcmix a try. It is easy to compile and lots of folks are using it on OS X and Linux. > enrike > > > kevin parks escribi?: >> I use RTCmix to do real time audio on a Mac w/ Python >> >> http://rtcmix.org/ >> >>> Subject: >>> Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? >>> From: >>> "Bob Ippolito" >>> Date: >>> Thu, 12 Oct 2006 20:04:25 -0700 >>> To: >>> "Jeff Rodman" >>> >>> To: >>> "Jeff Rodman" >>> CC: >>> pythonmac-sig at python.org >>> >>> >>> On 10/12/06, Jeff Rodman wrote: >>>> is there a simple, current Python module for controlling the audio >>>> in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the >>>> moment but Intel is possible), preferably in/out simultaneously? >>>> I've visited the main sites and lists, I think, but not found a basic >>>> answer. "audioop" in the Standard Library manipulates files but does >>>> not play/record, "ossaudiodev" does not seem to be included in the >>>> actual Python install although documented in the Standard Library >>>> manual, and I can't find a mac-targeted form of the "OSS" module over >>>> at 4Front. Just want to play and record short files, (I'll take any >>>> format, .raw data or wav is fine) in real time for a acoustic >>>> application. >>>> >>>> I'm sure there's a straightforward answer, I'm just missing it. >>>> Thanks for any help! >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > From altern2 at gmail.com Wed Oct 18 10:51:30 2006 From: altern2 at gmail.com (altern) Date: Wed, 18 Oct 2006 10:51:30 +0200 Subject: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? In-Reply-To: <453579AA.9050102@macosx.com> References: <452FE5FD.1000008@macosx.com> <4535013E.3060501@gmail.com> <453579AA.9050102@macosx.com> Message-ID: <4535EB12.6090806@gmail.com> kevin parks escribi?: > altern wrote: >> there are also some python interface to Supercollider programming >> language. I think it is http://www.patrickkidd.com/ > > That is AWESOME~ wow... Can't wait to try it. I used Supercollider about > 10 years ago and did a lot of work in 1.x > and 2.x and then just got discouraged as i HATE the syntax with a fiery > passion. It is nasty brackets braces parens > and semicolons everywhere. Makes purl look clean. Plus it was a moving > target patches you wrote under 1.x had > to be rewritten in 2.x and then 3.x came out and that was abandoned for > Supercollider server or some nonsense. > I through my arms up and RAN back to csound and cmix. ... But iffin i > get get to those amazing unit generators (SC > has great great great sounding filters, oscils, etc. just amazing > sounding stuff) without having to put up with macho > SC programmers and buttugly and confusing code, I am there. I am pumped > for this. I really want to try it. you read my mind :) I never really used supercollider but everytime i give it a try i get put off by the syntax. I am habituated to python and this makes getting into sc syntax pretty difficult, i always give up. I heard that james mcartney is planning to do version 4 and there might be some big changes again ... oh well ... this is what i heard, maybe it wont be as bad as the changes from sc2 to sc3. But yes the quality of the sound processing is really good and this makes sc a very appealing tool. I have been always dreaming about a sc in python. I discovered www.patrickkidd.com very recently and i was going to explore this together with rtcmix next month and make a decision soon. For me it is also very important that the system is totally cross platform. I have been using puredata up to now, i patch on puredata and then run it as a process in the background with the -nogui flag from python. It works quite ok on all platforms but because i use several externals, it is a bit tricky on linux because they must be compiled. >> I havent used it myself so i cannot really say much about it. > > lemme know if you do. sure. >> btw, kevin, how do you find RTCmix? have you tried in other platforms >> than osx? > I have used in on Linux quite a bit and on OS X. It also runs inside of > Max/MSP. > RTcmix is great, and has a nice but small following. It is good if you > like the precompiled instruments. > But it is not easy to make your own, nor is it easy to do any virtual > instrument design in it > since everything that is precompiled i too high level already... > additionally the mixer "bus-config" > metaphor for making a signal chain is awkward. But i have done a bunch > of stuff in RTcmix > and also have had much success reusing Python code inside it. If the > python interface for SC > is not ready for prime time, i would say give RTcmix a try. It is easy > to compile and lots of folks > are using it on OS X and Linux. ok, thanks for the overview. >> enrike >> >> >> kevin parks escribi?: >>> I use RTCmix to do real time audio on a Mac w/ Python >>> >>> http://rtcmix.org/ >>> >>>> Subject: >>>> Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac? >>>> From: >>>> "Bob Ippolito" >>>> Date: >>>> Thu, 12 Oct 2006 20:04:25 -0700 >>>> To: >>>> "Jeff Rodman" >>>> >>>> To: >>>> "Jeff Rodman" >>>> CC: >>>> pythonmac-sig at python.org >>>> >>>> >>>> On 10/12/06, Jeff Rodman wrote: >>>>> is there a simple, current Python module for controlling the audio >>>>> in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the >>>>> moment but Intel is possible), preferably in/out simultaneously? >>>>> I've visited the main sites and lists, I think, but not found a basic >>>>> answer. "audioop" in the Standard Library manipulates files but does >>>>> not play/record, "ossaudiodev" does not seem to be included in the >>>>> actual Python install although documented in the Standard Library >>>>> manual, and I can't find a mac-targeted form of the "OSS" module over >>>>> at 4Front. Just want to play and record short files, (I'll take any >>>>> format, .raw data or wav is fine) in real time for a acoustic >>>>> application. >>>>> >>>>> I'm sure there's a straightforward answer, I'm just missing it. >>>>> Thanks for any help! >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>> >> > > From emoy at apple.com Wed Oct 18 02:14:34 2006 From: emoy at apple.com (Edward Moy) Date: Tue, 17 Oct 2006 17:14:34 -0700 Subject: [Pythonmac-SIG] Terminal to not have an application signature in Leopard Message-ID: <06AA5B38-9F6A-43FF-A1CA-4B686719D481@apple.com> Hi, all, I'm the maintainer of python at Apple. There is a plan to remove Terminal's application signature 'trmx' in Leopard, to avoid some exploits that the application signature allows. Apple Events can use the bundle ID (typeApplicationBundleID) instead, though this only works on 10.3 and later. Unfortunately, the Apple Event modules in python don't define typeApplicationBundleID, so that isn't being used. And while changes to Lib/plat-mac/terminalcommand.py and Mac/OSX/PythonLauncher/ doscript.m seem straightforward enough, it looks like application signatures are assumed by other modules. Anyone have any comments/ideas about this? --------------------------------------------------------------- Edward Moy Apple From hengist.podd at virgin.net Wed Oct 18 14:40:52 2006 From: hengist.podd at virgin.net (has) Date: Wed, 18 Oct 2006 13:40:52 +0100 Subject: [Pythonmac-SIG] Terminal to not have an application signature in Leopard In-Reply-To: References: Message-ID: <7E9CF14F-B26D-423F-B1D4-56FC5DF9CBB0@virgin.net> Edward Moy wrote: > Hi, all, I'm the maintainer of python at Apple. There is a plan to > remove Terminal's application signature 'trmx' in Leopard, to avoid > some exploits that the application signature allows. Apple Events > can use the bundle ID (typeApplicationBundleID) instead, though > this only works on 10.3 and later. > > Unfortunately, the Apple Event modules in python don't define > typeApplicationBundleID, so that isn't being used. And while > changes to Lib/plat-mac/terminalcommand.py and Mac/OSX/ > PythonLauncher/doscript.m seem straightforward enough, it looks > like application signatures are assumed by other modules. > > Anyone have any comments/ideas about this? Almost all of the high-level AE-related modules can be ignored as they are completely obsolete; additionally, some are broken on Tiger and most (all?) on i386. IIRC, the obsolete modules are: aepack aetools aetypes gensuitemodule MiniAEFrame findertools AFAIK there are no plans to fix or maintain any of these as they've all been superceded by the appscript package. (Appscript uses AEAddressDescs of typeProcessSerialNumber and typeApplicationURL, btw.) In addition, the argvemulator module was broken on i386 but this has been fixed in 2.5. I'm not sure if that patch has been applied to 2.4 yet though; better ask Ronald. I'm not sure offhand what the position is on Framework and W; probably also abandoned as they're obsolete and newer alternatives already exist. Several other modules are also a bit past it. There were moves afoot to go through plat-mac and flag all the obsolete/ broken stuff as deprecated in the 2.5 documentation, but unfortunately it didn't get done in time to make the cut. See the 'Fixing the documentation' thread from April. HTH has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From kw at kevin-walzer.com Wed Oct 18 15:20:45 2006 From: kw at kevin-walzer.com (Kevin Walzer) Date: Wed, 18 Oct 2006 09:20:45 -0400 Subject: [Pythonmac-SIG] Terminal to not have an application signature in Leopard In-Reply-To: <7E9CF14F-B26D-423F-B1D4-56FC5DF9CBB0@virgin.net> References: <7E9CF14F-B26D-423F-B1D4-56FC5DF9CBB0@virgin.net> Message-ID: <45362A2D.2010707@kevin-walzer.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 has wrote: > > I'm not sure offhand what the position is on Framework and W; > probably also abandoned as they're obsolete and newer alternatives > already exist. I'm pretty sure these depend on the WASTE library, which is obsolete. The old PythonIDE and PackageManager were built using these frameworks IIRC. I hope EasyDialogs remains in Python, however (I have one application that depends on it). - -- Kevin Walzer Poetic Code http://www.kevin-walzer.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFNiosrTC5hIgjqTMRAjWwAJ0boQsj/OyfEy9o09KHNwKmybPJJACfaM1q K12NwThcUUZ1qzPlQIg8TG8= =J3m7 -----END PGP SIGNATURE----- From hengist.podd at virgin.net Wed Oct 18 17:51:34 2006 From: hengist.podd at virgin.net (has) Date: Wed, 18 Oct 2006 16:51:34 +0100 Subject: [Pythonmac-SIG] Terminal to not have an application signature in Leopard In-Reply-To: <45362A2D.2010707@kevin-walzer.com> References: <7E9CF14F-B26D-423F-B1D4-56FC5DF9CBB0@virgin.net> <45362A2D.2010707@kevin-walzer.com> Message-ID: On 18 Oct 2006, at 14:20, Kevin Walzer wrote: > I hope EasyDialogs remains in Python, however (I have one application > that depends on it). A built-in module for basic message and file dialogs is useful. The current ED implementation needs work, however, as it doesn't fully support long strings and Unicode. This is a discussion for another thread though. has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From malkarouri at yahoo.co.uk Thu Oct 19 04:27:25 2006 From: malkarouri at yahoo.co.uk (Muhammad Alkarouri) Date: Thu, 19 Oct 2006 03:27:25 +0100 (BST) Subject: [Pythonmac-SIG] xcode problems Message-ID: <20061019022725.96902.qmail@web27906.mail.ukl.yahoo.com> Hi everyone, I am a newbie in the Mac world, having bought my first Mac Mini a couple of days ago. I promptly went on to find out about Python programming there. I installed Python 2.5 from python.org, so I have it besides 2.3. I also installed xcode 2.4. That is on OS X 10.4.8. Then I tried to follow "Using PyObjC for Developing Cocoa Applications with Python". Here is where small problems crop up. I would like to know the right solution about (some of) these problems. - Using xcode I followed the tutorial. I wasn't able to build. I get build failed with No module named py2app. I understand this comes with PyObjC so I tried to install that again. The installer for PyObjC 1.3.7 from http://prdownloads.sourceforge.net/pyobjc/pyobjc-1.3.7-py2.3-macosx10.4.zip?download gives me an error on import along the lines of unable to import due to "mach-o, but wrong architecture". I tried PyObjC 1.4 from source but it wasn't able to install due to a permission error. I didn't try to investigate that, especially as there is no binary for python 2.3 so I figured that something was amiss. Anyway, I tried to use Python 2.5. - To use Python 2.5 I installed PyObjC 1.4. The installation went smoothly. I had to modify setup.py to use /usr/local/bin/python following a hint somewhere the internet. Now "Build and Go" wasn't working (why?). Following another hint I mad a custom executable like "/usr/bin/env PyAverager.app/Contents/MacOS/PyAverager". This is now working. - The next problem is in the code itself. When trying to run the application PyAverager I get an error: PyAverager[3377] Unknown class `Averager' in nib file, using `NSObject' instead ... NSUnknownKeyException - [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key numbersInput So the nib (whatever that is) cannot find the class Averager. By going to the source of PyAverager I noticed that the Averager module is imported indirectly, as in: for pythonModule in info[u'Modules']: __import__(pythonModule) If I do "import Averager" or "__import__('Averager')" after these lines the application runs successfully. So I guess that info[u'Modules'] doesn't contain 'Averager'. So the important questions for me now are: - Is there anyway to automate the change of setup.py to use /usr/local/bin/python at each new project, rather than doing it manually? - Shouldn't "Build and Go" be working automatically? Or is there anyway to automate the creation of the custom executable for each new python project? - Why doesn't Averager in the example get imported automatically? Probably I did something wrong here, but I don't know what. These are my problems with Python 2.5. I guess I am not going to use Python 2.3 anyway, so it would be nice but not essential to know about the solution to my problems with it. Sorry for the long e-mail, but I figured that some of my problems might be known issues and/or bugs as well, so I better document these for others. Thanks a lot, k Send instant messages to your online friends http://uk.messenger.yahoo.com From ronaldoussoren at mac.com Thu Oct 19 15:26:03 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 19 Oct 2006 15:26:03 +0200 Subject: [Pythonmac-SIG] Pysqlite build problem In-Reply-To: <17714.43906.841444.115520@montanaro.dyndns.org> References: <17714.43906.841444.115520@montanaro.dyndns.org> Message-ID: <0D299C44-103A-4C90-88F7-704EB01E2EF9@mac.com> On Oct 15, 2006, at 11:43 PM, skip at pobox.com wrote: > I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8, gcc-4.0, > Python 2.4.4c1). Sqlite built and installed into /usr/local just > fine. I > adjusted setup.cfg appropriately: > > [build_ext] > define= > include_dirs=/usr/local/include:/usr/include > library_dirs=/usr/local/lib:/usr/lib > libraries=sqlite3 > > and tried building: [... snip build trac] > stdarg.h: No such file or directory/usr/include/stdarg.h:4:25: > error: stdarg.h: No such file or directory > lipo: can't figure out the architecture type of: /var/tmp// > ccofOA40.out > error: command 'gcc' failed with exit status 1 > > It seems the compile is failing on the > > #include_next > > line in /usr/include/stdarg.h. Running find against /usr indicates > that > there are several 4.0 versions of stdarg.h: > > /usr/include/gcc/darwin/3.3/stdarg.h > /usr/include/stdarg.h > /usr/lib/gcc/i686-apple-darwin8/4.0.0/include/stdarg.h > /usr/lib/gcc/i686-apple-darwin8/4.0.0/install-tools/include/ > stdarg.h > /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/stdarg.h > /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/install-tools/include/ > stdarg.h > > I tried reinstalling XCode 2 from the install disk, but I still > don't see a > gcc 4.0 version of stdarg.h. /usr/bin/gcc is a symlink to /usr/bin/ > gcc-4.0. > Software Update says my machine is up-to-date. > > I must be missing something, but what? The 10.4u SDK. You have to install the MacOSX10.4u SDK. The easiest way to do that is to reinstall Xcode and make sure you select 10.4 universal SDK on the 'customize...' page. Ronald > > Thx, > > Skip > _______________________________________________ > 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: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061019/16d98af1/attachment.bin From ronaldoussoren at mac.com Thu Oct 19 15:40:30 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 19 Oct 2006 15:40:30 +0200 Subject: [Pythonmac-SIG] xcode problems In-Reply-To: <20061019022725.96902.qmail@web27906.mail.ukl.yahoo.com> References: <20061019022725.96902.qmail@web27906.mail.ukl.yahoo.com> Message-ID: <44EA24DC-A2E7-4379-9A5E-DE158C5F6BD2@mac.com> On Oct 19, 2006, at 4:27 AM, Muhammad Alkarouri wrote: > Hi everyone, > > I am a newbie in the Mac world, having bought my first Mac Mini a > couple of > days ago. I promptly went on to find out about Python programming > there. > > I installed Python 2.5 from python.org, so I have it besides 2.3. I > also > installed xcode 2.4. That is on OS X 10.4.8. Then I tried to follow > "Using > PyObjC for Developing Cocoa Applications with Python". Here is > where small > problems crop up. I would like to know the right solution about > (some of) these > problems. > > - Using xcode I followed the tutorial. I wasn't able to build. I > get build > failed with No module named py2app. I understand this comes with > PyObjC so I > tried to install that again. The installer for PyObjC 1.3.7 from > http://prdownloads.sourceforge.net/pyobjc/pyobjc-1.3.7-py2.3- > macosx10.4.zip?download > gives me an error on import along the lines of unable to import due > to "mach-o, > but wrong architecture". I tried PyObjC 1.4 from source but it > wasn't able to > install due to a permission error. I didn't try to investigate > that, especially > as there is no binary for python 2.3 so I figured that something > was amiss. > Anyway, I tried to use Python 2.5. There currently is no proper binary installer for PyObjC. I hope to have some time soon to work on that, but don't hold your breath. > > - To use Python 2.5 I installed PyObjC 1.4. The installation went > smoothly. I > had to modify setup.py to use /usr/local/bin/python following a > hint somewhere > the internet. Now "Build and Go" wasn't working (why?). Following > another hint > I mad a custom executable like "/usr/bin/env > PyAverager.app/Contents/MacOS/PyAverager". This is now working. I'd drop Xcode unless you already know it, Xcode can be used as a python editor but is really heavy-weight for what it offers to Python programmers (it's great for ObjC programming, but most of Xcode is closed for Python programmers). > > - The next problem is in the code itself. When trying to run the > application > PyAverager I get an error: > PyAverager[3377] Unknown class `Averager' in nib file, using > `NSObject' instead Where did you find this example? It isn't part of the PyObjC distribution, so I can't help you here without further information. > ... > NSUnknownKeyException - [ > valueForUndefinedKey:]: this > class is not key value coding-compliant for the key numbersInput > > So the nib (whatever that is) cannot find the class Averager. A nib file is the output format of Interface Builder, which is the GUI designer for OSX. It is basically a pickled object graph for a GUI. > > So the important questions for me now are: > - Is there anyway to automate the change of setup.py to use > /usr/local/bin/python at each new project, rather than doing it > manually? The 2.4.3, 2.4.4 and 2.5 installers for python should ensure that the right directory (which isn't /usr/local/bin b.t.w.) is on $PATH. What is your shell environment? I assume you use the default shell (bash), do you have any custom startup files (.profile, .bashrc, .bash_login, ...)? > - Shouldn't "Build and Go" be working automatically? Or is there > anyway to > automate the creation of the custom executable for each new python > project? It would be nice if that button worked, but I don't have time to fix this. Making changes to the xcode templates is no fun, even if you do know how to do so which I don't. PyObjC is a bit in flux at the moment, we've transitioned to setuptools but never got around to completely finishing that transition, which explains the lack of binary installers. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061019/a90f029c/attachment.bin From malkarouri at yahoo.co.uk Fri Oct 20 08:29:41 2006 From: malkarouri at yahoo.co.uk (Muhammad Alkarouri) Date: Fri, 20 Oct 2006 07:29:41 +0100 (BST) Subject: [Pythonmac-SIG] xcode problems Message-ID: <20061020062941.31084.qmail@web27901.mail.ukl.yahoo.com> --- Ronald Oussoren wrote: ... > I'd drop Xcode unless you already know it, Xcode can be used as a > python editor but is really heavy-weight for what it offers to Python > programmers (it's great for ObjC programming, but most of Xcode is > closed for Python programmers). Noted. I am at the moment trying TextWrangler for editing Python. May be I will revert to Idle. [rant] It is a shame, though. Xcode is a great python environment, as far as my experience goes. It would be far more useful if it were open source. [/rant] > > - The next problem is in the code itself. When trying to run the > > application > > PyAverager I get an error: > > PyAverager[3377] Unknown class `Averager' in nib file, using > > `NSObject' instead > > Where did you find this example? It isn't part of the PyObjC > distribution, so I can't help you here without further information. Yes. This is the example from the Apple web site (http://developer.apple.com/cocoa/pyobjc.html). I did find the error, though, and it is an xcode peculiarity/bug. Namely, when you create a new Python class file in xcode it doesn't get added to "Classes" in the xcode project. You have to drag it there manually. > > - Is there anyway to automate the change of setup.py to use > > /usr/local/bin/python at each new project, rather than doing it > > manually? > > The 2.4.3, 2.4.4 and 2.5 installers for python should ensure that the > right directory (which isn't /usr/local/bin b.t.w.) is on $PATH. What > is your shell environment? I assume you use the default shell (bash), > do you have any custom startup files > (.profile, .bashrc, .bash_login, ...)? I have installed the Python 2.5 for OS X from python.org. And I have this now ================== muhammad-alkarouris-computer:~ malkarouri$ which python /Library/Frameworks/Python.framework/Versions/Current/bin/python muhammad-alkarouris-computer:~ malkarouri$ ls -l /usr/local/bin/python lrwxr-xr-x 1 root wheel 68 Oct 15 06:13 /usr/local/bin/python -> ../../../Library/Frameworks/Python.framework/Versions/2.5/bin/python muhammad-alkarouris-computer:~ malkarouri$ echo $PATH /Library/Frameworks/Python.framework/Versions/Current/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/teTeX/bin/i386-apple-darwin-current muhammad-alkarouris-computer:~ malkarouri$ cat .bash_profile # Setting PATH for MacPython 2.5 # The orginal version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" export PATH muhammad-alkarouris-computer:~ malkarouri$ ================== So, the installer did install /usr/local/bin/python. Through .bash_profile, python2.5 is the default for my shell, while python2.3 is the default for everything else. This is fine by me. I assume that is the right approach. Or is there another installer? > It would be nice if that button worked, but I don't have time to fix > this. Making changes to the xcode templates is no fun, even if you do > know how to do so which I don't. > > PyObjC is a bit in flux at the moment, we've transitioned to > setuptools but never got around to completely finishing that > transition, which explains the lack of binary installers. Keep up the good work. For now, PyObjC 1.4 source installation for both Python 2.5 and Python 2.3 are working fine. Thanks again, k Send instant messages to your online friends http://uk.messenger.yahoo.com From ronaldoussoren at mac.com Fri Oct 20 09:26:17 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 20 Oct 2006 09:26:17 +0200 Subject: [Pythonmac-SIG] xcode problems In-Reply-To: <20061020062941.31084.qmail@web27901.mail.ukl.yahoo.com> References: <20061020062941.31084.qmail@web27901.mail.ukl.yahoo.com> Message-ID: <4612968.1161329177860.JavaMail.ronaldoussoren@mac.com> On Friday, October 20, 2006, at 08:29AM, Muhammad Alkarouri wrote: >--- Ronald Oussoren wrote: >... >> I'd drop Xcode unless you already know it, Xcode can be used as a >> python editor but is really heavy-weight for what it offers to Python >> programmers (it's great for ObjC programming, but most of Xcode is >> closed for Python programmers). > >Noted. I am at the moment trying TextWrangler for editing Python. May be I will >revert to Idle. >[rant] >It is a shame, though. Xcode is a great python environment, as far as my >experience goes. It would be far more useful if it were open source. >[/rant] Open Source is not relevant for that, having a public API is. I (and other people) have asked for this, but this isn't a very high priority for Apple (AFAIK). What I'd like to see in a future version of Xcode is a public plugin API (outright Python support would also be nice of course) and an tool for creating/maintaining project templates. > >> > - The next problem is in the code itself. When trying to run the >> > application >> > PyAverager I get an error: >> > PyAverager[3377] Unknown class `Averager' in nib file, using >> > `NSObject' instead >> >> Where did you find this example? It isn't part of the PyObjC >> distribution, so I can't help you here without further information. > >Yes. This is the example from the Apple web site >(http://developer.apple.com/cocoa/pyobjc.html). >I did find the error, though, and it is an xcode peculiarity/bug. Namely, when >you create a new Python class file in xcode it doesn't get added to "Classes" >in the xcode project. You have to drag it there manually. That's the lack of Python support in Xcode again. > >> > - Is there anyway to automate the change of setup.py to use >> > /usr/local/bin/python at each new project, rather than doing it >> > manually? >> >> The 2.4.3, 2.4.4 and 2.5 installers for python should ensure that the >> right directory (which isn't /usr/local/bin b.t.w.) is on $PATH. What >> is your shell environment? I assume you use the default shell (bash), >> do you have any custom startup files >> (.profile, .bashrc, .bash_login, ...)? > >I have installed the Python 2.5 for OS X from python.org. And I have this now > >================== >muhammad-alkarouris-computer:~ malkarouri$ which python >/Library/Frameworks/Python.framework/Versions/Current/bin/python >muhammad-alkarouris-computer:~ malkarouri$ ls -l /usr/local/bin/python >lrwxr-xr-x 1 root wheel 68 Oct 15 06:13 /usr/local/bin/python -> >../../../Library/Frameworks/Python.framework/Versions/2.5/bin/python >muhammad-alkarouris-computer:~ malkarouri$ echo $PATH >/Library/Frameworks/Python.framework/Versions/Current/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/teTeX/bin/i386-apple-darwin-current >muhammad-alkarouris-computer:~ malkarouri$ cat .bash_profile > ># Setting PATH for MacPython 2.5 ># The orginal version is saved in .bash_profile.pysave >PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" >export PATH >muhammad-alkarouris-computer:~ malkarouri$ >================== > >So, the installer did install /usr/local/bin/python. Through .bash_profile, >python2.5 is the default for my shell, while python2.3 is the default for >everything else. This is fine by me. I assume that is the right approach. Or is >there another installer? Ah, now that you mention it: Xcode doesn't look at the shell environment, and that is the only thing that is patched. If you know you're way around Xcode this is fixable: the templates currrently run '/usr/bin/env python', that should be changed to '/Library/Frameworks/Versions/Current/bin/python' (or .../Versions/2.5/bin/python to ensure you get python 2.5). > >> It would be nice if that button worked, but I don't have time to fix >> this. Making changes to the xcode templates is no fun, even if you do >> know how to do so which I don't. >> >> PyObjC is a bit in flux at the moment, we've transitioned to >> setuptools but never got around to completely finishing that >> transition, which explains the lack of binary installers. > >Keep up the good work. For now, PyObjC 1.4 source installation for both Python >2.5 and Python 2.3 are working fine. Ronald From vip at avatar.com.au Fri Oct 20 10:11:31 2006 From: vip at avatar.com.au (David Worrall) Date: Fri, 20 Oct 2006 18:11:31 +1000 Subject: [Pythonmac-SIG] xcode problems In-Reply-To: <4612968.1161329177860.JavaMail.ronaldoussoren@mac.com> References: <20061020062941.31084.qmail@web27901.mail.ukl.yahoo.com> <4612968.1161329177860.JavaMail.ronaldoussoren@mac.com> Message-ID: <11D316F0-06C0-4379-8FD2-107390BC3D38@avatar.com.au> On 20/10/2006, at 5:26 PM, Ronald Oussoren wrote: > > On Friday, October 20, 2006, at 08:29AM, Muhammad Alkarouri > wrote: > >> --- Ronald Oussoren wrote: >> ... >>> I'd drop Xcode unless you already know it, Xcode can be used as a >>> python editor but is really heavy-weight for what it offers to >>> Python >>> programmers (it's great for ObjC programming, but most of Xcode is >>> closed for Python programmers). >> >> Noted. I am at the moment trying TextWrangler for editing Python. >> May be I will >> revert to Idle. >> [rant] >> It is a shame, though. Xcode is a great python environment, as far >> as my >> experience goes. It would be far more useful if it were open source. >> [/rant] > .... I use TextWrangler as a general text processor, occasionally for quick code. On my OSX machines I find scrIDE (http://projects.gandreas.com/ scride/) more stable than IDLE. It's especially good for wxPython stuff. David _______________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au From zabaione at uk2.net Fri Oct 20 19:12:36 2006 From: zabaione at uk2.net (Martin Dunschen) Date: Fri, 20 Oct 2006 18:12:36 +0100 (BST) Subject: [Pythonmac-SIG] py2app and Pyhon Imaging Library PIL Message-ID: <50146.138.253.180.183.1161364356.squirrel@maxproxy8.uk2net.com> I had the following problem with a python script that imports the Image module: ... import Image ... When I build an app with py2app I got an error that Image can't be found. I tracked the problem down to the file MyApp.app/Contents/Resources/__boot__.py which imports it. In there changed the line import Image to from PIL import Image and also how I import Image in my own script. It works. But I don't understand why the original version does not work? I understand that __boot__.py in created, but is there a template I can change? Is that the right way to fix this problem? Thanks Martin From bob at redivi.com Fri Oct 20 20:31:35 2006 From: bob at redivi.com (Bob Ippolito) Date: Fri, 20 Oct 2006 11:31:35 -0700 Subject: [Pythonmac-SIG] py2app and Pyhon Imaging Library PIL In-Reply-To: <50146.138.253.180.183.1161364356.squirrel@maxproxy8.uk2net.com> References: <50146.138.253.180.183.1161364356.squirrel@maxproxy8.uk2net.com> Message-ID: <6a36e7290610201131s72487d7ckc225600167999632@mail.gmail.com> On 10/20/06, Martin Dunschen wrote: > I had the following problem with a python script that imports the Image > module: > > ... > import Image > ... > > > When I build an app with py2app I got an error that Image can't be found. > I tracked the problem down to the file > MyApp.app/Contents/Resources/__boot__.py > which imports it. > > In there changed the line > import Image > to > from PIL import Image > > and also how I import Image in my own script. It works. > > But I don't understand why the original version does not work? The canonical way to import PIL is "import Image" not "from PIL import Image". You should be using "import Image" in your script. If you use "import Image" then it should work in py2app. It works here anyway, if it still doesn't work you're going to need to provide enough information to reproduce the problem. > I understand that __boot__.py in created, but is there a template I can > change? Is that the right way to fix this problem? __boot__ is generated from the recipes and prescripts. This line comes from the PIL recipe. No, that's not the right way to fix it. I don't think it's broken, anyway. -bob From chris.van.bael at gmail.com Fri Oct 20 23:39:21 2006 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Fri, 20 Oct 2006 23:39:21 +0200 Subject: [Pythonmac-SIG] Problems on using py2app: how to add extra files? Message-ID: <5465ee790610201439k4b228190q2050b51d3673ea04@mail.gmail.com> Hi all, I'm the window maintainer of Childsplay(childsplay.sourceforge.net), and wanted to port it also to Mac. But I got a problem with py2app. So my source directory looks a bit like this: (simplified) ConfParser.py childsplay.py setup.py In a terminal "python childsplay.py" runs just fine. (childsplay is btw a pygame app) The setup.py is the following: APP = ['childsplay.py'] DATA_FILES = ['Confparser.py'] OPTIONS = {'argv_emulation':True} setup( app=APP, data_files=DATA_FILES, option={'py2app':OPTIONS}, setup_requires=['py2app'], ) So standard generated setup.py, only ConfParser.py is added. Now when I make the app in alias mode, it works fine. However when I make it in normal mode, it complains that it cannot import the ConfParser.py file from childsplay.app/Contents/Resources. But when I go see into the app file/directory, it is there ?! Probably something very simple I'm doing wrong, but I really have no idea... Thanks for the help, Chris From bob at redivi.com Sat Oct 21 02:41:34 2006 From: bob at redivi.com (Bob Ippolito) Date: Fri, 20 Oct 2006 17:41:34 -0700 Subject: [Pythonmac-SIG] Problems on using py2app: how to add extra files? In-Reply-To: <5465ee790610201439k4b228190q2050b51d3673ea04@mail.gmail.com> References: <5465ee790610201439k4b228190q2050b51d3673ea04@mail.gmail.com> Message-ID: <6a36e7290610201741u4eff2a13l214806c6b7160af6@mail.gmail.com> On 10/20/06, Chris Van Bael wrote: > Hi all, > > I'm the window maintainer of Childsplay(childsplay.sourceforge.net), > and wanted to port it also to Mac. But I got a problem with py2app. > > So my source directory looks a bit like this: (simplified) > ConfParser.py > childsplay.py > setup.py > > In a terminal "python childsplay.py" runs just fine. (childsplay is > btw a pygame app) > The setup.py is the following: > APP = ['childsplay.py'] > DATA_FILES = ['Confparser.py'] > OPTIONS = {'argv_emulation':True} > > setup( > app=APP, > data_files=DATA_FILES, > option={'py2app':OPTIONS}, > setup_requires=['py2app'], > ) > > So standard generated setup.py, only ConfParser.py is added. > > Now when I make the app in alias mode, it works fine. > However when I make it in normal mode, it complains that it cannot > import the ConfParser.py file from childsplay.app/Contents/Resources. > But when I go see into the app file/directory, it is there ?! > > Probably something very simple I'm doing wrong, but I really have no idea... You got the case wrong for ConfParser.py If your code has an "import ConfParser" statement you don't need to do this though, it will automatically get picked up. -bob From hengist.podd at virgin.net Sat Oct 21 22:24:31 2006 From: hengist.podd at virgin.net (has) Date: Sat, 21 Oct 2006 21:24:31 +0100 Subject: [Pythonmac-SIG] how to avoid GUI launcher launching? Message-ID: Hi all, I'd really like to find a way to stop that annoying GUI launcher starting up every time folk use appscript in Python 2.4+. It appears that calls to the GetNextProcess and LaunchApplication functions in aem.send.PSN are what's triggering it, but it's neither needed (appscript works fine under python2.3 and ruby without it) nor welcome (it's intrusive and slows down launching times). What exactly is the hair-trigger on that thing, and any ideas how I can suppress it/route around it? Many thanks, has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From ronaldoussoren at mac.com Sun Oct 22 10:01:41 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 22 Oct 2006 10:01:41 +0200 Subject: [Pythonmac-SIG] how to avoid GUI launcher launching? In-Reply-To: References: Message-ID: On Oct 21, 2006, at 10:24 PM, has wrote: > Hi all, > > I'd really like to find a way to stop that annoying GUI launcher > starting up every time folk use appscript in Python 2.4+. It appears > that calls to the GetNextProcess and LaunchApplication functions in > aem.send.PSN are what's triggering it, but it's neither needed > (appscript works fine under python2.3 and ruby without it) nor > welcome (it's intrusive and slows down launching times). What exactly > is the hair-trigger on that thing, and any ideas how I can suppress > it/route around it? You're using an API that causes the bouncing from an program in an application bundle (the embedded Python.app). Appearently some API's transform a process from a normal process to a GUI process if the program's binary is inside an application bundle. Maybe this can be fixed by making Python.app a faceless application, although we should then thoroughly test if pythonw keeps working. If it is we can fix this for python2.5 but not for 2.4, 2.4.4 was just released and is almost certainly the last release in the 2.4.x branch. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061022/cb79b2a7/attachment.bin From hengist.podd at virgin.net Sun Oct 22 12:02:59 2006 From: hengist.podd at virgin.net (has) Date: Sun, 22 Oct 2006 11:02:59 +0100 Subject: [Pythonmac-SIG] how to avoid GUI launcher launching? In-Reply-To: References: Message-ID: On 22 Oct 2006, at 09:01, Ronald Oussoren wrote: >> I'd really like to find a way to stop that annoying GUI launcher >> starting up every time folk use appscript in Python 2.4+. [...] >> What exactly >> is the hair-trigger on that thing, and any ideas how I can suppress >> it/route around it? > > You're using an API that causes the bouncing from an program in an > application bundle (the embedded Python.app). Appearently some > API's transform a process from a normal process to a GUI process if > the program's binary is inside an application bundle. System APIs, yes? Do you know if there's a way to find out which ones do and which ones don't? I'm currently using three Process Manager functions: GetNextProcess, GetProcessBundleLocation and LaunchApplication. However, it should be possible to use typeKernelProcessID in place of typeProcessSerialNumber, so if anyone knows of PID-based equivalents that don't trigger the transformation then I can modify appscript to use those. > Maybe this can be fixed by making Python.app a faceless > application, although we should then thoroughly test if pythonw > keeps working. That might present a problem for any scripts that do need Python.app to behave like a normal app, e.g. if it needs to show a menubar, or users need to switch between processes. I don't know if there's any way to make the facelessness bit conditional though, and even if there was existing scripts would need to be updated to take advantage of it. Reverting to the old python vs. pythonw split won't appeal to anyone either (there's a reason they were merged, after all). I think routing around the problem APIs in appscript is the best and safest solution at this point. It's not an area I'm familiar with though, so any advice will be much appreciated. Many thanks, has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From lanceboyle at qwest.net Mon Oct 23 04:10:55 2006 From: lanceboyle at qwest.net (Jerry) Date: Sun, 22 Oct 2006 19:10:55 -0700 Subject: [Pythonmac-SIG] xcode problems In-Reply-To: <4612968.1161329177860.JavaMail.ronaldoussoren@mac.com> References: <20061020062941.31084.qmail@web27901.mail.ukl.yahoo.com> <4612968.1161329177860.JavaMail.ronaldoussoren@mac.com> Message-ID: <9B2EC04D-E56F-4F1C-AB7C-329019BA14AB@qwest.net> On Oct 20, 2006, at 12:26 AM, Ronald Oussoren wrote: >> >> Noted. I am at the moment trying TextWrangler for editing Python. >> May be I will >> revert to Idle. >> [rant] >> It is a shame, though. Xcode is a great python environment, as far >> as my >> experience goes. It would be far more useful if it were open source. >> [/rant] > > Open Source is not relevant for that, having a public API is. I > (and other people) have asked for this, but this isn't a very high > priority for Apple (AFAIK). > > What I'd like to see in a future version of Xcode is a public > plugin API (outright Python support would also be nice of course) > and an tool for creating/maintaining project templates. I wonder where TextMate is headed. It has the potential to get a lot of these things right. The developer has been rather quiet lately and I believe he has said that he is working on a major revision. The bad part is that I _think_ it is a one-person development "team" and thus has the associated problem with trucks. (That is, what if he gets hit by one.) Jerry From anand at soe.ucsc.edu Tue Oct 24 18:04:57 2006 From: anand at soe.ucsc.edu (Anand Patil) Date: Tue, 24 Oct 2006 09:04:57 -0700 Subject: [Pythonmac-SIG] Problems with universal Python 2.4.3's distutils Message-ID: <453E39A9.2000603@cse.ucsc.edu> Hi all, I'm running Universal Python 2.4.3 on my Powerbook G4 under OS X 10.4.8. I'm trying to install a package called mpi4py (MPI for Python), and Universal Python's distutils seem to be causing some trouble. It looks like the -arch i386 argument is confusing the linker somehow because my computer is a PPC. Also, I'm not sure what the library rt is, but there doesn't seem to be such a thing on my computer (though I've installed the latest version of Xcode). Does anyone know how I can resolve this? Sorry if this is OT, I didn't know where else to post. Thanks for any advice, Anand Patil Anand-Patils-Computer:~/Desktop/mpi4py-0.4.0rc1 anand$ python setup.py build --mpi=mpich2 running build running build_py running build_ext MPI configuration: from section 'mpich2' in file/s 'mpi.cfg' MPI C compiler: /usr/local/mpich2/bin/mpicc MPI C++ compiler: /usr/local/mpich2/bin/mpicxx building 'mpi4py.libmpi' extension /usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -O3 -I/usr/local/mpich2/include -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c mpi/ext/libmpi.c -o build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o /usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o -L/usr/local/mpich2/lib -L/usr/local/mpich2 -lmpich -lrt -o build/lib.macosx-10.4-fat-2.4/mpi4py/libmpi.so /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /usr/local/mpich2/lib/libmpich.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: can't locate file for: -lrt collect2: ld returned 1 exit status /usr/bin/ld: for architecture ppc /usr/bin/ld: can't locate file for: -lrt collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccFhLQNI.out (No such file or directory) error: command '/usr/local/mpich2/bin/mpicc' failed with exit status 1 From jrus at hcs.harvard.edu Tue Oct 24 21:39:07 2006 From: jrus at hcs.harvard.edu (Jacob Rus) Date: Tue, 24 Oct 2006 15:39:07 -0400 Subject: [Pythonmac-SIG] xcode problems In-Reply-To: <4612968.1161329177860.JavaMail.ronaldoussoren@mac.com> References: <20061020062941.31084.qmail@web27901.mail.ukl.yahoo.com> <4612968.1161329177860.JavaMail.ronaldoussoren@mac.com> Message-ID: <453E6BDB.8060309@hcs.harvard.edu> Ronald Oussoren wrote: > What I'd like to see in a future version of Xcode is > a public plugin API (outright Python support would also > be nice of course) and an tool for creating/maintaining > project templates. I'd be happy with just an API for modifying their project files, as currently the format changes every few months in backwards-incompatible ways, and all the tools that hack parsing of it end up stuffed. The suggestion of Apple engineers is to just use AppleScript, as if that is a workable solution... (requires XC to be open, is damn slow, etc.) But yes, it would be nice if, for instance, names in the templates could be changed without looking a bazillion places. From ronaldoussoren at mac.com Tue Oct 24 22:01:55 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 24 Oct 2006 22:01:55 +0200 Subject: [Pythonmac-SIG] Problems with universal Python 2.4.3's distutils In-Reply-To: <453E39A9.2000603@cse.ucsc.edu> References: <453E39A9.2000603@cse.ucsc.edu> Message-ID: <10082030.1161720115337.JavaMail.ronaldoussoren@mac.com> On Tuesday, October 24, 2006, at 06:09PM, Anand Patil wrote: >Hi all, > >I'm running Universal Python 2.4.3 on my Powerbook G4 under OS X 10.4.8. >I'm trying to install a package called mpi4py (MPI for Python), and >Universal Python's distutils seem to be causing some trouble. It looks >like the -arch i386 argument is confusing the linker somehow because my >computer is a PPC. Also, I'm not sure what the library rt is, but there >doesn't seem to be such a thing on my computer (though I've installed >the latest version of Xcode). Does anyone know how I can resolve this? >Sorry if this is OT, I didn't know where else to post. > >Thanks for any advice, >Anand Patil > >Anand-Patils-Computer:~/Desktop/mpi4py-0.4.0rc1 anand$ python setup.py >build --mpi=mpich2 >running build >running build_py >running build_ext >MPI configuration: from section 'mpich2' in file/s 'mpi.cfg' >MPI C compiler: /usr/local/mpich2/bin/mpicc >MPI C++ compiler: /usr/local/mpich2/bin/mpicxx >building 'mpi4py.libmpi' extension >/usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot >/Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double >-no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -O3 >-I/usr/local/mpich2/include >-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c >mpi/ext/libmpi.c -o build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o >/usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot >/Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup >build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o -L/usr/local/mpich2/lib >-L/usr/local/mpich2 -lmpich -lrt -o >build/lib.macosx-10.4-fat-2.4/mpi4py/libmpi.so >/usr/bin/ld: for architecture i386 >/usr/bin/ld: warning /usr/local/mpich2/lib/libmpich.dylib cputype (18, >architecture ppc) does not match cputype (7) for specified -arch flag: >i386 (file not loaded) >/usr/bin/ld: can't locate file for: -lrt >collect2: ld returned 1 exit status >/usr/bin/ld: for architecture ppc >/usr/bin/ld: can't locate file for: -lrt >collect2: ld returned 1 exit status >lipo: can't open input file: /var/tmp//ccFhLQNI.out (No such file or >directory) >error: command '/usr/local/mpich2/bin/mpicc' failed with exit status 1 The universal build of python builds universal extensions by default. In 2.4.4 you can add ['-arch', 'ppc'] to the extra_compile_args and extra_link_args arguments for Extension (in your setup.py) to build a thin extension. Using CFLAGS and LDFLAGS might work as well, I haven't tested this. IIRC this doesn't work with 2.4.3, the necessary changes were added in 2.5 and 2.4.4. BTW. The best way (TM) to fix your problem is to build mpich2 as a universal binary :-). Ronald From rodneys at io.com Wed Oct 25 11:38:33 2006 From: rodneys at io.com (Rodney Somerstein) Date: Wed, 25 Oct 2006 07:38:33 -0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: Message-ID: I downloaded Python 2.5 yesterday and am having a problem with the included IDLE. If I launch IDLE by double-clicking, it shows up in the task bar, then immediately goes away. I see no windows, menus, etc. for the program. If I type IDLE at the command line, IDLE 1.2 launches with no problem. The icon in the task bar appears to be Python Launcher in that case, not IDLE. If I launch the IDLE.app from MacPython 2.4 by double-clicking, it launches IDLE 1.1.3 with no problems. Does anyone have any suggestions? Is IDLE.app broken under MacPython 2.5? While I can launch it from terminal, it is definitely more convenient to just double-click. I am using IDLE because I have been working my way through the O'Reilly Learning Python book at a glacial pace over the last year or more and it is nice to have a simple Python-aware interactive editor. -Rodney -- Rodney Somerstein Always remember that you are unique... rodneys at io.com just like everyone else. From ronaldoussoren at mac.com Wed Oct 25 13:34:57 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 25 Oct 2006 13:34:57 +0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: Message-ID: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> On Wednesday, October 25, 2006, at 01:07PM, Rodney Somerstein wrote: >I downloaded Python 2.5 yesterday and am having a problem with the included IDLE. If I launch IDLE by double-clicking, it shows up in the task bar, then immediately goes away. I see no windows, menus, etc. for the program. If I type IDLE at the command line, IDLE 1.2 launches with no problem. The icon in the task bar appears to be Python Launcher in that case, not IDLE. > >If I launch the IDLE.app from MacPython 2.4 by double-clicking, it launches IDLE 1.1.3 with no problems. > >Does anyone have any suggestions? Is IDLE.app broken under MacPython 2.5? While I can launch it from terminal, it is definitely more convenient to just double-click. I am using IDLE because I have been working my way through the O'Reilly Learning Python book at a glacial pace over the last year or more and it is nice to have a simple Python-aware interactive editor. IDLE works for me. Could you tell me more about the version of OSX you're using (and if 10.4, if you're on intel or ppc). For the record, if you are running 10.3.9: IDLE uses Tk for its GUI, you'll have to download and install that seperately: http://tcltkaqua.sourceforge.net/ This doesn't seem to be a problem for you as launching IDLE from the command-line works right. Ronald From rodneys at io.com Wed Oct 25 14:00:32 2006 From: rodneys at io.com (rodneys at io.com) Date: Wed, 25 Oct 2006 07:00:32 -0500 (CDT) Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> Message-ID: <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> Ronald Oussoren wrote: > IDLE works for me. Could you tell me more about the version of OSX you're > using (and if 10.4, if you're on intel or ppc). > > > For the record, if you are running 10.3.9: IDLE uses Tk for its GUI, > you'll have to download and install that seperately: > http://tcltkaqua.sourceforge.net/ > > This doesn't seem to be a problem for you as launching IDLE from the > command-line works right. I am using the latest update to Mac OS X (I believe that is 10.4.8). This is on a PowerBook G4 1.5, so PPC, not Intel. As you state, it doesn't appear to be Tk, since everything starts from the command line. When I launch the 2.4 IDLE (version 1.1.3) by double-clicking, I get a console window which opens in addition to the IDLE window. When I select this, the menus change to show that I am using Tk. I don't see this additional window when launching the new IDLE from the command line. Does this shed any light on the problem? Thanks, -Rodney From ronaldoussoren at mac.com Wed Oct 25 16:45:55 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 25 Oct 2006 16:45:55 +0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> Message-ID: <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> On Wednesday, October 25, 2006, at 02:00PM, wrote: >Ronald Oussoren wrote: >> IDLE works for me. Could you tell me more about the version of OSX you're >> using (and if 10.4, if you're on intel or ppc). >> >> >> For the record, if you are running 10.3.9: IDLE uses Tk for its GUI, >> you'll have to download and install that seperately: >> http://tcltkaqua.sourceforge.net/ >> >> This doesn't seem to be a problem for you as launching IDLE from the >> command-line works right. > >I am using the latest update to Mac OS X (I believe that is 10.4.8). This >is on a PowerBook G4 1.5, so PPC, not Intel. That's the same as my laptop. > >As you state, it doesn't appear to be Tk, since everything starts from the >command line. When I launch the 2.4 IDLE (version 1.1.3) by >double-clicking, I get a console window which opens in addition to the >IDLE window. When I select this, the menus change to show that I am using >Tk. I don't see this additional window when launching the new IDLE from >the command line. Does this shed any light on the problem? The console window is a Tk misfeature. The 2.5 version of IDLE contains some code to close this console window. Could you open Console.app, clear the log and then try to start IDLE again? Hopefully IDLE runs into a problem that gets written to the console log. Ronald From Chris.Barker at noaa.gov Wed Oct 25 18:13:19 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 25 Oct 2006 09:13:19 -0700 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> Message-ID: <453F8D1F.3050908@noaa.gov> While we're at it, if all you want is a Python-aware editor -- then there area a lot of other (better?) options. Scan the archives of this list for suggestions. A few: BBEdit (TextWrangler?) Eclipse SPE Jedit ScrIDE Assorted *nix editors: emaca, VIm, etc, etc. or look here: http://wiki.python.org/moin/PythonEditors -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Tom.Weir at safe.com Wed Oct 25 22:22:01 2006 From: Tom.Weir at safe.com (Tom Weir) Date: Wed, 25 Oct 2006 13:22:01 -0700 Subject: [Pythonmac-SIG] Saving a file??? Message-ID: <3175AA8B-CB06-4DD7-AB3A-34C21FA48E92@safe.com> Hi All, I'm trying to create and save a new OmniOutliner doc, but I'm having some trouble trying to figure out what to pass as the _in parameter. Any suggestions? A script snippet is below. Thanks, Tom from appscript import app,k oo = app("OmniOutliner") d = oo.documents.end.make(new=k.document) #... #add rows, etc... #... #newFile doesn't exist yet, so the following doesn't work: #from Carbon.File import FSSpec #newFile = FSSpect("/tmp/aNewFile") oo.save(d,in_=newFile) From rodneys at io.com Wed Oct 25 22:38:20 2006 From: rodneys at io.com (Rodney Somerstein) Date: Wed, 25 Oct 2006 18:38:20 -0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 Message-ID: Ronald Oussoren wrote: >Could you open Console.app, clear the log and then try to start IDLE >again? Hopefully IDLE runs into a problem that gets written to the >console log. Here is what I see when I double-click on IDLE: Traceback (most recent call last): File "/Applications/MacPython 2.5/IDLE.app/Contents/Resources/idlemain.py", line 27, in main() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/idlelib/PyShell.py", line 1393, in main macosxSupport.setupApp(root, flist) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/idlelib/macosxSupport.py", line 110, in setupApp hideTkConsole(root) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/idlelib/macosxSupport.py", line 26, in hideTkConsole root.tk.call('console', 'hide') _tkinter.TclError: invalid command name "console" From vip at avatar.com.au Thu Oct 26 02:27:16 2006 From: vip at avatar.com.au (David Worrall) Date: Thu, 26 Oct 2006 10:27:16 +1000 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <453F8D1F.3050908@noaa.gov> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: For what it' worth, perhaps to save you some time, I recently spent a day evaluating these tools. Horses for courses, but for me: TextWrangler is a freebie BBEditLite - a very nice word-processor which is keyword aware; SPE is a full-blown development environment which includes wxglade interface to wxwindows I found it difficult to 'grock' quickly but it could be good ScrIDE is 1/2 way between. I opted for ScrIDE - it's simple to use (ie no manual necessary) and stable. + using wxglade indpendently for wxwidget development. My config: intel OSX 10.4.8 MacPython 2.4.3 If anyone's using MacPython + wxglade into scrIDE and can report it AOK I'd be pleased to hear. David On 26/10/2006, at 2:13 AM, Christopher Barker wrote: > While we're at it, if all you want is a Python-aware editor -- then > there area a lot of other (better?) options. Scan the archives of this > list for suggestions. A few: > > BBEdit (TextWrangler?) > Eclipse > SPE > Jedit > ScrIDE > > > Assorted *nix editors: emaca, VIm, etc, etc. > > or look here: > > http://wiki.python.org/moin/PythonEditors > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > NOAA/OR&R/HAZMAT (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > _______________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au From rodneys at io.com Thu Oct 26 11:28:32 2006 From: rodneys at io.com (Rodney Somerstein) Date: Thu, 26 Oct 2006 07:28:32 -0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: Thanks Chris and David for the suggestions. I'm already aware of other editors. But, as I mentioned, I'm currently learning Python and an environment that actually lets me execute python code without having to first create and save a file is superior for that purpose, in my opinion. I already own BBEdit and have for many years. So, when I start actually writing real code, I will likely use that. >For what it' worth, perhaps to save you some time, I recently spent >a day evaluating >these tools. Horses for courses, but for me: >TextWrangler is a freebie BBEditLite - a very nice word-processor >which is keyword aware; >SPE is a full-blown development environment which includes wxglade >interface to wxwindows >I found it difficult to 'grock' quickly but it could be good >ScrIDE is 1/2 way between. > >David > >On 26/10/2006, at 2:13 AM, Christopher Barker wrote: > >>While we're at it, if all you want is a Python-aware editor -- then >>there area a lot of other (better?) options. Scan the archives of this >>list for suggestions. A few: >> >>BBEdit (TextWrangler?) >>Eclipse >>SPE >>Jedit >>ScrIDE >> >> >>Assorted *nix editors: emaca, VIm, etc, etc. >> >>or look here: >> >>http://wiki.python.org/moin/PythonEditors >> >>-Chris -- Rodney Somerstein Always remember that you are unique... rodneys at io.com just like everyone else. From rodneys at io.com Thu Oct 26 15:09:32 2006 From: rodneys at io.com (rodneys at io.com) Date: Thu, 26 Oct 2006 08:09:32 -0500 (CDT) Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <12488608.1161861016306.JavaMail.ronaldoussoren@mac.com> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <12488608.1161861016306.JavaMail.ronaldoussoren@mac.com> Message-ID: <61851.200.182.25.98.1161868172.squirrel@webmail.io.com> Ronald Oussoren wrote: > > Do you have a custom version of Tcl/Tk in /Library/Frameworks? What does > the following command print: > $ otool -Lv > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_tkinter.so > > It seems that I have a custom version of Tk installed on my build machine > (without knowing it), which means _tkinter.so links to > /Library/Frameworks/{Tcl,Tk}.framework instead of the system ones. There's > obviously a fallback to the system one because I don't have this framework > on my laptop, yet IDLE works there. If you do have a Tk.framework in > /Library/Frameworks as well you could try to move that (and Tcl.framework) > aside, although I don't know what that might break. > > Could you add a '#' before line 26 in > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/idlelib/macosxSupport.py > and then add a line with 'pass' just below that to make hideTkConsole a > valid function again? That should get you going again. Thank you very much. It turned out that I had previously installed ActiveState Tcl. I removed the Tcl and Tk frameworks from /Library/Frameworks and IDLE launched with no problem. I didn't even need to comment line 26 and add the pass command. So, everything seems to be working properly again. -Rodney From ronaldoussoren at mac.com Thu Oct 26 15:17:31 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 26 Oct 2006 15:17:31 +0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <61851.200.182.25.98.1161868172.squirrel@webmail.io.com> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <12488608.1161861016306.JavaMail.ronaldoussoren@mac.com> <61851.200.182.25.98.1161868172.squirrel@webmail.io.com> Message-ID: <5203806.1161868651334.JavaMail.ronaldoussoren@mac.com> On Thursday, October 26, 2006, at 03:09PM, wrote: >Ronald Oussoren wrote: >> >> Do you have a custom version of Tcl/Tk in /Library/Frameworks? What does >> the following command print: >> $ otool -Lv >> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_tkinter.so >> >> It seems that I have a custom version of Tk installed on my build machine >> (without knowing it), which means _tkinter.so links to >> /Library/Frameworks/{Tcl,Tk}.framework instead of the system ones. There's >> obviously a fallback to the system one because I don't have this framework >> on my laptop, yet IDLE works there. If you do have a Tk.framework in >> /Library/Frameworks as well you could try to move that (and Tcl.framework) >> aside, although I don't know what that might break. >> >> Could you add a '#' before line 26 in >> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/idlelib/macosxSupport.py >> and then add a line with 'pass' just below that to make hideTkConsole a >> valid function again? That should get you going again. > >Thank you very much. It turned out that I had previously installed >ActiveState Tcl. I removed the Tcl and Tk frameworks from >/Library/Frameworks and IDLE launched with no problem. I didn't even need >to comment line 26 and add the pass command. > >So, everything seems to be working properly again. Thanks. I'll also add a patch for 2.5.1 that works around this problem. Ronald > >-Rodney > > > From vip at avatar.com.au Fri Oct 27 04:26:26 2006 From: vip at avatar.com.au (David Worrall) Date: Fri, 27 Oct 2006 12:26:26 +1000 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: no need for a file? then enjoy the delights of the interpreter. just $ /usr/bin/python (at the prompt) will get you the interpreter at which you can play around. sometimes I do that whilst I'm trying to work out what I want (by looking at the results of various processes) and then drag/copy and past into a text edit doco when it's right, and sometimes the reverse, especially for looping structures. That afterall is one of the beauties of interpreted languages ... you don't need to know what you want until you see the it .. This means that it is a tool for thought rather than just a tool for executing a known idea. All the best w. python. I've programmed in everything from fortran II , pascal, snobol, apl, forth, c, assemblers etc etc and python for 7 years on all sorts of platforms. These days there has to be a pretty convincing argument for me to use anything else. ---David On 26/10/2006, at 7:28 PM, Rodney Somerstein wrote: > Thanks Chris and David for the suggestions. I'm already aware of > other editors. But, as I mentioned, I'm currently learning Python and > an environment that actually lets me execute python code without > having to first create and save a file is superior for that purpose, > in my opinion. > > I already own BBEdit and have for many years. So, when I start > actually writing real code, I will likely use that. > >> For what it' worth, perhaps to save you some time, I recently spent >> a day evaluating >> these tools. Horses for courses, but for me: >> TextWrangler is a freebie BBEditLite - a very nice word-processor >> which is keyword aware; >> SPE is a full-blown development environment which includes wxglade >> interface to wxwindows >> I found it difficult to 'grock' quickly but it could be good >> ScrIDE is 1/2 way between. >> >> David >> >> On 26/10/2006, at 2:13 AM, Christopher Barker wrote: >> >>> While we're at it, if all you want is a Python-aware editor -- then >>> there area a lot of other (better?) options. Scan the archives of >>> this >>> list for suggestions. A few: >>> >>> BBEdit (TextWrangler?) >>> Eclipse >>> SPE >>> Jedit >>> ScrIDE >>> >>> >>> Assorted *nix editors: emaca, VIm, etc, etc. >>> >>> or look here: >>> >>> http://wiki.python.org/moin/PythonEditors >>> >>> -Chris > > > -- > > Rodney Somerstein Always remember that you are unique... > rodneys at io.com just like everyone else. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > _______________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au From tom.weir at safe.com Fri Oct 27 05:59:45 2006 From: tom.weir at safe.com (Tom Weir) Date: Thu, 26 Oct 2006 20:59:45 -0700 Subject: [Pythonmac-SIG] OmniOutliner Appscript Message-ID: <96483C0E-73B5-4B40-9396-6731ED588561@safe.com> Hello, Has anyone successfully used appscript with omnioutliner? I'm have some problems with conduit setting domains. The following applescript snippet works, but I haven't (as you can see below) found a similar way of doing things in appscript. set r to row 1 of document 1 set the external id of conduit setting domain id "com.geekwerks.foo" of r to "asdasd" The following doesn't appear to work d = app('OmniOutliner Professional').documents.end.make(new=k.document) r = d.rows.end.make(new=k.row) csd = r.conduit_setting_domains[its.id=="com.geekwerks.foo"] csd.external_id.set('asdasdasd') The above code results in the below traceback: Traceback (most recent call last): File "", line 1, in ? File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/appscript/specifier.py", line 197, in __call__ raise CommandError(self, (args, kargs), e) appscript.specifier.CommandError: Can't pack data into an AEDesc (unsupported type): its.id == 'com.geekwerks.foo' Failed command: app(u'/Applications/OmniOutliner Professional.app').documents.ID(u'dQCDauyvBm2').children [1].conduit_setting_domains[its.id == 'com.geekwerks.foo'].external_id.set('asdasdasd') Two potential gotchas: - OmniOutliner only allows conduit setting domains to be referenced by id - A conduit setting domain is created the first time it is referenced; no need to 'make' it. Does anyone have any ideas? Thanks, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061026/dcf6a92f/attachment.html From delza at livingcode.org Fri Oct 27 06:21:19 2006 From: delza at livingcode.org (Dethe Elza) Date: Thu, 26 Oct 2006 21:21:19 -0700 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: On 26-Oct-06, at 7:26 PM, David Worrall wrote: > no need for a file? then enjoy the delights of the interpreter. just > $ /usr/bin/python (at the prompt) Better, use IPython (even from Idle, I think it can be done, but I don't use Idle, so YMMV). IPython will let you work in the interpreter, then save the session to a file for editing if you decide to preserve what you've done. http://ipython.scipy.org/ --Dethe > > will get you the interpreter at which you can play around. > sometimes I do that whilst I'm trying to work out what I want > (by looking at the results of various processes) > and then drag/copy and past into a text edit doco when it's right, > and sometimes the reverse, especially for looping structures. > > That afterall is one of the beauties of interpreted languages ... > you don't need to know what you want until you see the it .. > This means that it is a tool for thought rather than just a tool for > executing a known idea. > > All the best w. python. I've programmed in everything from > fortran II , pascal, snobol, apl, forth, c, assemblers etc etc > and python for 7 years on all sorts of platforms. These days > there has to be a pretty convincing argument for me to use > anything else. > > ---David > > On 26/10/2006, at 7:28 PM, Rodney Somerstein wrote: > >> Thanks Chris and David for the suggestions. I'm already aware of >> other editors. But, as I mentioned, I'm currently learning Python and >> an environment that actually lets me execute python code without >> having to first create and save a file is superior for that purpose, >> in my opinion. >> >> I already own BBEdit and have for many years. So, when I start >> actually writing real code, I will likely use that. >> >>> For what it' worth, perhaps to save you some time, I recently spent >>> a day evaluating >>> these tools. Horses for courses, but for me: >>> TextWrangler is a freebie BBEditLite - a very nice word-processor >>> which is keyword aware; >>> SPE is a full-blown development environment which includes wxglade >>> interface to wxwindows >>> I found it difficult to 'grock' quickly but it could be good >>> ScrIDE is 1/2 way between. >>> >>> David >>> >>> On 26/10/2006, at 2:13 AM, Christopher Barker wrote: >>> >>>> While we're at it, if all you want is a Python-aware editor -- then >>>> there area a lot of other (better?) options. Scan the archives of >>>> this >>>> list for suggestions. A few: >>>> >>>> BBEdit (TextWrangler?) >>>> Eclipse >>>> SPE >>>> Jedit >>>> ScrIDE >>>> >>>> >>>> Assorted *nix editors: emaca, VIm, etc, etc. >>>> >>>> or look here: >>>> >>>> http://wiki.python.org/moin/PythonEditors >>>> >>>> -Chris >> >> >> -- >> >> Rodney Somerstein Always remember that you are unique... >> rodneys at io.com just like everyone else. >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > _______________________________________ > experimental polymedia: www.avatar.com.au > Sonic Communications Research Group, > University of Canberra: www.canberra.edu.au > > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig DETHE ELZA Senior Software Developer delza at uniserve.com From ronaldoussoren at mac.com Fri Oct 27 07:40:53 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 27 Oct 2006 07:40:53 +0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: <8511828C-6B69-4832-8FC8-CDB2BCCEA0BC@mac.com> Why does everyone seem to want to push people away from IDLE? IDLE isn't award-winning material, but it does work properly as a simple python environment. In a way it is better than most programmers text editors because although it is missing some of the advanced editor features these offer it does come with an embedded python interpreter and debugger. Ronald On Oct 27, 2006, at 4:26 AM, David Worrall wrote: > no need for a file? then enjoy the delights of the interpreter. just > $ /usr/bin/python (at the prompt) > > will get you the interpreter at which you can play around. > sometimes I do that whilst I'm trying to work out what I want > (by looking at the results of various processes) > and then drag/copy and past into a text edit doco when it's right, > and sometimes the reverse, especially for looping structures. > > That afterall is one of the beauties of interpreted languages ... > you don't need to know what you want until you see the it .. > This means that it is a tool for thought rather than just a tool for > executing a known idea. > > All the best w. python. I've programmed in everything from > fortran II , pascal, snobol, apl, forth, c, assemblers etc etc > and python for 7 years on all sorts of platforms. These days > there has to be a pretty convincing argument for me to use > anything else. > > ---David > > On 26/10/2006, at 7:28 PM, Rodney Somerstein wrote: > >> Thanks Chris and David for the suggestions. I'm already aware of >> other editors. But, as I mentioned, I'm currently learning Python and >> an environment that actually lets me execute python code without >> having to first create and save a file is superior for that purpose, >> in my opinion. >> >> I already own BBEdit and have for many years. So, when I start >> actually writing real code, I will likely use that. >> >>> For what it' worth, perhaps to save you some time, I recently spent >>> a day evaluating >>> these tools. Horses for courses, but for me: >>> TextWrangler is a freebie BBEditLite - a very nice word-processor >>> which is keyword aware; >>> SPE is a full-blown development environment which includes wxglade >>> interface to wxwindows >>> I found it difficult to 'grock' quickly but it could be good >>> ScrIDE is 1/2 way between. >>> >>> David >>> >>> On 26/10/2006, at 2:13 AM, Christopher Barker wrote: >>> >>>> While we're at it, if all you want is a Python-aware editor -- then >>>> there area a lot of other (better?) options. Scan the archives of >>>> this >>>> list for suggestions. A few: >>>> >>>> BBEdit (TextWrangler?) >>>> Eclipse >>>> SPE >>>> Jedit >>>> ScrIDE >>>> >>>> >>>> Assorted *nix editors: emaca, VIm, etc, etc. >>>> >>>> or look here: >>>> >>>> http://wiki.python.org/moin/PythonEditors >>>> >>>> -Chris >> >> >> -- >> >> Rodney Somerstein Always remember that you are unique... >> rodneys at io.com just like everyone else. >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > _______________________________________ > experimental polymedia: www.avatar.com.au > Sonic Communications Research Group, > University of Canberra: www.canberra.edu.au > > > > > _______________________________________________ > 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: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061027/97f6a792/attachment.bin From hengist.podd at virgin.net Fri Oct 27 10:37:45 2006 From: hengist.podd at virgin.net (has) Date: Fri, 27 Oct 2006 09:37:45 +0100 Subject: [Pythonmac-SIG] Saving a file??? In-Reply-To: References: Message-ID: <58D6E32F-84D4-4583-8FDD-066EAC7ACAB3@virgin.net> Tom Weir wrote: > I'm trying to create and save a new OmniOutliner doc, but I'm > having some trouble trying to figure out what to pass as the _in > parameter. Any suggestions? A script snippet is below. import macfile newFile = macfile.File('/tmp/aNewFile') HTH has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From hengist.podd at virgin.net Fri Oct 27 10:38:57 2006 From: hengist.podd at virgin.net (has) Date: Fri, 27 Oct 2006 09:38:57 +0100 Subject: [Pythonmac-SIG] OmniOutliner Appscript In-Reply-To: References: Message-ID: <29F9564E-4794-4DB7-8870-008E73B277A0@virgin.net> Tom Weir wrote: > Has anyone successfully used appscript with omnioutliner? I'm have > some problems with conduit setting domains. > > The following applescript snippet works, but I haven't (as you can > see below) found a similar way of doing things in appscript. > > set r to row 1 of document 1 > set the external id of conduit setting domain id > "com.geekwerks.foo" of r to "asdasd" Don't have OO Pro myself, but the AS equivalent should be something like: r = app('OmniOutliner Professional').documents[1].rows[1] r.conduit_setting_domains.ID("com.geekwerks.foo").external_id.set ("asdasd") You might also want to grab a copy of ASTranslate from appscript.sourceforge.net - handy when you want to convert AS commands to their appscript equivalents. HTH has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From rodneys at io.com Fri Oct 27 10:25:20 2006 From: rodneys at io.com (Rodney Somerstein) Date: Fri, 27 Oct 2006 06:25:20 -0200 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <8511828C-6B69-4832-8FC8-CDB2BCCEA0BC@mac.com> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> <8511828C-6B69-4832-8FC8-CDB2BCCEA0BC@mac.com> Message-ID: At 7:40 AM +0200 10/27/06, Ronald Oussoren wrote: >Why does everyone seem to want to push people away from IDLE? IDLE >isn't award-winning material, but it does work properly as a simple >python environment. > >In a way it is better than most programmers text editors because >although it is missing some of the advanced editor features these >offer it does come with an embedded python interpreter and debugger. > I was wondering about this myself. IDLE colors Python commands and offers help with commands while typing. It seems to be an excellent learning environment. I don't think I will use it when writing actual applications, but for right now, it seems to make more sense than Python from the Terminal application or any of the editors people have mentioned. I do appreciate everyone's suggestions of alternatives. For right now, though, IDLE is working for me again and I'm happily testing various commands and testing out answers to the end of section questions in Learning Python. -Rodney -- Rodney Somerstein Always remember that you are unique... rodneys at io.com just like everyone else. From jrus at hcs.harvard.edu Sat Oct 28 19:23:05 2006 From: jrus at hcs.harvard.edu (Jacob Rus) Date: Sat, 28 Oct 2006 13:23:05 -0400 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <453F8D1F.3050908@noaa.gov> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: Christopher Barker wrote: > While we're at it, if all you want is a Python-aware editor -- then > there area a lot of other (better?) options. Scan the archives of this > list for suggestions. A few: > > BBEdit (TextWrangler?) > Eclipse > SPE > Jedit > ScrIDE > > Assorted *nix editors: emaca, VIm, etc, etc. I'm surprised that TextMate didn't make this list. It's a relatively new editor, but quite amazing (it won the 2006 Apple Design Award for best developer tool). Admittedly, the python bundle is not as polished as those for some other languages (html and ruby for instance), but it is still head and shoulders above all the other editors listed above, in my opinion. some more people from this list ought to give it a shot (the python bundle really needs some more competent contributors to live up to its potential, and the mac python community could really use a better editor ;). > Why does everyone seem to want to push people away from IDLE? > IDLE isn't award-winning material, but it does work properly > as a simple python environment. > > In a way it is better than most programmers text editors because > although it is missing some of the advanced editor features these > offer it does come with an embedded python interpreter and debugger. These really can't make up for the lack of good *editing* features. The ability to run python scripts from an editor is all I really *need* from it, as for anything more intensive I can drop into IPython or similar. I think that pushing people away from IDLE is quite natural, as most users will be happier and more productive in another environment, especially since some of these, like TextWrangler, are free. -Jacob From lanceboyle at qwest.net Sun Oct 29 02:31:57 2006 From: lanceboyle at qwest.net (Jerry) Date: Sat, 28 Oct 2006 18:31:57 -0700 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: On Oct 28, 2006, at 10:23 AM, Jacob Rus wrote: > Christopher Barker wrote: >> While we're at it, if all you want is a Python-aware editor -- then >> there area a lot of other (better?) options. Scan the archives of >> this >> list for suggestions. A few: >> >> BBEdit (TextWrangler?) >> Eclipse >> SPE >> Jedit >> ScrIDE >> >> Assorted *nix editors: emaca, VIm, etc, etc. > > I'm surprised that TextMate didn't make this list. It's a relatively > new editor, but quite amazing (it won the 2006 Apple Design Award for > best developer tool). Admittedly, the python bundle is not as > polished > as those for some other languages (html and ruby for instance), but it > is still head and shoulders above all the other editors listed > above, in > my opinion. some more people from this list ought to give it a shot > (the python bundle really needs some more competent contributors to > live > up to its potential, and the mac python community could really use a > better editor ;). I concur wholeheartedly. I was going to pitch in with a comment like this but I think I did, recently. I have't used BBedit and TextWrangler only a little, but when I groked TextMate (and it takes a little effort to understand what makes it special) I was blown away. I'll add that while it's not free, it is very reasonable--$39 US as I recall. Jerry From vip at avatar.com.au Sun Oct 29 06:01:10 2006 From: vip at avatar.com.au (David Worrall) Date: Sun, 29 Oct 2006 16:01:10 +1100 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <8511828C-6B69-4832-8FC8-CDB2BCCEA0BC@mac.com> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> <8511828C-6B69-4832-8FC8-CDB2BCCEA0BC@mac.com> Message-ID: <104E5485-AEA5-41FD-948A-DD5B2550F606@avatar.com.au> There was a time a while ago when IDLE was a pain/unstable etc etc on intel OSX and I guess I just gave up. I used to use it all the time. Perhaps it works ok these days. Stopping to sharpen one's axe is ok as long as one doesn't get bogged down in the process. Now, where was that nifty little chain-saw I had yesterday?.. :-) David. On 27/10/2006, at 3:40 PM, Ronald Oussoren wrote: > Why does everyone seem to want to push people away from IDLE? IDLE > isn't award-winning material, but it does work properly as a simple > python environment. > > In a way it is better than most programmers text editors because > although it is missing some of the advanced editor features these > offer it does come with an embedded python interpreter and debugger. > > Ronald > > On Oct 27, 2006, at 4:26 AM, David Worrall wrote: > >> no need for a file? then enjoy the delights of the interpreter. just >> $ /usr/bin/python (at the prompt) >> >> will get you the interpreter at which you can play around. >> sometimes I do that whilst I'm trying to work out what I want >> (by looking at the results of various processes) >> and then drag/copy and past into a text edit doco when it's right, >> and sometimes the reverse, especially for looping structures. >> >> That afterall is one of the beauties of interpreted languages ... >> you don't need to know what you want until you see the it .. >> This means that it is a tool for thought rather than just a tool for >> executing a known idea. >> >> All the best w. python. I've programmed in everything from >> fortran II , pascal, snobol, apl, forth, c, assemblers etc etc >> and python for 7 years on all sorts of platforms. These days >> there has to be a pretty convincing argument for me to use >> anything else. >> >> ---David >> >> On 26/10/2006, at 7:28 PM, Rodney Somerstein wrote: >> >>> Thanks Chris and David for the suggestions. I'm already aware of >>> other editors. But, as I mentioned, I'm currently learning Python >>> and >>> an environment that actually lets me execute python code without >>> having to first create and save a file is superior for that purpose, >>> in my opinion. >>> >>> I already own BBEdit and have for many years. So, when I start >>> actually writing real code, I will likely use that. >>> >>>> For what it' worth, perhaps to save you some time, I recently spent >>>> a day evaluating >>>> these tools. Horses for courses, but for me: >>>> TextWrangler is a freebie BBEditLite - a very nice word-processor >>>> which is keyword aware; >>>> SPE is a full-blown development environment which includes wxglade >>>> interface to wxwindows >>>> I found it difficult to 'grock' quickly but it could be good >>>> ScrIDE is 1/2 way between. >>>> >>>> David >>>> >>>> On 26/10/2006, at 2:13 AM, Christopher Barker wrote: >>>> >>>>> While we're at it, if all you want is a Python-aware editor -- >>>>> then >>>>> there area a lot of other (better?) options. Scan the archives of >>>>> this >>>>> list for suggestions. A few: >>>>> >>>>> BBEdit (TextWrangler?) >>>>> Eclipse >>>>> SPE >>>>> Jedit >>>>> ScrIDE >>>>> >>>>> >>>>> Assorted *nix editors: emaca, VIm, etc, etc. >>>>> >>>>> or look here: >>>>> >>>>> http://wiki.python.org/moin/PythonEditors >>>>> >>>>> -Chris >>> >>> >>> -- >>> >>> Rodney Somerstein Always remember that you are unique... >>> rodneys at io.com just like everyone else. >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >>> >> >> _______________________________________ >> experimental polymedia: www.avatar.com.au >> Sonic Communications Research Group, >> University of Canberra: www.canberra.edu.au >> >> >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > _______________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au From ronaldoussoren at mac.com Sun Oct 29 08:49:18 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 29 Oct 2006 08:49:18 +0100 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <104E5485-AEA5-41FD-948A-DD5B2550F606@avatar.com.au> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> <8511828C-6B69-4832-8FC8-CDB2BCCEA0BC@mac.com> <104E5485-AEA5-41FD-948A-DD5B2550F606@avatar.com.au> Message-ID: On Oct 29, 2006, at 6:01 AM, David Worrall wrote: > There was a time a while ago when IDLE was a pain/unstable etc etc on > intel OSX > and I guess I just gave up. I used to use it all the time. > Perhaps it works ok these days. > Stopping to sharpen one's axe is ok as long as one doesn't get bogged > down in the process. > Now, where was that nifty little chain-saw I had yesterday?.. :-) IDLE should be better than it once was, I've done some work for Python 2.5 to make it behave more like a true OSX application. It is still a long way from being a great application (and not only on OSX), but it is quite useable. As full disclosure: I don't use IDLE very often but am a vi junkie. None of the GUI editors have made enough of an impact yet to get me to go through the painfull process of rewireing my fingers. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061029/14403cd6/attachment.bin From vip at avatar.com.au Sun Oct 29 09:10:00 2006 From: vip at avatar.com.au (David Worrall) Date: Sun, 29 Oct 2006 19:10:00 +1100 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> <8511828C-6B69-4832-8FC8-CDB2BCCEA0BC@mac.com> <104E5485-AEA5-41FD-948A-DD5B2550F606@avatar.com.au> Message-ID: <78218631-08D0-4A40-9C79-5E97B370A2B1@avatar.com.au> > yes .... I remember the pain of the rewire from ed to vi ! isn't it amazing that the fingers remember! There was a time last century when I didn't use a unix machine for 10 years, then logged onto an SGi, fired up vi and in 30 seconds flat all the commands were at my fingertips. Like playing Bach learned in childhood! I've always thought the fist (mouse) was a retrogressive replacement to fingers. Now if only well all used Dvorak! :-) David at least Mac now has the option, and what an irony that we've come such full circle. > As full disclosure: I don't use IDLE very often but am a vi junkie. > None of the GUI editors have made enough of an impact yet to get me > to go through the painfull process of rewireing my fingers. > > Ronald > _______________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au From sjatkins at gmail.com Sun Oct 29 03:14:48 2006 From: sjatkins at gmail.com (Samantha Atkins) Date: Sat, 28 Oct 2006 19:14:48 -0700 Subject: [Pythonmac-SIG] is there a pyobjc installer compatible with python 2.5? Message-ID: <7411703F-C3E2-47D0-A006-473E116AF0DA@apple.com> The current installer refuses to install after a python 2.5 install. Is there a way around this? - samantha From ronaldoussoren at mac.com Sun Oct 29 13:37:24 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 29 Oct 2006 13:37:24 +0100 Subject: [Pythonmac-SIG] is there a pyobjc installer compatible with python 2.5? In-Reply-To: <7411703F-C3E2-47D0-A006-473E116AF0DA@apple.com> References: <7411703F-C3E2-47D0-A006-473E116AF0DA@apple.com> Message-ID: <9071D1DB-14C8-4914-9BFE-96F31022F7D4@mac.com> On Oct 29, 2006, at 3:14 AM, Samantha Atkins wrote: > The current installer refuses to install after a python 2.5 install. > Is there a way around this? Install from source. Make sure you have Xcode installed, including the Universal SDK and then install setuptools and use 'easy_install-2.5 install pyobjc' to install PyObjC. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061029/77b6a479/attachment.bin From chris.van.bael at gmail.com Sun Oct 29 21:55:18 2006 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Sun, 29 Oct 2006 21:55:18 +0100 Subject: [Pythonmac-SIG] Problems with py2app for i386 Message-ID: <5465ee790610291255x496980ban233d0c753bc1edbe@mail.gmail.com> Hi, I'm building an application on a PPC Mini in Python with PyGame. When I run "python setup.py py2app" I get a .app file made that runs on my (and other) PPC Macs. But it fails on Intel Macs. I presume these last lines I get have something to do with it: " /usr/bin/strip: for architecture i386 object: /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/childsplay malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD command 10 can't byte swap it) /usr/bin/strip: for architecture i386 object: /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/python malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD command 13 can't byte swap it) stripping saved 11991384 bytes (12298552 / 24289936) " Any ideas where my problem is; is it in my code or a problem of py2app or the strip application? Do I need to use the no-strip option or prefer-ppc for a universal binary? Thanks for any help. Chris From thorthor at altern.org Mon Oct 30 13:29:43 2006 From: thorthor at altern.org (thor) Date: Mon, 30 Oct 2006 12:29:43 +0000 Subject: [Pythonmac-SIG] py2app problems Message-ID: Hi list I'm trying to build an app with py2app. The project is using pygame and pyOpenGL and all that is imported in the main file. I'm on PowerBook, OS X 10.4.6 I try to build the setupfile with py2applet as recommended but I get this: thm21-mac-pb:~/Desktop/opengl thm21$ py2applet --make-setup myApp.py Traceback (most recent call last): File "/usr/local/bin/py2applet", line 2, in ? from py2app.scripts.script_py2applet import main ImportError: No module named scripts.script_py2applet thm21-mac-pb:~/Desktop/opengl thm21$ Ok. so I copy a py2app setup file from the pygame example folder of py2app and make this: from setuptools import setup setup( app=["myApp.py"], setup_requires=["py2app"], ) Run this in the command line: python setup.py py2app But after a while I get the following message: (myApp.app is now 8.6 MB) stripping SDL stripping SDL_mixer stripping _File.so stripping zlib.so /usr/bin/strip: for architecture i386 object: /Users/thm21/Desktop/ opengl/dist/myApp.app/Contents/MacOS/stripped malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD command 10 can't byte swap it) stripping saved 4548552 bytes (7711040 / 12259592) thm21-mac-pb:~/Desktop/opengl thm21$ Could someone tell me how to proceed? Thanks thor From bob at redivi.com Mon Oct 30 18:16:20 2006 From: bob at redivi.com (Bob Ippolito) Date: Mon, 30 Oct 2006 09:16:20 -0800 Subject: [Pythonmac-SIG] py2app problems In-Reply-To: References: Message-ID: <6a36e7290610300916n42476b77t918fedd96ddbdd63@mail.gmail.com> On 10/30/06, thor wrote: > > Hi list > > I'm trying to build an app with py2app. The project is using pygame and > pyOpenGL and all that is imported in the main file. > > I'm on PowerBook, OS X 10.4.6 > > I try to build the setupfile with py2applet as recommended but I get > this: > > thm21-mac-pb:~/Desktop/opengl thm21$ py2applet --make-setup myApp.py > Traceback (most recent call last): > File "/usr/local/bin/py2applet", line 2, in ? > from py2app.scripts.script_py2applet import main > ImportError: No module named scripts.script_py2applet > thm21-mac-pb:~/Desktop/opengl thm21$ It looks like you didn't uninstall a previous installation of py2app properly. The documentation has a section on how to do that. http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#uninstalling-py2app-0-2-x-or-earlier -bob -bob From Chris.Barker at noaa.gov Mon Oct 30 19:28:54 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 30 Oct 2006 10:28:54 -0800 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> Message-ID: <45464466.4040807@noaa.gov> Jacob Rus wrote: > I'm surprised that TextMate didn't make this list. That was a very quick, off the cuff list from my brain. It was not intended to be comprehensive. I do hope TextMate is listed on the wiki page at python.org -- if not, someone should add it. > Admittedly, the python bundle is not as polished > as those for some other languages (html and ruby for instance), but it > is still head and shoulders above all the other editors listed above, in > my opinion. some more people from this list ought to give it a shot > (the python bundle really needs some more competent contributors to live > up to its potential, Can the Python mode be altered/improved by users? Is TextMate open to input/contribution from users? That is what it takes to really make it shine. A couple years ago a BBedit user posted excerpts from an email discussion with the BBedit folks about how they might improve BBEdit for Python -- and it came down to the BBedit folks saying : you shouldn't want to do that, and we're not going to let you -- it was clear none of them was a regular Python user, so BBedit's Python support is still severely lacking. The primary reason I use Xemacs is because it has excellent modes for EVERY kind of text I edit -- and ALL of them were written by serious users of the respective type of text -- that's why they are so good (didn't Guido write the original Python mode for Emacs?) I'm still looking for an editor/IDE that supports everything I do, and works on all three platforms I need it on -- Eclipse and Jedit look promising, but I haven't had the courage to re-train my fingers yet! -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From bob at redivi.com Mon Oct 30 21:18:59 2006 From: bob at redivi.com (Bob Ippolito) Date: Mon, 30 Oct 2006 12:18:59 -0800 Subject: [Pythonmac-SIG] Problems with py2app for i386 In-Reply-To: <5465ee790610291255x496980ban233d0c753bc1edbe@mail.gmail.com> References: <5465ee790610291255x496980ban233d0c753bc1edbe@mail.gmail.com> Message-ID: <6a36e7290610301218i72e0fefembcb4de18d596b2c5@mail.gmail.com> On 10/29/06, Chris Van Bael wrote: > Hi, > > I'm building an application on a PPC Mini in Python with PyGame. > When I run "python setup.py py2app" I get a .app file made that runs > on my (and other) PPC Macs. But it fails on Intel Macs. > I presume these last lines I get have something to do with it: > " > /usr/bin/strip: for architecture i386 object: > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/childsplay > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD > command 10 can't byte swap it) > /usr/bin/strip: for architecture i386 object: > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/python > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD > command 13 can't byte swap it) > stripping saved 11991384 bytes (12298552 / 24289936) > " > > Any ideas where my problem is; is it in my code or a problem of py2app > or the strip application? > Do I need to use the no-strip option or prefer-ppc for a universal binary? It looks like you probably didn't install py2app properly. Perform a full uninstallation and follow the installation instructions in the documentation. http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#installation -bob From jose at stat.ucla.edu Mon Oct 30 22:37:34 2006 From: jose at stat.ucla.edu (Jose Hales-Garcia) Date: Mon, 30 Oct 2006 13:37:34 -0800 Subject: [Pythonmac-SIG] Opening Tkinter X11 windows in remote displays Message-ID: <63B4E23B-BB44-4B38-AB74-CFD7FCE11CAA@stat.ucla.edu> Sorry if this has been asked already. We're trying to get the Python Tkinter's widgets to appear remotely on an X11 server. So far we're only able to open widgets on the local console. Trying to get them to appear remotely results in the error message... kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only INIT_Processeses(), could not establish the default connection to the WindowServer.Abort This is a problem with the Apple version of Python (v2.3.5) and the latest pre-compiled universal Python (v2.5). We're running Mac OS X 10.4.8 on both client and server. I've double checked the settings. In SSH we have X11Forwarding turned on. The .Xauthority file contains the correct host information. I've set the DISPLAY variable correctly. I am able to open X11 windows on the remote server. For instance, the R statistics package can open windows remotely. Thank you for your time, Jose From rowen at cesmail.net Mon Oct 30 23:37:38 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Mon, 30 Oct 2006 14:37:38 -0800 Subject: [Pythonmac-SIG] Another tcl/tk problem with python--PIL this time Message-ID: You'll recall that I reported crashes with the macpython.org matplotlib package. This turned out to be because I was using my own Tcl/Tk (a good version instead of the version installed with 10.4). It turns out PIL has a similar but more subtle problem. It works for me, but if I use py2app to bundle an application that uses PIL, it fails one some users machines. Building a new PIL locally fixes the problem, of course. This is another plea for the _tkinter.so that comes with the standard macpython to be set up to look for a Tcl/Tk first in /Library/Frameworks, then in /System/Library/Frameworks. I think the packages would have just worked fine with that change (though i've not ripped out my Tcl/Tk to prove that). The current situation is nasty: - Any serious Tcl/Tk/Tkinter user will install a better version of Tcl/Tk on MacOS X. - MacPython needs a simple modification to support it: - But this modification breaks matplotlib and PIL, and perhaps any python package installed with a binary installer built on an unmodified MacPython. Ouch. I know there is talk of including a Tcl/Tk with Python like Windows does. I hope we don't do that because, based on my experience with Tcl/Tk on Mac, unix and Windows, the Windows solution is the worst of the lot: - It makes upgrading tcl/tk harder. Serious users of Tcl/Tk want this to get useful bug fixes (no package that large is perfect). - It makes installing tcl/tk additions harder (for example I use the snack sound library). On Windows it's not easy to figure out where to put these extensions, nor is it easy to test them! Modifying _tkinter.so is trivial and it does the job. If it was part of the standard MacPython distro then the problem with broken extensions would probably be solved. If proof of that assertion would tip the balance, I'm willing to do more leg work on it. -- Russell From wddozier at mac.com Tue Oct 31 00:55:36 2006 From: wddozier at mac.com (Bill Dozier) Date: Mon, 30 Oct 2006 15:55:36 -0800 Subject: [Pythonmac-SIG] psyco Message-ID: <27D5472C-CC0D-4D9E-8D03-FF40ECC2D69B@mac.com> I had hopes, when reading this post, that setting -mstackrealign would magically make psyco work on MacIntel. No such luck. I still got a seg fault. Rats. -- "I can sum that up in one word: youneverknow." -- Joaquin Andujar Bill Dozier wddozier at mac.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061030/bd149c68/attachment.html From chris.van.bael at gmail.com Tue Oct 31 07:09:57 2006 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Tue, 31 Oct 2006 07:09:57 +0100 Subject: [Pythonmac-SIG] Problems with py2app for i386 In-Reply-To: <6a36e7290610301218i72e0fefembcb4de18d596b2c5@mail.gmail.com> References: <5465ee790610291255x496980ban233d0c753bc1edbe@mail.gmail.com> <6a36e7290610301218i72e0fefembcb4de18d596b2c5@mail.gmail.com> Message-ID: <5465ee790610302209q7cb4c888kd3140f5d42592f29@mail.gmail.com> Strange because I followed that manual exactly. But I'll try again... Thanks for the help On 10/30/06, Bob Ippolito wrote: > On 10/29/06, Chris Van Bael wrote: > > Hi, > > > > I'm building an application on a PPC Mini in Python with PyGame. > > When I run "python setup.py py2app" I get a .app file made that runs > > on my (and other) PPC Macs. But it fails on Intel Macs. > > I presume these last lines I get have something to do with it: > > " > > /usr/bin/strip: for architecture i386 object: > > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/childsplay > > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD > > command 10 can't byte swap it) > > /usr/bin/strip: for architecture i386 object: > > /Users/chrisvanbael/Childsplay/Sources/childsplay-0.84.1/dist/childsplay.app/Contents/MacOS/python > > malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD > > command 13 can't byte swap it) > > stripping saved 11991384 bytes (12298552 / 24289936) > > " > > > > Any ideas where my problem is; is it in my code or a problem of py2app > > or the strip application? > > Do I need to use the no-strip option or prefer-ppc for a universal binary? > > It looks like you probably didn't install py2app properly. Perform a > full uninstallation and follow the installation instructions in the > documentation. > > http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#installation > > -bob > From ronaldoussoren at mac.com Tue Oct 31 07:50:53 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 31 Oct 2006 07:50:53 +0100 Subject: [Pythonmac-SIG] Opening Tkinter X11 windows in remote displays In-Reply-To: <63B4E23B-BB44-4B38-AB74-CFD7FCE11CAA@stat.ucla.edu> References: <63B4E23B-BB44-4B38-AB74-CFD7FCE11CAA@stat.ucla.edu> Message-ID: On Oct 30, 2006, at 10:37 PM, Jose Hales-Garcia wrote: > > Sorry if this has been asked already. > > We're trying to get the Python Tkinter's widgets to appear remotely > on an X11 server. So far we're only able to open widgets on the > local console. Trying to get them to appear remotely results in the > error message... You'll have to build your own copy of the _tkinter extension. Tkinter for the framework builds of python (that is Apple's version of python and the various universal builds) link with the Aqua version of Tk which has nothing to do with X11. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061031/c61489c5/attachment-0001.bin From ronaldoussoren at mac.com Tue Oct 31 07:53:57 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 31 Oct 2006 07:53:57 +0100 Subject: [Pythonmac-SIG] Another tcl/tk problem with python--PIL this time In-Reply-To: References: Message-ID: On Oct 30, 2006, at 11:37 PM, Russell E. Owen wrote: > > This is another plea for the _tkinter.so that comes with the standard > macpython to be set up to look for a Tcl/Tk first in > /Library/Frameworks, then in /System/Library/Frameworks. I think the > packages would have just worked fine with that change (though i've not > ripped out my Tcl/Tk to prove that). Please test again using Python 2.5, and probably 2.4.4 as well. Python 2.5 definitely links against /Library/Frameworks/Tk.framework. That was entirely unintentional, I didn't know I had a local Tk install. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061031/1a34ca53/attachment.bin From thorthor at altern.org Tue Oct 31 14:30:05 2006 From: thorthor at altern.org (thor) Date: Tue, 31 Oct 2006 13:30:05 +0000 Subject: [Pythonmac-SIG] Problems with py2app for i386 In-Reply-To: <5465ee790610302209q7cb4c888kd3140f5d42592f29@mail.gmail.com> References: <5465ee790610291255x496980ban233d0c753bc1edbe@mail.gmail.com> <6a36e7290610301218i72e0fefembcb4de18d596b2c5@mail.gmail.com> <5465ee790610302209q7cb4c888kd3140f5d42592f29@mail.gmail.com> Message-ID: <1A54B3E3-36C8-4FE2-8340-6F571F4D0EB9@altern.org> On 31 Oct 2006, at 06:09, Chris Van Bael wrote: > Strange because I followed that manual exactly. > But I'll try again... > If you check my mail from yesterday, I was also having problems with this i386 biteswapping thing. I think my py2app script is stopping at the same place as yours. (I'm on OSX 10.4.6) And I followed the instructions as well. Is this because of recent additions for MacIntel universal support? thor From rowen at cesmail.net Tue Oct 31 23:18:00 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Tue, 31 Oct 2006 14:18:00 -0800 Subject: [Pythonmac-SIG] Another tcl/tk problem with python--PIL this time References: Message-ID: In article , Ronald Oussoren wrote: > On Oct 30, 2006, at 11:37 PM, Russell E. Owen wrote: > > > > > This is another plea for the _tkinter.so that comes with the standard > > macpython to be set up to look for a Tcl/Tk first in > > /Library/Frameworks, then in /System/Library/Frameworks. I think the > > packages would have just worked fine with that change (though i've not > > ripped out my Tcl/Tk to prove that). > > Please test again using Python 2.5, and probably 2.4.4 as well. > Python 2.5 definitely links against /Library/Frameworks/Tk.framework. > That was entirely unintentional, I didn't know I had a local Tk install. I just tried it for Python 2.4.4 and you are right. Great! Any chance of doing it intentionally from now on? :) I'm holding off installing 2.5 for now because I have doubts that Numeric and numarray will work with it (due to the change to array indices for C extensions that is intended to support 64 bit computing); I'm planning to migrate my application to numpy before adopting 2.5. Is there an easy way to install the 2.5 from binary without it becoming the "current" version? I'd be happy to have it around to play with. (I think I hacked it once by installing 2.5b, ditching the receipt, then installing 2.4.x, but I'm not sure it's Kosher). Thank you very much for supporting user-added Tcl/Tk in the standard Mac installer for Python 2.4.4 and 2.5. -- Russell From kw at codebykevin.com Mon Oct 30 19:36:09 2006 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 30 Oct 2006 13:36:09 -0500 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <45464466.4040807@noaa.gov> References: <13282708.1161776097764.JavaMail.ronaldoussoren@mac.com> <57658.200.182.25.98.1161777632.squirrel@webmail.io.com> <6393136.1161787555656.JavaMail.ronaldoussoren@mac.com> <453F8D1F.3050908@noaa.gov> <45464466.4040807@noaa.gov> Message-ID: <45464619.2000509@codebykevin.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 FWIW, I think that IDLE under MacPython 2.5 is a perfectly usable little editor. Ronald did a great job getting it tweaked to behave better as a Mac application. I prefer IDLE to other environments for editing Python, including Aquamacs and Komodo. - -- Kevin Walzer Code by Kevin http://www.codebykevin.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRkYYEsLm8HXyq4sRAoP8AJ0VvREQn5pnoUaAaHrl6nbR/9651ACfUJXI uvRFk11dYEwaPAAb3L5Cz8Q= =pESD -----END PGP SIGNATURE-----