From jrus at hcs.harvard.edu Wed Nov 1 06:26:49 2006 From: jrus at hcs.harvard.edu (Jacob Rus) Date: Wed, 01 Nov 2006 00:26:49 -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: Christopher Barker wrote: > Jacob Rus wrote: >> 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? Yes indeed, which is why I say it needs to have more contributors from the Mac Python community. There are several dozen active contributors to the bundle repository (only a few python users though), and the community seems in general to be quite energetic and active. Allan tosses new features to bundle contributors every few weeks (last week it was the quite impressive new tm_dialog tool, which allows a command to use interface builder .nib files as a dialog, sending the result back to the command as a plist file), and those features ripple down through the bundles as people build new toys to take advantage of them. Anyway, the primary places where the current TextMate python bundle can be improved are a) a better python script runner, with prettier styled output, and more linkified tracebacks, b) better documentation of the bundle, and better tools for fetching documentation about the functions and classes being used. and c) more snippets and commands for code-entry can be added. Snippets a very powerful tool, and the python bundle under-utilizes them at the moment. > 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. That is very sad. TextMate, and its community certainly do not share this philosophy. The TextMate support for python is already significantly better than BBEdit's support. But it's not as good as it could be, either. > 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?) Well, personally, as a Mac user, I think that a python bundle that fully took advantage of TextMate would be nicer than the emacs python mode. But it will take a non-trivial amount of work. One of the problems with the current TextMate is that grammars and folding patterns, etc. are rather geared toward working with end markers on blocks, and don't really handle indentation-based structure as well as I would like. But I think those problems will go away in TextMate 2.0, which should come out sometime after Leopard does (when I'm hoping python 2.5 and pyObjC will be shipped standard with the OS??). TextMate's scope system is based around a quite understandable, and extremely flexible, regular-expression-based lexer/parser, and though it makes a few compromises in the name of efficiency (Text Editors have different needs than compilers and interpreters, naturally), it stands head and shoulders above any other editor when it comes to scoping all the elements of a language, and allowing granular context-sensitive control of the editor's behavior. I really think all powerful editors will work this way in 10 years, as it's too useful a feature for others to ignore for long. > I'm still looking for an editor/IDE that supports everything I do, and > works on all three platforms I need it on Well, it doesn't work on Windows or Linux, but on the Mac, in my opinion TextMate is the nicest editor around. There are quite a few emacs/vim converts in the community, who seem to be happily adjusted. I think at the very least, every Mac user who deals with any significant amount of structured text or code owes it to themselves to download the 30-day trial. I estimate within 2 weeks, you'll be hooked ;) -Jacob From bob at redivi.com Wed Nov 1 09:19:52 2006 From: bob at redivi.com (Bob Ippolito) Date: Wed, 1 Nov 2006 00:19:52 -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> <45464466.4040807@noaa.gov> Message-ID: <6a36e7290611010019q6fd0d0c6va528bc564808b1c3@mail.gmail.com> On 10/31/06, Jacob Rus wrote: > Christopher Barker wrote: > > Jacob Rus wrote: > >> 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? > > Yes indeed, which is why I say it needs to have more contributors from > the Mac Python community. There are several dozen active contributors > to the bundle repository (only a few python users though), and the > community seems in general to be quite energetic and active. > > Allan tosses new features to bundle contributors every few weeks (last > week it was the quite impressive new tm_dialog tool, which allows a > command to use interface builder .nib files as a dialog, sending the > result back to the command as a plist file), and those features ripple > down through the bundles as people build new toys to take advantage of them. > > Anyway, the primary places where the current TextMate python bundle can > be improved are a) a better python script runner, with prettier styled > output, and more linkified tracebacks, b) better documentation of the > bundle, and better tools for fetching documentation about the functions > and classes being used. and c) more snippets and commands for code-entry > can be added. Snippets a very powerful tool, and the python bundle > under-utilizes them at the moment. > > > 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. > > That is very sad. TextMate, and its community certainly do not share > this philosophy. The TextMate support for python is already > significantly better than BBEdit's support. But it's not as good as it > could be, either. > > > 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?) > > Well, personally, as a Mac user, I think that a python bundle that fully > took advantage of TextMate would be nicer than the emacs python mode. > But it will take a non-trivial amount of work. One of the problems with > the current TextMate is that grammars and folding patterns, etc. are > rather geared toward working with end markers on blocks, and don't > really handle indentation-based structure as well as I would like. But > I think those problems will go away in TextMate 2.0, which should come > out sometime after Leopard does (when I'm hoping python 2.5 and pyObjC > will be shipped standard with the OS??). > > TextMate's scope system is based around a quite understandable, and > extremely flexible, regular-expression-based lexer/parser, and though it > makes a few compromises in the name of efficiency (Text Editors have > different needs than compilers and interpreters, naturally), it stands > head and shoulders above any other editor when it comes to scoping all > the elements of a language, and allowing granular context-sensitive > control of the editor's behavior. I really think all powerful editors > will work this way in 10 years, as it's too useful a feature for others > to ignore for long. > > > I'm still looking for an editor/IDE that supports everything I do, and > > works on all three platforms I need it on > > Well, it doesn't work on Windows or Linux, but on the Mac, in my opinion > TextMate is the nicest editor around. There are quite a few emacs/vim > converts in the community, who seem to be happily adjusted. > > I think at the very least, every Mac user who deals with any significant > amount of structured text or code owes it to themselves to download the > 30-day trial. I estimate within 2 weeks, you'll be hooked ;) Well, as a point of reference.. I bought TextMate because it's nice to use for demos and such.. but I still use Vim for writing Python code and Emacs for writing Erlang code. I never could get hooked on TextMate, despite trying. It just isn't as convenient to use as what I'm used to... for example, I do quite a lot of regexing, and that takes a lot more effort from TextMate. I do like how it colors diffs though, I find myself piping commands such as "svn diff" into it now and then. -bob From ronaldoussoren at mac.com Wed Nov 1 10:43:00 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 01 Nov 2006 01:43:00 -0800 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <6a36e7290611010019q6fd0d0c6va528bc564808b1c3@mail.gmail.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> <45464466.4040807@noaa.gov> <6a36e7290611010019q6fd0d0c6va528bc564808b1c3@mail.gmail.com> Message-ID: <7CD833A1-010E-1000-BC1C-734C69416D51-Webmail-10015@mac.com> On Wednesday, November 01, 2006, at 09:20AM, "Bob Ippolito" wrote: >> >> I think at the very least, every Mac user who deals with any significant >> amount of structured text or code owes it to themselves to download the >> 30-day trial. I estimate within 2 weeks, you'll be hooked ;) > >Well, as a point of reference.. I bought TextMate because it's nice to >use for demos and such.. but I still use Vim for writing Python code >and Emacs for writing Erlang code. > >I never could get hooked on TextMate, despite trying. It just isn't as >convenient to use as what I'm used to... for example, I do quite a lot >of regexing, and that takes a lot more effort from TextMate. I do like >how it colors diffs though, I find myself piping commands such as "svn >diff" into it now and then. Same here, except that I didn't buy TextMate and use IDLE for demo's. Ronald From rowen at cesmail.net Wed Nov 1 18:38:22 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Wed, 01 Nov 2006 09:38:22 -0800 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 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> <6a36e7290611010019q6fd0d0c6va528bc564808b1c3@mail.gmail.com> <7CD833A1-010E-1000-BC1C-734C69416D51-Webmail-10015@mac.com> Message-ID: (In reference to the discussion of TextMate). I'm also not hooked on TextMate. Yet. My main objection is that undo is one-character-at-a-time, which I find utterly maddening for extensive undo. I also find it a bit cluttered and clumsy in some ways, but would be willing to overlook that to get the great features if I could get chunky undo. I'm still using Pepper and am reasonably happy with it. I find it very clean and powerful but has some bugs and is no longer supported so they'll not be fixed. Smultron, TextWrangler and SubEthaEdit are fine alternatives if you don't need some advanced features. I find TextWrangler/BBEdit's find/replace dialog box appallingly clumsy so gave up on BBEdit years ago and only use TextWrangler when desperate. I used WingIDE Professional for awhile and it is amazing in some ways, but some aspects of the editor are just too clumsy (scroll-wheel scrolling is hard to control on Mac, the find/replace dialog box can only be part of the main window to work properly...). Someday I should try to learn emacs again. I already know vim is not for me (I was pretty good at vi at one time, but now the modality drives me crazy). I personally prefer programs that don't require a lot of memorization. Just my two bits. -- Russell From jrus at hcs.harvard.edu Thu Nov 2 04:19:49 2006 From: jrus at hcs.harvard.edu (Jacob Rus) Date: Wed, 01 Nov 2006 22:19:49 -0500 Subject: [Pythonmac-SIG] IDLE and MacPython 2.5 In-Reply-To: <6a36e7290611010019q6fd0d0c6va528bc564808b1c3@mail.gmail.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> <45464466.4040807@noaa.gov> <6a36e7290611010019q6fd0d0c6va528bc564808b1c3@mail.gmail.com> Message-ID: Bob Ippolito wrote: > Well, as a point of reference.. I bought TextMate because it's nice to > use for demos and such.. but I still use Vim for writing Python code > and Emacs for writing Erlang code. > > I never could get hooked on TextMate, despite trying. It just isn't as > convenient to use as what I'm used to... for example, I do quite a lot > of regexing, and that takes a lot more effort from TextMate. What is less convenient? What regexing takes more effort? Do you mean find/replace in your code type regexing here? I'm sure Allan would be glad to hear any specific criticisms, and it would probably be possible to build Are there any features that could be added to make it more convenient? I think part of the reason that Python developers don't appreciate TextMate as much as other coders is that we don't really have all the ugly syntax that other languages benefit so much from getting an editor to fill automatically. But I still think building some snippets with Python idioms could aid python coders considerably. For instance, a "property" snippet was recently added.[1] -Jacob [1]: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/205183 From bob at redivi.com Thu Nov 2 04:34:56 2006 From: bob at redivi.com (Bob Ippolito) Date: Wed, 1 Nov 2006 19:34:56 -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> <45464466.4040807@noaa.gov> <6a36e7290611010019q6fd0d0c6va528bc564808b1c3@mail.gmail.com> Message-ID: <6a36e7290611011934j7a17ae9eka722456d81a50bc@mail.gmail.com> On 11/1/06, Jacob Rus wrote: > Bob Ippolito wrote: > > Well, as a point of reference.. I bought TextMate because it's nice to > > use for demos and such.. but I still use Vim for writing Python code > > and Emacs for writing Erlang code. > > > > I never could get hooked on TextMate, despite trying. It just isn't as > > convenient to use as what I'm used to... for example, I do quite a lot > > of regexing, and that takes a lot more effort from TextMate. > > What is less convenient? What regexing takes more effort? Do you mean > find/replace in your code type regexing here? I'm sure Allan would be > glad to hear any specific criticisms, and it would probably be possible > to build > > Are there any features that could be added to make it more convenient? It's a mechanics thing.. say in Vim I'd do: %s/foo/bar/g in TextMate I'd do: foobar I find it a lot more natural to perform the former than the latter, so I feel more productive in Vim. Additionally I can use emacs and vim in a SSH session identically to how I use it locally, which is a bonus at times. Getting used to Vim for Python code just doesn't really buy me much. I liked TextMate enough to pay for it, but I couldn't make the switch for most programming tasks. -bob From goose27 at shaw.ca Thu Nov 2 06:11:27 2006 From: goose27 at shaw.ca (Helmut) Date: Wed, 01 Nov 2006 23:11:27 -0600 Subject: [Pythonmac-SIG] Users and groups module Message-ID: <000501c6fe3d$5a17d7d0$2c1c4d18@D8NMKR41> hi rick how are you doing please call me i havent heard from you in a while and id love to speak to you dad call me at 1-204-955-7465 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061101/de8f20b3/attachment.html From vip at avatar.com.au Thu Nov 2 17:25:53 2006 From: vip at avatar.com.au (David Worrall) Date: Fri, 3 Nov 2006 03:25:53 +1100 Subject: [Pythonmac-SIG] python threading and multiple processors Message-ID: <7CA90FE8-2E6E-4A8C-BE36-E26C82B6C574@avatar.com.au> Hi All, Can anyone tell me whether or not the python threading module can make use of multiple processors (such as on the intel Mac)? many thanks, David _______________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au From bob at redivi.com Thu Nov 2 17:33:43 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 2 Nov 2006 08:33:43 -0800 Subject: [Pythonmac-SIG] python threading and multiple processors In-Reply-To: <7CA90FE8-2E6E-4A8C-BE36-E26C82B6C574@avatar.com.au> References: <7CA90FE8-2E6E-4A8C-BE36-E26C82B6C574@avatar.com.au> Message-ID: <6a36e7290611020833k5c90e237g58da27db69fdff10@mail.gmail.com> On 11/2/06, David Worrall wrote: > Hi All, > Can anyone tell me whether or not the python threading module can > make use of multiple processors > (such as on the intel Mac)? > Yes, it can, but the global interpreter lock means only one thread at a time can be executing pure Python code. -bob From ronaldoussoren at mac.com Thu Nov 2 17:36:10 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 2 Nov 2006 17:36:10 +0100 Subject: [Pythonmac-SIG] python threading and multiple processors In-Reply-To: <7CA90FE8-2E6E-4A8C-BE36-E26C82B6C574@avatar.com.au> References: <7CA90FE8-2E6E-4A8C-BE36-E26C82B6C574@avatar.com.au> Message-ID: On Nov 2, 2006, at 5:25 PM, David Worrall wrote: > Hi All, > Can anyone tell me whether or not the python threading module can > make use of multiple processors > (such as on the intel Mac)? It can, but not always optimally. Python has a global interpreter lock (GIL) that is held whenever a thread is executing python byte code. This means only one thread at a time can be executing byte code, however multiple threads can be in C code at the same time. Therefore it is possible to use multiple CPUs, but only if you have C code that does some calculation without holding the GIL. Note that several GUI API's from Apple, such as CoreImage make automatic use of multiple processors, and even if you don't use multiple processors yourself the other processor won't be completely idle, that can and will be used for background tasks and other programs. If you want to make full use of multiple processors using pure python code you'll have to use multiple processes. 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/20061102/5a7646a1/attachment.bin From ellisonbg.net at gmail.com Thu Nov 2 22:03:56 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Thu, 2 Nov 2006 14:03:56 -0700 Subject: [Pythonmac-SIG] python threading and multiple processors In-Reply-To: References: <7CA90FE8-2E6E-4A8C-BE36-E26C82B6C574@avatar.com.au> Message-ID: <6ce0ac130611021303m650e997ek1c9c2bff2fc79db5@mail.gmail.com> > If you want to make full use of multiple processors using pure python > code you'll have to use multiple processes. This is absolutely true, but in practice it is a little more complicated. If you can factor your algorithm so that each process can be run completely separately, with no interprocess communication, then just using multiple processes will work fine. But once you need your processes to communicate in any way using sockets, there is another critical requirement to make the multi-process solution work in practice. You will absolutely need to use non-blocking sockets and the best way to do this in python is using Twisted. Now a bit of self-promotion....As a part of the IPython project we have been implementing an architecture that allows you to do parallel and distribted computing interactively in python/Ipython. This infrastructure solves many of the basic problems you will run into we regularly use it to take advantage of multi-core and multi-CPU hardware. For details, see: http://ipython.scipy.org/moin/Parallel_Computing Cheers, Brian From arve.knudsen at gmail.com Fri Nov 3 17:36:35 2006 From: arve.knudsen at gmail.com (Arve Knudsen) Date: Fri, 3 Nov 2006 17:36:35 +0100 Subject: [Pythonmac-SIG] How to run an app bundle as root? Message-ID: Hello I'm writing a custom installation tool for OS X, which needs to run with root privileges. The installation tool is packaged into an app bundle by way of py2app. What I basically need to know is the best way of attaining root privileges in the tool, must this be done with AuthorizationExecuteWithPrivileges? I first tried this approach, writing a wrapper script which executes the main script in a privileged Python process. This doesn't quite work however, the resulting window behaves completely different from what one would expect. That is, it can't get focus and I can't command-tab to it. I thought of another approach, which is to first run a privileged program which setuid's the bundle executable, and then re-execute the bundle. Would this be a good approach, and how can I execute the bundle programmatically? Thanks, Arve Knudsen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061103/ab4a1dbe/attachment.html From bob at redivi.com Fri Nov 3 17:46:14 2006 From: bob at redivi.com (Bob Ippolito) Date: Fri, 3 Nov 2006 08:46:14 -0800 Subject: [Pythonmac-SIG] How to run an app bundle as root? In-Reply-To: References: Message-ID: <6a36e7290611030846i11009c58i3910bac0e192c86@mail.gmail.com> On 11/3/06, Arve Knudsen wrote: > Hello > > I'm writing a custom installation tool for OS X, which needs to run with > root privileges. The installation tool is packaged into an app bundle by way > of py2app. What I basically need to know is the best way of attaining root > privileges in the tool, must this be done with > AuthorizationExecuteWithPrivileges? I first tried this > approach, writing a wrapper script which executes the main script in a > privileged Python process. This doesn't quite work however, the resulting > window behaves completely different from what one would expect. That is, it > can't get focus and I can't command-tab to it. > > I thought of another approach, which is to first run a privileged program > which setuid's the bundle executable, and then re-execute the bundle. Would > this be a good approach, and how can I execute the bundle programmatically? > Sounds like you're taking the wrong strategy here. The idea is to use the privileged helper process to do *only* privileged operations. Don't use it for UI stuff. That's just dangerous. -bob From arve.knudsen at gmail.com Fri Nov 3 17:54:29 2006 From: arve.knudsen at gmail.com (Arve Knudsen) Date: Fri, 3 Nov 2006 17:54:29 +0100 Subject: [Pythonmac-SIG] How to run an app bundle as root? In-Reply-To: References: <6a36e7290611030846i11009c58i3910bac0e192c86@mail.gmail.com> Message-ID: Yes, that would be my ideal approach. I simply don't have the time to implement this at the moment however (I need a running prototype). Besides, the OS X Installer operates this way already. Thanks, Arve Knudsen On 11/3/06, Bob Ippolito wrote: > > On 11/3/06, Arve Knudsen wrote: > > Hello > > > > I'm writing a custom installation tool for OS X, which needs to run with > > root privileges. The installation tool is packaged into an app bundle by > way > > of py2app. What I basically need to know is the best way of attaining > root > > privileges in the tool, must this be done with > > AuthorizationExecuteWithPrivileges? I first tried this > > approach, writing a wrapper script which executes the main script in a > > privileged Python process. This doesn't quite work however, the > resulting > > window behaves completely different from what one would expect. That is, > it > > can't get focus and I can't command-tab to it. > > > > I thought of another approach, which is to first run a privileged > program > > which setuid's the bundle executable, and then re-execute the bundle. > Would > > this be a good approach, and how can I execute the bundle > programmatically? > > > > Sounds like you're taking the wrong strategy here. The idea is to use > the privileged helper process to do *only* privileged operations. > Don't use it for UI stuff. That's just dangerous. > > -bob > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061103/8b635db4/attachment.htm From ellisonbg.net at gmail.com Sun Nov 5 01:56:11 2006 From: ellisonbg.net at gmail.com (Brian Granger) Date: Sat, 4 Nov 2006 17:56:11 -0700 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: <6ce0ac130611041656i507b989dx10fa4de72590f333@mail.gmail.com> Sorry I didn't see this one earlier. Using the --mpi option to build mpi4py is not the recommended way of building it. The docs are a little out of date on this one. The following should work: python setup.py build --mpicc=path_to_your_mpicc_executable Let me know if that works! I build mpi4py regularly on my MacBook and it always works fine this way. When I buiild using --mpi=foo instead, I get your error. Hopefully we can get the documentation updated soon. Brian On 10/24/06, 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 > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From Chris.Barker at noaa.gov Mon Nov 6 18:53:24 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 06 Nov 2006 09:53:24 -0800 Subject: [Pythonmac-SIG] [Numpy-discussion] problems installing NumPy on OSX In-Reply-To: <6a36e7290611060942x4b3bb30am56aaec599d14d090@mail.gmail.com> References: <20061104222219.5v1dj889q8cgsg8c@webmail.ntnu.no> <20061105091727.ouibxoltwk40cksg@webmail.ntnu.no> <454F72F5.2020009@noaa.gov> <6a36e7290611060942x4b3bb30am56aaec599d14d090@mail.gmail.com> Message-ID: <454F7694.8090708@noaa.gov> Bob Ippolito wrote: > I'll put it up when there's something to put there. Doesn't make sense > to have an empty page. We could start with the Python binary itself and the wxPython binary at: http://www.wxpython.org/download.php#binaries We should be able to get numpy and mpl soon also. Who's been building PIL? that's a good one to have there. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From james.anderson at icr.ac.uk Mon Nov 6 19:21:36 2006 From: james.anderson at icr.ac.uk (James Anderson) Date: Mon, 6 Nov 2006 18:21:36 +0000 Subject: [Pythonmac-SIG] MacPython 2.5 installation error on MAC OS 10.4.5 Message-ID: <4D8C2DDA-854C-47AB-B969-627EABCBCF79@icr.ac.uk> Hi there, I've been having trouble getting python 2.5 installed on my mac running OS 10.4.5; hoping someone will be kind enough to point me in the right direction. The immediate problem is as follows: I can download the MacPython 2.5 .dmg, mount it and run the installer, but it seems to get right to the end and then say "There were errors installing the software. Please try installing again". The installer log then shows the following errors: BomFatalError - cpio read error: bad file format Package Authoring Error: Package "PythonFramework-2.5.pkg" is using a deprecated archive format. Running in compatibility mode. BomFatalError - cpio read error: bad file format Package Authoring Error: Package "PythonApplications-2.5.pkg" is using a deprecated archive format. Running in compatibility mode. BomFatalError - cpio read error: bad file format Package Authoring Error: Package "PythonUnixTools-2.5.pkg" is using a deprecated archive format. Running in compatibility mode. BomFatalError - cpio read error: bad file format Package Authoring Error: Package "PythonDocumentation-2.5.pkg" is using a deprecated archive format. Running in compatibility mode. Install failed: The following install step failed: run postflight script for Fix system Python It seems like that final error is the fatal one, but I've no idea how to go about fixing it. I have tried compiling from source as well, but ran into errors there too?figured I'd focus on trying to fix this first and only move on to the build error if necessary. Thanks in advance for any advice! Cheers, James Anderson From chris.van.bael at gmail.com Wed Nov 8 09:01:40 2006 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Wed, 8 Nov 2006 09:01:40 +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: <5465ee790611080001n16192e59w5bc1f526e98fb10@mail.gmail.com> 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 > Hi all, I uninstalled py2app as described on that webpage. Went through my HD with Finder and Spotlight and removed everything that mentioned py2app. Reinstalled py2app via easy_install. End result: same problem! Also tried the --no-strip and --prefer-ppc options, but they didn't help. Any ideas? From chris.van.bael at gmail.com Wed Nov 8 09:07:11 2006 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Wed, 8 Nov 2006 09:07:11 +0100 Subject: [Pythonmac-SIG] Getting an ugly icon? Message-ID: <5465ee790611080007u76ff3b5bj990721df446198b9@mail.gmail.com> Hi, Whatever I try, I always get a very ugly icon in my Python program. What I do: Open Icon Composer, click on the 128x128 field and open an 180x180 icon. Let it rescale it and save it as an icns file. In Preview this icns file looks great. When I make an app with py2app it's included "--iconfile childsplay.py" However when I startup my program, it has a very ugly icon file. In the .app I see that the icns file is included. I once made the app with an ugly windows icon file, but I remove everything before I run py2app, so that would seem strange. And _some_ file is included, but it is really my icon, but very fugly! Thanks for any help. Chris From ronaldoussoren at mac.com Wed Nov 8 09:12:01 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 08 Nov 2006 00:12:01 -0800 Subject: [Pythonmac-SIG] Getting an ugly icon? In-Reply-To: <5465ee790611080007u76ff3b5bj990721df446198b9@mail.gmail.com> References: <5465ee790611080007u76ff3b5bj990721df446198b9@mail.gmail.com> Message-ID: <494E85C5-010E-1000-97A5-BA8983D6744D-Webmail-10006@mac.com> On Wednesday, November 08, 2006, at 09:09AM, "Chris Van Bael" wrote: >Hi, > >Whatever I try, I always get a very ugly icon in my Python program. > >What I do: >Open Icon Composer, click on the 128x128 field and open an 180x180 icon. >Let it rescale it and save it as an icns file. >In Preview this icns file looks great. >When I make an app with py2app it's included "--iconfile childsplay.py" >However when I startup my program, it has a very ugly icon file. >In the .app I see that the icns file is included. > >I once made the app with an ugly windows icon file, but I remove >everything before I run py2app, so that would seem strange. >And _some_ file is included, but it is really my icon, but very fugly! I have fixed an icon-related issue a while back and don't know if there has been a release since then. Could you try the development version of py2app (easy_install py2app==dev)? Ronald From chris.van.bael at gmail.com Wed Nov 8 10:33:39 2006 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Wed, 8 Nov 2006 10:33:39 +0100 Subject: [Pythonmac-SIG] Getting an ugly icon? In-Reply-To: <494E85C5-010E-1000-97A5-BA8983D6744D-Webmail-10006@mac.com> References: <5465ee790611080007u76ff3b5bj990721df446198b9@mail.gmail.com> <494E85C5-010E-1000-97A5-BA8983D6744D-Webmail-10006@mac.com> Message-ID: <5465ee790611080133s29c412d3w3ee19f5956b6aaa4@mail.gmail.com> Thanks! I'll try that, I'm on 3.5 btw. On 11/8/06, Ronald Oussoren wrote: > > On Wednesday, November 08, 2006, at 09:09AM, "Chris Van Bael" wrote: > >Hi, > > > >Whatever I try, I always get a very ugly icon in my Python program. > > > >What I do: > >Open Icon Composer, click on the 128x128 field and open an 180x180 icon. > >Let it rescale it and save it as an icns file. > >In Preview this icns file looks great. > >When I make an app with py2app it's included "--iconfile childsplay.py" > >However when I startup my program, it has a very ugly icon file. > >In the .app I see that the icns file is included. > > > >I once made the app with an ugly windows icon file, but I remove > >everything before I run py2app, so that would seem strange. > >And _some_ file is included, but it is really my icon, but very fugly! > > I have fixed an icon-related issue a while back and don't know if there has been a release since then. Could you try the development version of py2app (easy_install py2app==dev)? > > Ronald > From hengist.podd at virgin.net Thu Nov 9 17:38:52 2006 From: hengist.podd at virgin.net (has) Date: Thu, 9 Nov 2006 16:38:52 +0000 Subject: [Pythonmac-SIG] problem fixing Carbon.AE/CarbonX.AE conflicts Message-ID: <827C018C-C73E-47CD-94D8-5556DD030141@virgin.net> Hi all, Trying to eliminate the conflict that occurs between Carbon.AE and CarbonX.AE when both extensions are loaded. The problem is that both extensions need to export the following functions for use by other extensions: AEDesc_New, AEDesc_NewBorrowed and AEDesc_Convert. The logical solution is to rename the CarbonX functions and have the other appscript-related extensions (PSN, OSA, OSATerminology) refer to those instead. Unfortunately, when I try to do this, all I get is a bunch of 'symbol not found' errors on import: >>> import aem Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/aeosa/aem/__init__.py", line 6, in ? from send import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/aeosa/aem/send/__init__.py", line 11, in ? import connect File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/aeosa/aem/send/connect.py", line 10, in ? import PSN ImportError: Failure linking new module: /Library/Frameworks/ Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa/aem/ send/PSN.so: Symbol not found: __AEDescX_Convert Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/aeosa/aem/send/PSN.so Expected in: dynamic lookup A py-appscript branch containing patches to _AEmodule.c and PSN.c is available here: svn checkout http://svn.macosforge.org/repository/appscript/py- appscript/branches/py-appscript-0.16.2 What am I doing wrong? I know my C's kinda ropey, but it's not usually this bad. Thanks, has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From ronaldoussoren at mac.com Thu Nov 9 17:49:35 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 9 Nov 2006 17:49:35 +0100 Subject: [Pythonmac-SIG] problem fixing Carbon.AE/CarbonX.AE conflicts In-Reply-To: <827C018C-C73E-47CD-94D8-5556DD030141@virgin.net> References: <827C018C-C73E-47CD-94D8-5556DD030141@virgin.net> Message-ID: <7AE84951-AE0E-4882-9C4B-B6998C2C3A08@mac.com> On 9 Nov 2006, at 5:38 PM, has wrote: > Hi all, > > Trying to eliminate the conflict that occurs between Carbon.AE and > CarbonX.AE when both extensions are loaded. The problem is that both > extensions need to export the following functions for use by other > extensions: AEDesc_New, AEDesc_NewBorrowed and AEDesc_Convert. > > The logical solution is to rename the CarbonX functions and have the > other appscript-related extensions (PSN, OSA, OSATerminology) refer > to those instead. Unfortunately, when I try to do this, all I get is > a bunch of 'symbol not found' errors on import: That's because there are hooks in the core interpreter for the Carbon modules. PyObjC's code contains an example of how top provide a C API to other extensions without cooperation from the Python core is to create a struct with function pointers, wrap that in a Python and extract that struct again in the other extensions. PyObjC contains an example of how to do this (the code in pyobjc-api. [hm]). 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/20061109/2b35f5b0/attachment.bin From hengist.podd at virgin.net Fri Nov 10 12:31:06 2006 From: hengist.podd at virgin.net (has) Date: Fri, 10 Nov 2006 11:31:06 +0000 Subject: [Pythonmac-SIG] problem fixing Carbon.AE/CarbonX.AE conflicts In-Reply-To: <7AE84951-AE0E-4882-9C4B-B6998C2C3A08@mac.com> References: <827C018C-C73E-47CD-94D8-5556DD030141@virgin.net> <7AE84951-AE0E-4882-9C4B-B6998C2C3A08@mac.com> Message-ID: <3CAF7507-ADB1-4385-83CD-56AC08AB183B@virgin.net> On 9 Nov 2006, at 16:49, Ronald Oussoren wrote: >> Unfortunately, when I try to do this, all I get is a bunch of >> 'symbol not found' errors on import: > > That's because there are hooks in the core interpreter for the > Carbon modules. Yeah, already took a look at mactoolboxglue.c, but it was all hardwired and didn't really help. I think there must be other stuff going on as well. > PyObjC's code contains an example of how top provide a C API to > other extensions without cooperation from the Python core is to > create a struct with function pointers, wrap that in a Python and > extract that struct again in the other extensions. OK, will use that approach. Many thanks, has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From mish.patel at yahoo.ca Sat Nov 11 04:59:47 2006 From: mish.patel at yahoo.ca (Amish Patel) Date: Fri, 10 Nov 2006 22:59:47 -0500 (EST) Subject: [Pythonmac-SIG] Build of App Sucessfull, Crashes on Run....Only on my intel machine! Message-ID: <20061111035947.51180.qmail@web58405.mail.re3.yahoo.com> Hey everyone, new to the list, but boy do i need your help. I have been working on a Powerbook G4, i had created my python based app in xcode, and have been working on it for a while with no problems what so ever. I just got a MacBookPro Core 2, and well this is the story: 1. I installed pythonmac 2.4.4 and pyobjc (1.4 installer - Universal), 2. I had to change the #! for the the n2 2.4 location -- after this stage the project finally compiled. 3. When i attempt to Build&Run my app this is what happneds. In my nib file i have a progress indicator outlet defined, and this object has a corresponding variable in my code. Upon execution of this code the following appears: 'NoneType' object has no attribute 'startAnimation_' Now this occurs for basically ALL Cocoa variables and calls; They are for some reason None "objects", when they should not be. Is there something that I am doing to cause these errors. Because the same project builds and runs fine on my Powerbook. Any help. Amish Patel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061110/fbdde632/attachment.html From bthom at cs.hmc.edu Sat Nov 11 05:16:15 2006 From: bthom at cs.hmc.edu (belinda thom) Date: Fri, 10 Nov 2006 20:16:15 -0800 Subject: [Pythonmac-SIG] SWIG / macports python24 question Message-ID: <94DE0E82-BFE0-4EB7-84DC-B9B4858D4BA5@cs.hmc.edu> Hello, I'm installing SWIG on OS X 10.4.8. Following the instructions in the README seem to work. My question is this. SWIG's configure script by default uses the Python delivered w/10.4 (2.3.5). I plan to use SWIG in the context of macports python24. Is this going to be a problem, and if so, what's the solution? Thanks, --b From Jack.Jansen at cwi.nl Sat Nov 11 22:14:33 2006 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sat, 11 Nov 2006 22:14:33 +0100 Subject: [Pythonmac-SIG] problem fixing Carbon.AE/CarbonX.AE conflicts In-Reply-To: <3CAF7507-ADB1-4385-83CD-56AC08AB183B@virgin.net> References: <827C018C-C73E-47CD-94D8-5556DD030141@virgin.net> <7AE84951-AE0E-4882-9C4B-B6998C2C3A08@mac.com> <3CAF7507-ADB1-4385-83CD-56AC08AB183B@virgin.net> Message-ID: On 10-Nov-2006, at 12:31 , has wrote: > On 9 Nov 2006, at 16:49, Ronald Oussoren wrote: > >>> Unfortunately, when I try to do this, all I get is a bunch of >>> 'symbol not found' errors on import: >> >> That's because there are hooks in the core interpreter for the >> Carbon modules. > > Yeah, already took a look at mactoolboxglue.c, but it was all > hardwired and didn't really help. I think there must be other stuff > going on as well. Not really: the hooks are only there because at the time I wrote it I thought the export-via-python a bit too much of a hack. But since then everyone is doing it, and with cobject it can actually be done in a pretty safe way, so I would use something like that nowadays. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061111/9c42d1b0/attachment.htm -------------- 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/20061111/9c42d1b0/attachment.bin From Jonathan.Peirce at nottingham.ac.uk Sun Nov 12 14:56:22 2006 From: Jonathan.Peirce at nottingham.ac.uk (Jon Peirce) Date: Sun, 12 Nov 2006 13:56:22 +0000 Subject: [Pythonmac-SIG] scipy.optimize Message-ID: <45572806.2090707@psychology.nottingham.ac.uk> I've tried installing numpy(1.0) and scipy(0.51) from Bob's repository of universal installers http://pythonmac.org/packages/py24-fat/index.html Most of the libs seem to work fine but I can't import optimize from scipy. On a PPC running python 2.4, OS X 10.4.8 I get the error message: > >>>from scipy import optimize > Traceback (most recent call last): > File "", line 1, in ? > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/optimize/__init__.py", line 7, in ? > from optimize import * > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/optimize/optimize.py", line 25, in ? > import linesearch > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/optimize/linesearch.py", line 3, in ? > import minpack2 > ImportError: Failure linking new module: /Library/Frameworks/ > Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/ > optimize/minpack2.so: Symbol not found: _sprintf$LDBLStub > Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/ > lib/python2.4/site-packages/scipy/optimize/minpack2.so > Expected in: dynamic lookup On an Intel Mac I get (the slightly different): > > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/optimize/__init__.py", line 7, in ? > from optimize import * > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/optimize/optimize.py", line 25, in ? > import linesearch > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/site-packages/scipy/optimize/linesearch.py", line 3, in ? > import minpack2 > ImportError: Inappropriate file type for dynamic loading Does anyone know why? Has minpack2 compiled incorrectly (or maybe not been recompiled)? cheers Jon This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061112/06d68948/attachment.html From rowen at cesmail.net Mon Nov 13 19:49:00 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Mon, 13 Nov 2006 10:49:00 -0800 Subject: [Pythonmac-SIG] bdist_mpkg question: getting pytz included with matplotlib Message-ID: I've been trying to build a proper matplotlib Mac binary with bdist_mpkg (from the command line) and thought I finally had it until I realized it was missing pytz. Any hints on how to get this included? FYI: in the resulting package there is a directory matplotlib-0.87.7-py2.5.egg-info In the files in that directory, pytz is listed in SOURCES.txt but not in top_level.txt and the pytz source is missing from the package. -- Russell From rowen at cesmail.net Mon Nov 13 20:56:42 2006 From: rowen at cesmail.net (Russell E. Owen) Date: Mon, 13 Nov 2006 11:56:42 -0800 Subject: [Pythonmac-SIG] bdist_mpkg question: getting pytz included with matplotlib References: Message-ID: In article , "Russell E. Owen" wrote: > I've been trying to build a proper matplotlib Mac binary with bdist_mpkg > (from the command line) and thought I finally had it until I realized > it was missing pytz. Any hints on how to get this included? > > FYI: in the resulting package there is a directory > matplotlib-0.87.7-py2.5.egg-info > In the files in that directory, pytz is listed in > SOURCES.txt > but not in > top_level.txt > and the pytz source is missing from the package. Sorry to follow up my own posting, but I found one way to do it: modify matplotlib's setup.py file to always install dateutil and pytz. It turns out normally only installs them if a version doesn't already exist. This points up a weakness in trying to package matplotlib: the naive installer will always overwrite dateutil and pytz. I suppose a script could be written that will only install them if not present, or if newer or...something. I'm not likely to bother. Perhaps this is a case for installing matplotlib using easy_install instead. However, compiling matplotlib takes a very long time on some machines (such as my G4 laptop). -- Russell From bob at redivi.com Mon Nov 13 21:24:46 2006 From: bob at redivi.com (Bob Ippolito) Date: Mon, 13 Nov 2006 12:24:46 -0800 Subject: [Pythonmac-SIG] bdist_mpkg question: getting pytz included with matplotlib In-Reply-To: References: Message-ID: <6a36e7290611131224o5cd1d886p3bc63bab7c9921e1@mail.gmail.com> On 11/13/06, Russell E. Owen wrote: > In article , > "Russell E. Owen" wrote: > > > I've been trying to build a proper matplotlib Mac binary with bdist_mpkg > > (from the command line) and thought I finally had it until I realized > > it was missing pytz. Any hints on how to get this included? > > > > FYI: in the resulting package there is a directory > > matplotlib-0.87.7-py2.5.egg-info > > In the files in that directory, pytz is listed in > > SOURCES.txt > > but not in > > top_level.txt > > and the pytz source is missing from the package. > > Sorry to follow up my own posting, but I found one way to do it: > > modify matplotlib's setup.py file to always install dateutil and pytz. > It turns out normally only installs them if a version doesn't already > exist. > > This points up a weakness in trying to package matplotlib: the naive > installer will always overwrite dateutil and pytz. I suppose a script > could be written that will only install them if not present, or if newer > or...something. I'm not likely to bother. docutils does (or at least it did) something similarly stupid. > Perhaps this is a case for installing matplotlib using easy_install > instead. However, compiling matplotlib takes a very long time on some > machines (such as my G4 laptop). Is that relevant? People (that have an iota of Terminal skills) can install binary eggs just as easily as than they can install binary .mpkg distributions. -bob From David.L.Goldsmith at noaa.gov Mon Nov 13 22:31:25 2006 From: David.L.Goldsmith at noaa.gov (David L Goldsmith) Date: Mon, 13 Nov 2006 13:31:25 -0800 Subject: [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) Message-ID: <4558E42D.8090200@noaa.gov> Hi! I'm experiencing a problem with scipy; its install notes say that it is not yet fully compatible with OSX and further say that in OSX one should ensure that one's gcc selection is set to 3.3. Mine is, but I noticed that the Universal build Python binary I downloaded and am using was built w/ gcc 4.0.1. Accordingly, I suspect this might be the basis of my problem - any idea where I might obtain an OSX-compatible Python built w/ gcc 3.3? Thanks! DG -- HMRD/ORR/NOS/NOAA From robert.kern at gmail.com Mon Nov 13 23:59:20 2006 From: robert.kern at gmail.com (Robert Kern) Date: Mon, 13 Nov 2006 16:59:20 -0600 Subject: [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) In-Reply-To: <4558E42D.8090200@noaa.gov> References: <4558E42D.8090200@noaa.gov> Message-ID: David L Goldsmith wrote: > Hi! I'm experiencing a problem with scipy; its install notes say > that it is not yet fully compatible with OSX and further say that in OSX > one should ensure that one's gcc selection is set to 3.3. Mine is, but > I noticed that the Universal build Python binary I downloaded and am > using was built w/ gcc 4.0.1. Accordingly, I suspect this might be the > basis of my problem - any idea where I might obtain an OSX-compatible > Python built w/ gcc 3.3? Thanks! You can't do it. Universal binary capability was only added to gcc 4.0. You are looking at somewhat old instructions. While there are still some problems with gfortran (which only supports gcc 4.0 rather than g77 with only supports gcc 3.x), they are few and minor. Install a gfortran binary from this page: http://hpc.sourceforge.net Then build scipy using --fcompiler=gnu95 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco From ronaldoussoren at mac.com Tue Nov 14 07:49:10 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 14 Nov 2006 07:49:10 +0100 Subject: [Pythonmac-SIG] In need of an OS 10.4.8-compatible Universal binary built w/ gcc 3.3 (NOT 4.0) In-Reply-To: References: <4558E42D.8090200@noaa.gov> Message-ID: <4472C533-D982-48A1-9E98-03062CD1F8BC@mac.com> On 13 Nov 2006, at 11:59 PM, Robert Kern wrote: > David L Goldsmith wrote: >> Hi! I'm experiencing a problem with scipy; its install notes say >> that it is not yet fully compatible with OSX and further say that >> in OSX >> one should ensure that one's gcc selection is set to 3.3. Mine >> is, but >> I noticed that the Universal build Python binary I downloaded and am >> using was built w/ gcc 4.0.1. Accordingly, I suspect this might >> be the >> basis of my problem - any idea where I might obtain an OSX-compatible >> Python built w/ gcc 3.3? Thanks! > > You can't do it. Universal binary capability was only added to gcc > 4.0. > > You are looking at somewhat old instructions. While there are still > some > problems with gfortran (which only supports gcc 4.0 rather than g77 > with only > supports gcc 3.x), they are few and minor. > > Install a gfortran binary from this page: > > http://hpc.sourceforge.net > > Then build scipy using --fcompiler=gnu95 And don't forget to reset your gcc selection to 4.x. 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/20061114/4f031ea7/attachment.bin From toomim at ocf.berkeley.edu Tue Nov 14 05:37:30 2006 From: toomim at ocf.berkeley.edu (Michael Toomim) Date: Mon, 13 Nov 2006 20:37:30 -0800 Subject: [Pythonmac-SIG] Trouble with appscript install location Message-ID: I just installed the latest appscript from the installer. However, it puts the appscript python libs into /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa instead of /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/aeosa This prevented the "from appscript import *" line from working in the hello world demo script. I was able to work around the problem by symlinking everything from aeosa/ to ./ This happened with the universal installers for python 2.4 and 2.5. Is this how it's supposed to work? Am I doing something wrong? Thanks, mike From hengist.podd at virgin.net Tue Nov 14 13:03:07 2006 From: hengist.podd at virgin.net (has) Date: Tue, 14 Nov 2006 12:03:07 +0000 Subject: [Pythonmac-SIG] Trouble with appscript install location In-Reply-To: References: Message-ID: Michael Toomim wrote: > I just installed the latest appscript from the installer. However, > it puts the appscript python libs into > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ > site-packages/aeosa The appscript installer should install the following items into site- packages: aeosa/ aeosa.pth The .pth file should contain the relative path to the aeosa directory (aeosa), and Python's import mechanism should follow that path when looking for modules to import. (Py2App and PyObjC often use the same approach.) HTH has -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From berkowit at silcom.com Tue Nov 14 15:58:00 2006 From: berkowit at silcom.com (Paul Berkowitz) Date: Tue, 14 Nov 2006 06:58:00 -0800 Subject: [Pythonmac-SIG] Trouble with appscript install location In-Reply-To: Message-ID: On 11/13/06 8:37 PM, "Michael Toomim" wrote: > I just installed the latest appscript from the installer. However, it > puts the appscript python libs into > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ > aeosa > > instead of > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ > aeosa I've been staring at those two paths now for several minutes, and I can't see a difference. What's the difference? -- Paul Berkowitz From bob at redivi.com Tue Nov 14 19:29:14 2006 From: bob at redivi.com (Bob Ippolito) Date: Tue, 14 Nov 2006 10:29:14 -0800 Subject: [Pythonmac-SIG] Trouble with appscript install location In-Reply-To: References: Message-ID: <6a36e7290611141029j6414deaele5390e2d5056aa70@mail.gmail.com> On 11/14/06, Paul Berkowitz wrote: > On 11/13/06 8:37 PM, "Michael Toomim" wrote: > > > I just installed the latest appscript from the installer. However, it > > puts the appscript python libs into > > > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ > > aeosa > > > > instead of > > > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ > > aeosa > > I've been staring at those two paths now for several minutes, and I can't > see a difference. What's the difference? One is below the other. -bob From Chris.Barker at noaa.gov Tue Nov 14 20:20:47 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 14 Nov 2006 11:20:47 -0800 Subject: [Pythonmac-SIG] bdist_mpkg question: getting pytz included with matplotlib In-Reply-To: References: Message-ID: <455A170F.6050100@noaa.gov> Russell E. Owen wrote: > Sorry to follow up my own posting, but I found one way to do it: > > modify matplotlib's setup.py file to always install dateutil and pytz. > It turns out normally only installs them if a version doesn't already > exist. I think it's a better idea to build mpkgs of dateutil and pytz, and put those up on pythonmac also. MPL is a library, not a complete, stand alone system, it's OK for it to have dependencies, as long as there is an easy way to find and install them. > Perhaps this is a case for installing matplotlib using easy_install > instead. eggs do have their advantages. I'd still like to see some (even very minimal) GUI way to install eggs, but until then, it's not that big deal to install them from the command line. We could certainly put binary eggs up on pythonmac too. -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 Tue Nov 14 21:01:37 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 14 Nov 2006 12:01:37 -0800 Subject: [Pythonmac-SIG] bdist_mpkg question: getting pytz included with matplotlib In-Reply-To: References: <455A170F.6050100@noaa.gov> Message-ID: <455A20A1.5020105@noaa.gov> Russell E Owen wrote: >> I've never tried to create a binary egg > (though I know how in principal). I'm wondering if there are any > gotchas? I'm guessing I'll at least have to modify or create my own > setup.py file in many cases -- depending on how many changes are > required, that could be a disincentive (though if the original packagers > are willing to make their setup.py file egg-friendly, the work could at > least be only done once). Charlie Moad has built binary eggs of MPL in the past, so it may be all set up already. -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 rowen at cesmail.net Tue Nov 14 20:50:01 2006 From: rowen at cesmail.net (Russell E Owen) Date: Tue, 14 Nov 2006 11:50:01 -0800 Subject: [Pythonmac-SIG] bdist_mpkg question: getting pytz included with matplotlib In-Reply-To: <455A170F.6050100@noaa.gov> References: <455A170F.6050100@noaa.gov> Message-ID: At 11:20 AM -0800 2006-11-14, Christopher Barker wrote: >Russell E. Owen wrote: >>Sorry to follow up my own posting, but I found one way to do it: >> >>modify matplotlib's setup.py file to always install dateutil and >>pytz. It turns out normally only installs them if a version doesn't >>already exist. > >I think it's a better idea to build mpkgs of dateutil and pytz, and >put those up on pythonmac also. MPL is a library, not a complete, >stand alone system, it's OK for it to have dependencies, as long as >there is an easy way to find and install them. I like this idea. >>Perhaps this is a case for installing matplotlib using easy_install instead. > >eggs do have their advantages. I'd still like to see some (even very >minimal) GUI way to install eggs, but until then, it's not that big >deal to install them from the command line. > >We could certainly put binary eggs up on pythonmac too. It's an interesting idea. I've never tried to create a binary egg (though I know how in principal). I'm wondering if there are any gotchas? I'm guessing I'll at least have to modify or create my own setup.py file in many cases -- depending on how many changes are required, that could be a disincentive (though if the original packagers are willing to make their setup.py file egg-friendly, the work could at least be only done once). -- Russell From toomim at ocf.berkeley.edu Wed Nov 15 03:09:27 2006 From: toomim at ocf.berkeley.edu (Michael Toomim) Date: Tue, 14 Nov 2006 18:09:27 -0800 Subject: [Pythonmac-SIG] Trouble with appscript install location In-Reply-To: References: Message-ID: <455A76D7.1060303@ocf.berkeley.edu> Paul Berkowitz wrote: > On 11/13/06 8:37 PM, "Michael Toomim" wrote: > >> I just installed the latest appscript from the installer. However, it >> puts the appscript python libs into >> >> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ >> aeosa >> >> instead of >> >> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ >> aeosa > > I've been staring at those two paths now for several minutes, and I can't > see a difference. What's the difference? Oh sorry, the second path should say: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ ...without the aeosa at the end. From toomim at ocf.berkeley.edu Wed Nov 15 03:26:17 2006 From: toomim at ocf.berkeley.edu (Michael Toomim) Date: Tue, 14 Nov 2006 18:26:17 -0800 Subject: [Pythonmac-SIG] Trouble with appscript install location In-Reply-To: References: Message-ID: has wrote: > The appscript installer should install the following items into site- > packages: > > aeosa/ > aeosa.pth > > The .pth file should contain the relative path to the aeosa directory > (aeosa), and Python's import mechanism should follow that path when > looking for modules to import. (Py2App and PyObjC often use the same > approach.) Hm, well I guess the .pth file didn't work on my machine for some reason. Also FWIW the uninstaller readme and script don't mention the aeosa/ directory; they assume the files are in site-packages/. From toomim at ocf.berkeley.edu Wed Nov 15 03:36:14 2006 From: toomim at ocf.berkeley.edu (Michael Toomim) Date: Tue, 14 Nov 2006 18:36:14 -0800 Subject: [Pythonmac-SIG] Trouble with appscript install location In-Reply-To: References: Message-ID: Michael Toomim wrote: > Hm, well I guess the .pth file didn't work on my machine for some reason. After some more debugging, I think the problem might have been that my python2.4 is installed from fink, which has its own site-packages directory in /sw. Thanks for the help! From hengist.podd at virgin.net Wed Nov 15 15:30:52 2006 From: hengist.podd at virgin.net (has) Date: Wed, 15 Nov 2006 14:30:52 +0000 Subject: [Pythonmac-SIG] Trouble with appscript install location In-Reply-To: References: Message-ID: Michael Toomim wrote: > Also FWIW the uninstaller readme and script don't mention the > aeosa/ directory; they assume the files are in site-packages/. The uninstaller is for removing older appscript versions before installing the latest one. If you need to remove the current version, you'll have to do it manually. > After some more debugging, I think the problem might have been that > my python2.4 is installed from fink, which has its own site- > packages directory in /sw. Yep, the binary installer is intended for the Python.framework build only. Fink and DarwinPorts/MacPorts do their own thing, so you'll need to install appscript through those (if they have it) or else by building it from source [1]. (I've added a note to the installer readme to make this clearer in future.) HTH has [1] Latest version in svn avoids raising an ImportError if bdist_mpkg isn't installed: svn checkout http://svn.macosforge.org/repository/appscript/py- appscript/trunk -- http://freespace.virgin.net/hamish.sanderson/ http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From spencer.crissman at gmail.com Thu Nov 16 13:50:54 2006 From: spencer.crissman at gmail.com (Spencer Crissman) Date: Thu, 16 Nov 2006 07:50:54 -0500 Subject: [Pythonmac-SIG] Using PyGame from Eclipse w/ PyDev, Cocoa Errors Message-ID: <8518d4f50611160450s7e54ff75xb949a2c7296c2aac@mail.gmail.com> I've started trying to use pygame under os x. When I develop w/ python under windows, I use Eclipse + PyDev as my dev environment, so I am trying to get the same thing working here, and have been successful for python development on osx in general. However, in trying to use pygame, I have run into a snag. The environment comes up and runs fine, but when I attempt to run the script within the IDE, I get a ton of errors, of the form: 2006-11-16 07:36:49.700 python[1393] *** _NSAutoreleaseNoPool(): Object 0x394db0 of class NSCFString autoreleased with no pool in place - just leaking 2006-11-16 07:36:49.700 python[1393] *** _NSAutoreleaseNoPool(): Object 0x3971a0 of class NSException autoreleased with no pool in place - just leaking 2006-11-16 07:36:49.702 python[1393] *** Uncaught exception: Error (1002) creating CGSWindow If I run this same script from the command line, the entire thing works fine. This is my first pygame project, so I am largely using a simple example I found online which ought to work. I can post the script if needed, but think perhaps the above error message will be enough to find the error if someone is familiar with it. I will say that in searching the mailing list, someone else had a similar error message once, which they resolved by calling pygame.init() instead of initializing the modules manually. I do call pygame.init() right off the bat in this script, so I don't think that is the solution. Relevant info: OS X 10.3.9 Python 2.4 PyGame 1.8.0 PyObjC 1.4 Thanks for any pointers. Spencer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061116/8f5b340e/attachment.htm From Teemu.Rinne at helsinki.fi Thu Nov 16 23:19:18 2006 From: Teemu.Rinne at helsinki.fi (Teemu Rinne) Date: Fri, 17 Nov 2006 00:19:18 +0200 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 Message-ID: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> Hi, Installing python stuff on a new Intel Mac Pro 2.66 was a pleasure this time (not always so in the past...). Pythonmac.org/packages are great! However, there is something wrong with my installation/use of scipy/numpy: Python 2.4.4 (#1, Oct 18 2006, 10:34:39) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> #this works on my older installations >>> import matplotlib >>> matplotlib.use("TkAgg") >>> from pylab import * >>> from scipy import signal RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/signal/__init__.py", line 7, in ? import sigtools ImportError: numpy.core.multiarray failed to import That is, I have an out-of-box Mac and all the packages are downloaded from Pythonmac.org/packages. What am I missing? Is the current scipy package somehow incompatible with the other packages? How do I get scipy working too? Cheers, Teemu Rinne Dept Psychology Univ Helsinki From livingstonemark at gmail.com Fri Nov 17 03:48:35 2006 From: livingstonemark at gmail.com (Mark Livingstone) Date: Fri, 17 Nov 2006 12:48:35 +1000 Subject: [Pythonmac-SIG] Is there a Python 2.5 Framework? Message-ID: Hi Guys, I want to develop with wxPython. To do so natively (ie without going via X11 / GTK) it says you need to use a Framework version of Python. I have googled but not yet found what I seek. Does anyone know if a Framework 2.5 Python does exist and where? TIA MarkL From kw at codebykevin.com Fri Nov 17 03:50:24 2006 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 16 Nov 2006 21:50:24 -0500 Subject: [Pythonmac-SIG] Is there a Python 2.5 Framework? In-Reply-To: References: Message-ID: <455D2370.70208@codebykevin.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark Livingstone wrote: > Hi Guys, > > I want to develop with wxPython. To do so natively (ie without going > via X11 / GTK) it says you need to use a Framework version of Python. > > I have googled but not yet found what I seek. Does anyone know if a > Framework 2.5 Python does exist and where? > > TIA > > MarkL > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > Download the Mac OS X version of Python 2.5 from python.org. - -- 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 iD8DBQFFXSNvEsLm8HXyq4sRAkHvAJ4lbuSUMq6czjJS2cbKVmTsJu4DcwCeJD9f fHY0LXvMtTTBYWzfNMpWvm4= =uWbQ -----END PGP SIGNATURE----- From ap_en_dicky at hotmail.com Wed Nov 15 20:00:13 2006 From: ap_en_dicky at hotmail.com (Ap en Dicky Martens) Date: Wed, 15 Nov 2006 20:00:13 +0100 Subject: [Pythonmac-SIG] Steps needed to get cvs2svn working on Panther Message-ID: Roden 15-11-2006 Geachte Heer Wierda. In verband met de schoolre?nie van de basisschool ?de Haven? te Roden in Drenthe zijn wij op zoek naar een zekere Gerben Wierda, geb. 30-4-1961. Mocht u degene zijn die wij zoeken, of kent u deze persoon, zou u dan ons zijn adres willen doorgeven zodat wij een uitnodiging kunnen sturen voor de re?nie op 6-10-2007? Er is een website adres namelijk: www.cbsdehaven100.nl waar u de gegevens naar toe kunt sturen. Mocht u niet degene zijn die wij zoeken dan spijt het ons dat wij u hebben lastig gevallen. Bij voorbaat dank namens de organisatiecommissie. Dicky Martens ? Roffel. Tel 050-15769. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061115/c11a1b44/attachment.htm From toddthal at lanl.gov Wed Nov 15 20:32:43 2006 From: toddthal at lanl.gov (Todd Thal) Date: Wed, 15 Nov 2006 12:32:43 -0700 Subject: [Pythonmac-SIG] Does anyone on the planet know how to build python-2.5 (WITH READLINE)? References: 20060627143827.45945.qmail@web52303.mail.yahoo.com Message-ID: <455B6B5B.5020208@lanl.gov> I am having one "hades" of a heckuva time getting readline support for Python-2.5 on a Mac OS 10.4.8.8.0 with Xcode 2.3( Darwin Kernel Version 8.8.0; RELEASE_PPC Power Macintosh powerpc) I can get readline-5.2 (finally) to compile and build... Then I try build Python-2.5, with readline....by changing the /Modules/Setup file...to include readline... and I always get the below-mentioned error. I can NOT use the std' packages/path...as we use an absolute path for our server farm called, "/usr/lanl" EG /usr/lanl/packages <- where python/scipy/numpy/readline src has gone. /usr/lanl/bin /usr/lanl/include /usr/lanl/lib /usr/lanl/man This has been an EXTREME challenge on Mac 10.4 t. NOTE: I attempted to copy all files (esp *.o) over to my Python build dir, and it still fails...the following error, was the error before doing that... Here is the error: gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -c ./Modules/readline.c -o Modules/readline.o Modules/readline.c: In function `write_history_file': Modules/readline.c:118: warning: implicit declaration of function `history_truncate_file' Modules/readline.c: In function `py_remove_history': Modules/readline.c:307: warning: implicit declaration of function `remove_history' Modules/readline.c:307: warning: assignment makes pointer from integer without a cast Modules/readline.c:316: warning: passing arg 1 of `free' discards qualifiers from pointer target type Modules/readline.c:318: warning: passing arg 1 of `free' discards qualifiers from pointer target type Modules/readline.c: In function `py_replace_history': Modules/readline.c:344: warning: implicit declaration of function `replace_history_entry' Modules/readline.c:344: warning: assignment makes pointer from integer without a cast Modules/readline.c:353: warning: passing arg 1 of `free' discards qualifiers from pointer target type Modules/readline.c:355: warning: passing arg 1 of `free' discards qualifiers from pointer target type Modules/readline.c: In function `get_current_history_length': Modules/readline.c:459: error: `HISTORY_STATE' undeclared (first use in this function) Modules/readline.c:459: error: (Each undeclared identifier is reported only once Modules/readline.c:459: error: for each function it appears in.) Modules/readline.c:459: error: `hist_st' undeclared (first use in this function) Modules/readline.c:461: warning: implicit declaration of function `history_get_history_state' Modules/readline.c: In function `insert_text': Modules/readline.c:509: warning: implicit declaration of function `rl_insert_text' Modules/readline.c: In function `on_completion': Modules/readline.c:643: error: `rl_attempted_completion_over' undeclared (first use in this function) Modules/readline.c: In function `flex_complete': Modules/readline.c:681: warning: passing arg 2 of `completion_matches' from incompatible pointer type Modules/readline.c: In function `setup_readline': Modules/readline.c:706: warning: passing arg 2 of `rl_bind_key_in_map' from incompatible pointer type Modules/readline.c:707: warning: passing arg 2 of `rl_bind_key_in_map' from incompatible pointer type Modules/readline.c: In function `readline_until_enter_or_signal': Modules/readline.c:761: warning: passing arg 2 of `rl_callback_handler_install' from incompatible pointer type Modules/readline.c:791: warning: implicit declaration of function `rl_free_line_state' Modules/readline.c:792: warning: implicit declaration of function `rl_cleanup_after_signal' Modules/readline.c: In function `call_readline': Modules/readline.c:888: error: `HISTORY_STATE' undeclared (first use in this function) Modules/readline.c:888: error: `state' undeclared (first use in this function) Modules/readline.c:890: warning: assignment discards qualifiers from pointer target type make: *** [Modules/readline.o] Error 1 From vip at avatar.com.au Fri Nov 17 05:14:41 2006 From: vip at avatar.com.au (David Worrall) Date: Fri, 17 Nov 2006 15:14:41 +1100 Subject: [Pythonmac-SIG] Is there a Python 2.5 Framework? In-Reply-To: <455D2370.70208@codebykevin.com> References: <455D2370.70208@codebykevin.com> Message-ID: <75A05198-7A4F-4F1F-BA2E-01A29D03B034@avatar.com.au> Hey Mark! I'm doing that. Let me recommend a couple of tools: (a) PythonCard (b) wxGlade - haven't tested with Python2.5 but works w. earlier version (c) book: "wxPython in Action" excellent read, whether you use (a) or (b) good luck! David PS I have no affiliations that would allow me to benefit from these recommendations. On 17/11/2006, at 1:50 PM, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Mark Livingstone wrote: >> Hi Guys, >> >> I want to develop with wxPython. To do so natively (ie without going >> via X11 / GTK) it says you need to use a Framework version of Python. >> >> I have googled but not yet found what I seek. Does anyone know if a >> Framework 2.5 Python does exist and where? >> >> TIA >> >> MarkL >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> > Download the Mac OS X version of Python 2.5 from python.org. > > - -- > 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 > > iD8DBQFFXSNvEsLm8HXyq4sRAkHvAJ4lbuSUMq6czjJS2cbKVmTsJu4DcwCeJD9f > fHY0LXvMtTTBYWzfNMpWvm4= > =uWbQ > -----END PGP SIGNATURE----- > _______________________________________________ > 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 Fri Nov 17 23:09:13 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 17 Nov 2006 23:09:13 +0100 Subject: [Pythonmac-SIG] Does anyone on the planet know how to build python-2.5 (WITH READLINE)? In-Reply-To: <455B6B5B.5020208@lanl.gov> References: <20060627143827.45945.qmail@web52303.mail.yahoo.com> <455B6B5B.5020208@lanl.gov> Message-ID: <80F1CE69-9255-42D8-A060-486E316A9341@mac.com> On 15 Nov 2006, at 8:32 PM, Todd Thal wrote: > I am having one "hades" of a heckuva time getting readline support for > Python-2.5 on a Mac OS 10.4.8.8.0 Have you looked at Mac/BuildScript/build-installer.py in Python's source distribution? That's how the official binaries for OSX get build, includeing readline support. You probably have to add the directory containing readline to the CFLAGS and LDFLAGS when running Python's configure, AFAIK setup.py doesn't automaticly look for readline in $prefix/{lib,include}. 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/20061117/c3d4e3ef/attachment.bin From skip at pobox.com Sat Nov 18 16:34:50 2006 From: skip at pobox.com (skip at pobox.com) Date: Sat, 18 Nov 2006 09:34:50 -0600 Subject: [Pythonmac-SIG] Does anyone on the planet know how to build python-2.5 (WITH READLINE)? In-Reply-To: <80F1CE69-9255-42D8-A060-486E316A9341@mac.com> References: <20060627143827.45945.qmail@web52303.mail.yahoo.com> <455B6B5B.5020208@lanl.gov> <80F1CE69-9255-42D8-A060-486E316A9341@mac.com> Message-ID: <17759.10266.55868.445083@montanaro.dyndns.org> Ronald> You probably have to add the directory containing readline to Ronald> the CFLAGS and LDFLAGS when running Python's configure, AFAIK Ronald> setup.py doesn't automaticly look for readline in Ronald> $prefix/{lib,include}. Since readline is an extension module I think you want to specify this stuff to distutils, e.g.: % ./python.exe ../setup.py build_ext --help Common commands: (see '--help-commands' for more) setup.py build will build the package underneath 'build/' setup.py install will install the package Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message Options for 'PyBuildExt' command: --build-lib (-b) directory for compiled extension modules --build-temp (-t) directory for temporary files (build by-products) --inplace (-i) ignore build-lib and put compiled extensions into the source directory alongside your pure Python modules --include-dirs (-I) list of directories to search for header files (separated by ':') --define (-D) C preprocessor macros to define --undef (-U) C preprocessor macros to undefine --libraries (-l) external C libraries to link with --library-dirs (-L) directories to search for external C libraries (separated by ':') --rpath (-R) directories to search for shared C libraries at runtime --link-objects (-O) extra explicit link objects to include in the link ... which suggests something like ./python.exe setup.py build_ext --include-dirs=/sw/include --library-dirs=/sw/lib I have fink installed, hence the references to /sw/... As proof for the OP that it can be done: % python Python 2.6a0 (trunk:52571, Oct 31 2006, 20:49:22) [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import readline >>> readline.__file__ '/Users/skip/local/lib/python2.6/lib-dynload/readline.so' % otool -L /Users/skip/local/lib/python2.6/lib-dynload/readline.so /Users/skip/local/lib/python2.6/lib-dynload/readline.so: /sw/lib/libreadline.4.dylib (compatibility version 4.2.0, current version 4.3.0) /sw/lib/ncurses/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 93.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.7) Skip From ronaldoussoren at mac.com Sat Nov 18 16:42:07 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sat, 18 Nov 2006 16:42:07 +0100 Subject: [Pythonmac-SIG] Does anyone on the planet know how to build python-2.5 (WITH READLINE)? In-Reply-To: <17759.10266.55868.445083@montanaro.dyndns.org> References: <20060627143827.45945.qmail@web52303.mail.yahoo.com> <455B6B5B.5020208@lanl.gov> <80F1CE69-9255-42D8-A060-486E316A9341@mac.com> <17759.10266.55868.445083@montanaro.dyndns.org> Message-ID: <563A1842-1DC9-4F00-A349-38035C4B43DA@mac.com> On 18 Nov 2006, at 4:34 PM, skip at pobox.com wrote: > > Ronald> You probably have to add the directory containing > readline to > Ronald> the CFLAGS and LDFLAGS when running Python's configure, > AFAIK > Ronald> setup.py doesn't automaticly look for readline in > Ronald> $prefix/{lib,include}. > > Since readline is an extension module I think you want to specify > this stuff > to distutils, e.g.: Changing the CFLAGS/LDFLAGS at configure time works to (at least on darwin/OSX systems). I applied a patch to that effect in 2.4 and 2.5 because I got mightily annoyed with this. Before my patch you could specify other CFLAGS/LDFLAGS as much as you liked, but the autodetect code in setup.py would never use that. With my patch the include and library directories in those variablese are used to autodetect readline and other libraries. The reason this is only done on OSX is that I never got around to asking on python-dev if this behaviour is useful on other platforms as well (IMHO it is, and the code should work at least on Linux and other GCC-using platforms). 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/20061118/975d4b4c/attachment.bin From scottrharris at gmail.com Sat Nov 18 23:27:08 2006 From: scottrharris at gmail.com (Scott Harris) Date: Sat, 18 Nov 2006 15:27:08 -0700 Subject: [Pythonmac-SIG] Lost among multiple Python version on my mac Message-ID: <78750E2E-237D-47A0-B6F5-18914BCD9877@gmail.com> I've unintentionally set my /usr/bin/python to a new version instead of the original version on OS X 10.4. Is it normally a link to the python in /System/Library/Frameworks/Python.framework/? Also, what's the "best" way to deal with multiple versions on Python on one mac? The binary downloads of 2.4 and 2.4 go in /Library/ Frameworks, but the versions I build from source go into /usr/local/. I've gotten things a bit mucked up on my machine and I'm looking for strategies to get back to a clean state and then keep things organized. I've also got PyObjC on my machine and some of my XCode project still use Python2.3 even after I got Python2.5 and PyObjC working form the shell. Do the XCode PyObjC templates look elsewhere to determine what Python to use? I couldn't figure out when I was poking around late last night. Ideas? Pointers? Strategies? Thanks, -Scott From piet at cs.uu.nl Sun Nov 19 16:09:36 2006 From: piet at cs.uu.nl (Piet van Oostrum) Date: Sun, 19 Nov 2006 16:09:36 +0100 Subject: [Pythonmac-SIG] Lost among multiple Python version on my mac In-Reply-To: <78750E2E-237D-47A0-B6F5-18914BCD9877@gmail.com> References: <78750E2E-237D-47A0-B6F5-18914BCD9877@gmail.com> Message-ID: >>>>> Scott Harris (SH) wrote: >SH> I've unintentionally set my /usr/bin/python to a new version instead >SH> of the original version on OS X 10.4. Is it normally a link to the >SH> python in /System/Library/Frameworks/Python.framework/? /usr/bin: wildcard python* lrwxr-xr-x 1 root wheel 9 Oct 20 2005 python -> python2.3 lrwxr-xr-x 1 root wheel 72 Oct 20 2005 python2.3 -> ../../System/Library/Frameworks/Python.framework/Versions/2.3/bin/python lrwxr-xr-x 1 root wheel 10 Oct 20 2005 pythonw -> pythonw2.3 -rwxr-xr-x 1 root wheel 13728 Mar 21 2005 pythonw2.3 >SH> Also, what's the "best" way to deal with multiple versions on Python >SH> on one mac? The binary downloads of 2.4 and 2.4 go in /Library/ >SH> Frameworks, but the versions I build from source go into /usr/local/. /Library/Frameworks is the way to go, and you can make symlinks from /usr/local/bin. To make from source: MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework make sudo make frameworkinstall -- Piet van Oostrum URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: piet at vanoostrum.org From vip at avatar.com.au Mon Nov 20 11:54:24 2006 From: vip at avatar.com.au (David Worrall) Date: Mon, 20 Nov 2006 21:54:24 +1100 Subject: [Pythonmac-SIG] Lost among multiple Python version on my mac In-Reply-To: References: <78750E2E-237D-47A0-B6F5-18914BCD9877@gmail.com> Message-ID: <4919E859-66FF-4995-94C4-620A723545F6@avatar.com.au> Hi Scott, I regularly use 3 different versions of python. here's how. for command-line work: /usr/bin/python is the OS version /usr/local/bin/python is my next choice I have both of these in the shell's $PYTHONPATH variable for (non-command-line) MacPythons, ie through IDLE etc, notice that /System/Library/Frameworks/Python.framework/Versions/Current is a symbolic link to a specific framework version of python you can put other versions in the /System/Library/Frameworks/ Python.framework/Versions/ directory and then change the symbolic link (ln -s) of Current to whatever version you want. And/or add to (or make) the .MacOSX/environment.plist file in your home directory: to contain this: CTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";> PYTHONPATH /usr/bin/python and that will be picked up by the IDE you load. ... Change/add to at will..... At least that's how I do it. There's probably someone on this list who'll have a more sophisticated way, but quick&dirty gets the job done! :-) hope this helps, David On 20/11/2006, at 2:09 AM, Piet van Oostrum wrote: >>>>>> Scott Harris (SH) wrote: > >> SH> I've unintentionally set my /usr/bin/python to a new version >> instead >> SH> of the original version on OS X 10.4. Is it normally a link to >> the >> SH> python in /System/Library/Frameworks/Python.framework/? > > /usr/bin: > wildcard python* > lrwxr-xr-x 1 root wheel 9 Oct 20 2005 python -> python2.3 > lrwxr-xr-x 1 root wheel 72 Oct 20 2005 python2.3 -> ../../ > System/Library/Frameworks/Python.framework/Versions/2.3/bin/python > lrwxr-xr-x 1 root wheel 10 Oct 20 2005 pythonw -> pythonw2.3 > -rwxr-xr-x 1 root wheel 13728 Mar 21 2005 pythonw2.3 > >> SH> Also, what's the "best" way to deal with multiple versions on >> Python >> SH> on one mac? The binary downloads of 2.4 and 2.4 go in /Library/ >> SH> Frameworks, but the versions I build from source go into /usr/ >> local/. > > /Library/Frameworks is the way to go, and you can make symlinks from > /usr/local/bin. > > To make from source: > > > MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework > make > sudo make frameworkinstall > > > -- > Piet van Oostrum > URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] > Private email: piet at vanoostrum.org > _______________________________________________ > 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 Mon Nov 20 11:59:35 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 20 Nov 2006 02:59:35 -0800 Subject: [Pythonmac-SIG] Lost among multiple Python version on my mac In-Reply-To: <4919E859-66FF-4995-94C4-620A723545F6@avatar.com.au> References: <78750E2E-237D-47A0-B6F5-18914BCD9877@gmail.com> <4919E859-66FF-4995-94C4-620A723545F6@avatar.com.au> Message-ID: <6DC3AC03-010F-1000-9D9E-5D5DE1FE393C-Webmail-10012@mac.com> David, There is one problem with your solution: PYTHONPATH doesn't do what you seem to think it does. PYTHONPATH is a list of directories that are added to the python search path (aka sys.path). If you want multiple versions of python on your shell search path you should change PATH, not PYTHONPATH. Ronald On Monday, November 20, 2006, at 11:55AM, "David Worrall" wrote: >Hi Scott, I regularly use 3 different versions of python. here's how. >for command-line work: > >/usr/bin/python is the OS version >/usr/local/bin/python is my next choice > >I have both of these in the shell's $PYTHONPATH variable > >for (non-command-line) MacPythons, ie through IDLE etc, notice that >/System/Library/Frameworks/Python.framework/Versions/Current is a >symbolic link to a specific framework version of python >you can put other versions in the /System/Library/Frameworks/ >Python.framework/Versions/ directory >and then change the symbolic link (ln -s) of Current to whatever >version you want. >And/or add to (or make) the .MacOSX/environment.plist file in your >home directory: >to contain this: > >CTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" >"http://www.apple.com/DTDs/PropertyList-1.0.dtd";> > > > PYTHONPATH > /usr/bin/python > > > >and that will be picked up by the IDE you load. >... Change/add to at will..... > >At least that's how I do it. There's probably someone on this list >who'll have a more sophisticated way, but quick&dirty gets the job >done! :-) > >hope this helps, > >David > >On 20/11/2006, at 2:09 AM, Piet van Oostrum wrote: > >>>>>>> Scott Harris (SH) wrote: >> >>> SH> I've unintentionally set my /usr/bin/python to a new version >>> instead >>> SH> of the original version on OS X 10.4. Is it normally a link to >>> the >>> SH> python in /System/Library/Frameworks/Python.framework/? >> >> /usr/bin: >> wildcard python* >> lrwxr-xr-x 1 root wheel 9 Oct 20 2005 python -> python2.3 >> lrwxr-xr-x 1 root wheel 72 Oct 20 2005 python2.3 -> ../../ >> System/Library/Frameworks/Python.framework/Versions/2.3/bin/python >> lrwxr-xr-x 1 root wheel 10 Oct 20 2005 pythonw -> pythonw2.3 >> -rwxr-xr-x 1 root wheel 13728 Mar 21 2005 pythonw2.3 >> >>> SH> Also, what's the "best" way to deal with multiple versions on >>> Python >>> SH> on one mac? The binary downloads of 2.4 and 2.4 go in /Library/ >>> SH> Frameworks, but the versions I build from source go into /usr/ >>> local/. >> >> /Library/Frameworks is the way to go, and you can make symlinks from >> /usr/local/bin. >> >> To make from source: >> >> >> MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework >> make >> sudo make frameworkinstall >> >> >> -- >> Piet van Oostrum >> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] >> Private email: piet at vanoostrum.org >> _______________________________________________ >> 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 > > From Chris.Barker at noaa.gov Mon Nov 20 18:24:46 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 20 Nov 2006 09:24:46 -0800 Subject: [Pythonmac-SIG] Lost among multiple Python version on my mac In-Reply-To: <78750E2E-237D-47A0-B6F5-18914BCD9877@gmail.com> References: <78750E2E-237D-47A0-B6F5-18914BCD9877@gmail.com> Message-ID: <4561E4DE.10000@noaa.gov> Scott Harris wrote: > I've unintentionally set my /usr/bin/python to a new version instead > of the original version on OS X 10.4. Is it normally a link to the > python in /System/Library/Frameworks/Python.framework/? yes. > Also, what's the "best" way to deal with multiple versions on Python > on one mac? The binary downloads of 2.4 and 2.4 go in /Library/ > Frameworks, but the versions I build from source go into /usr/local/. > I put all the standard places on my PATH (set in ~/.profile). I also put "env" and a version number in all my #! lines. For example: /usr/bin/env python2.4 Then if I install a new python, all the existing scripts that use the old one will still work just fine. I like this also because it makes it clear what version a given program was developed for and tested on. This won't work if you want to have more than one installation of the same version of Python, for instance fink and a framework build. In that case, you'll need to use the full path. > I've gotten things a bit mucked up on my machine and I'm looking for > strategies to get back to a clean state and then keep things > organized. One thing to do is to make sure you get rid of the extraneous ones. IF you don't' need fink, for instance -- get rid of it! > I've also got PyObjC on my machine and some of my XCode project still > use Python2.3 even after I got Python2.5 and PyObjC working form the > shell. XCode, I have no idea. Ronald Oussoren wrote: > PYTHONPATH is a list of directories that > are added to the python search path (aka sys.path). exactly, and I think there is only one PYTHONPATH, so if you put paths for multiple versions of pythons in it, then you could get problems with a given version of Python finding modules built for a different version. If you install your Python modules in the standard locations (site-packages), then you don't need PYTHONPATH -- I've never used it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From adam.naples at yale.edu Wed Nov 22 20:49:49 2006 From: adam.naples at yale.edu (adam naples) Date: Wed, 22 Nov 2006 14:49:49 -0500 Subject: [Pythonmac-SIG] pyserial. am I using it wrong? Message-ID: <7C1E9EE1-91F6-456D-BC2C-3D2103ACEDDB@yale.edu> Hi, I'm running Tiger with a keyspan usb to serial adapter. I'm trying to get python to communicate with an eye-tracker that continually spits out coordinates everything seems fine when I import the module, but it seems like it only reads in the first 1020 lines of data when create a new serial object and then stops listening to the serial port. When I use flushInput() it empties the buffer, but then nothing comes back into it, and I can verify that the eye-tracker is still sending. the code is pretty much like this >>>import serial #make a serial object >>>ser = serial.Serial('/dev/tty.KeySerial1', 19200, timeout=1) >>> x = ser.readline() >>> x '\x82J\x00 263.0\t\r\n' #now when I flush the input, because I want the up-to-date coordinates #it empties the buffer >>> ser.flushInput() >>>ser.inWaiting() 0L >>>ser.readline() '' #I would expect that it would flush the input buffer and let me get at the most current set of coordinates, but instead I get nothing is something wrong with pyserial? am I using it wrong? if I use director(ugh) it reads the serial data just fine, and continually. any help would be great. thanks -an From Teemu.Rinne at helsinki.fi Thu Nov 23 16:03:04 2006 From: Teemu.Rinne at helsinki.fi (Teemu Rinne) Date: Thu, 23 Nov 2006 17:03:04 +0200 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 In-Reply-To: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> References: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> Message-ID: Hi, In my test below , I got "RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009" after "from scipy import signal". Is this because (1) scipy (or one of the other packages) is not up to date with the others or (2) I do something wrong? I have an out-of-box Mac Pro with OS X 10 .4.7. -- Teemu --On perjantai 17. marraskuu 2006 00:19 +0200 Teemu Rinne wrote: > Hi, > > Installing python stuff on a new Intel Mac Pro 2.66 was a pleasure this > time (not always so in the past...). Pythonmac.org/packages are great! > > However, there is something wrong with my installation/use of > scipy/numpy: > > Python 2.4.4 (#1, Oct 18 2006, 10:34:39) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> # this works on my older installations >>>> import matplotlib >>>> matplotlib.use("TkAgg") >>>> from pylab import * >>>> from scipy import signal > RuntimeError: module compiled against version 1000002 of C-API but this > version of numpy is 1000009 > Traceback (most recent call last): > File "", line 1, in ? > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac > kages/scipy/signal/__init__.py", line 7, in ? > import sigtools > ImportError: numpy.core.multiarray failed to import > > > That is, I have an out-of-box Mac and all the packages are downloaded from > Pythonmac.org/packages. What am I missing? Is the current scipy package > somehow incompatible with the other packages? How do I get scipy working > too? > > > Cheers, > > Teemu Rinne > Dept Psychology > Univ Helsinki > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ronaldoussoren at mac.com Thu Nov 23 16:27:56 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 23 Nov 2006 16:27:56 +0100 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 In-Reply-To: References: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> Message-ID: <52537523-06A1-496D-9137-2079F178010A@mac.com> On 23 Nov 2006, at 4:03 PM, Teemu Rinne wrote: > Hi, > > > In my test below , I got "RuntimeError: module compiled against > version > 1000002 of C-API but this version of numpy is 1000009" after "from > scipy > import signal". Is this because > (1) scipy (or one of the other packages) is not up to date with > the others > or > (2) I do something wrong? Your using an extension for one version of Python with another version (such as numpy for Python 2.3 and Python 2.4). 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/20061123/357b2fa1/attachment.bin From Teemu.Rinne at helsinki.fi Thu Nov 23 23:24:50 2006 From: Teemu.Rinne at helsinki.fi (Teemu Rinne) Date: Fri, 24 Nov 2006 00:24:50 +0200 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 In-Reply-To: <52537523-06A1-496D-9137-2079F178010A@mac.com> References: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> <52537523-06A1-496D-9137-2079F178010A@mac.com> Message-ID: > On 23 Nov 2006, at 4:03 PM, Teemu Rinne wrote: >> In my test below , I got "RuntimeError: module compiled against >> version >> 1000002 of C-API but this version of numpy is 1000009" after "from >> scipy >> import signal". Is this because >> (1) scipy (or one of the other packages) is not up to date with >> the others >> or >> (2) I do something wrong? Ronald Oussoren wrote: > Your using an extension for one version of Python with another version > (such as numpy for Python 2.3 and Python 2.4). Thanks for your reply. If this is the case, how do I sort it out? I am helpless. This is a new mac with no other python installations than the preinstalled and pythonmac 2.4.4, I downloaded the packages from pythonmac.org/packages/py24-fat, /Library/Frameworks/Python.framework/Versions has no 2.3, the preinstalled /usr/bin/python 2.3.5 does not have matplotlib/numpy/scipy, output of python -v seems ok. import matplotlib matplotlib.use("TkAgg") from pylab import * #everything seems ok so far #the next line fails: from scipy import signal Error message: RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/signal/__init__.py", line 7, in ? import sigtools ImportError: numpy.core.multiarray failed to import -- Teemu From bob at redivi.com Thu Nov 23 23:34:53 2006 From: bob at redivi.com (Bob Ippolito) Date: Thu, 23 Nov 2006 14:34:53 -0800 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 In-Reply-To: References: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> <52537523-06A1-496D-9137-2079F178010A@mac.com> Message-ID: <6a36e7290611231434s61ed5563j296b137d101e1053@mail.gmail.com> On 11/23/06, Teemu Rinne wrote: > > > On 23 Nov 2006, at 4:03 PM, Teemu Rinne wrote: > >> In my test below , I got "RuntimeError: module compiled against > >> version > >> 1000002 of C-API but this version of numpy is 1000009" after "from > >> scipy > >> import signal". Is this because > >> (1) scipy (or one of the other packages) is not up to date with > >> the others > >> or > >> (2) I do something wrong? > > Ronald Oussoren wrote: > > Your using an extension for one version of Python with another version > > (such as numpy for Python 2.3 and Python 2.4). > > Thanks for your reply. > > If this is the case, how do I sort it out? I am helpless. > > This is a new mac with no other python installations than the preinstalled > and pythonmac 2.4.4, I downloaded the packages from > pythonmac.org/packages/py24-fat, > /Library/Frameworks/Python.framework/Versions has no 2.3, the preinstalled > /usr/bin/python 2.3.5 does not have matplotlib/numpy/scipy, output of > python -v seems ok. > > > import matplotlib > matplotlib.use("TkAgg") > from pylab import * > #everything seems ok so far > #the next line fails: > from scipy import signal > > Error message: > RuntimeError: module compiled against version 1000002 of C-API but this > version of numpy is 1000009 > Traceback (most recent call last): > File "", line 1, in ? > File > "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/signal/__init__.py", > line 7, in ? > import sigtools > ImportError: numpy.core.multiarray failed to import It looks like scipy is out of date or something. If someone provides a set of packages that are all up to date and in sync, then I will post them. Otherwise, the only thing I can suggest is to compile it all yourself or find another source for packages built together. -bob From Teemu.Rinne at helsinki.fi Sat Nov 25 00:08:08 2006 From: Teemu.Rinne at helsinki.fi (Teemu Rinne) Date: Sat, 25 Nov 2006 01:08:08 +0200 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 In-Reply-To: <6a36e7290611231434s61ed5563j296b137d101e1053@mail.gmail.com> References: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> <52537523-06A1-496D-9137-2079F178010A@mac.com> <6a36e7290611231434s61ed5563j296b137d101e1053@mail.gmail.com> Message-ID: Hi, Bob, thanks for the verification. To my great surprise, I managed to compile scipy on Intel Mac Pro without too much trouble (sorting out gcc and python versions and missing fortran took awhile). My collection of packages seems to work now but there still remains one (minor) issue with masked arrays. This works on my older installations (g5): import matplotlib matplotlib.use("TkAgg") from pylab import * from MA import * #import MA a=arange(100) a.shape=(5,20) a=swapaxes(a,0,1) m=array([1,2,3],mask=[0,1,0]) #m=MA.array([1,2,3],mask=[0,1,0]) On my Mac Pro, I get: File "test.py", line 12, in ? a=swapaxes(a,0,1) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/fromnumeric.py", line 106, in swapaxes return _wrapit(a, 'swapaxes', axis1, axis2) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/fromnumeric.py", line 39, in _wrapit result = getattr(asarray(obj),method)(*args, **kwds) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/core/numeric.py", line 132, in asarray return array(a, dtype, copy=False, order=order) ValueError: object __array__ method not producing an array There seems to be some kind of name space conflict. The line 'a=swapaxes(a,0,1)' works as expected without 'from MA import *'. If I do 'import MA' and use MA.array etc for all operations with masked arrays everything seems to work fine. However, I have lots of lines like 'a=average(array(b,mask=m))' which would look quite ugly as 'a=MA.average(MA.array(b,mask=m))'. Is this how MA is supposed to work with the latest versions? If not, any ideas where the conflict might be coming from? -- Teemu Teemu.Rinne at helsinki.fi> wrote: >> import matplotlib >> matplotlib.use("TkAgg") >> from pylab import * >> # everything seems ok so far >> # the next line fails: >> from scipy import signal >> >> Error message: >> RuntimeError: module compiled against version 1000002 of C-API but this >> version of numpy is 1000009 >> Traceback (most recent call last): >> File "", line 1, in ? >> File >> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pa >> ckages/scipy/signal/__init__.py", line 7, in ? >> import sigtools >> ImportError: numpy.core.multiarray failed to import Bob Ippolito wrote: > It looks like scipy is out of date or something. If someone provides a > set of packages that are all up to date and in sync, then I will post > them. Otherwise, the only thing I can suggest is to compile it all > yourself or find another source for packages built together. From bobmaddox at mac.com Sat Nov 25 14:16:51 2006 From: bobmaddox at mac.com (Bob Maddox) Date: Sat, 25 Nov 2006 05:16:51 -0800 Subject: [Pythonmac-SIG] Newby Question: are there Mac python programmers working on Poser scripts on the list? Message-ID: <1E8C1032-E494-4361-9651-42A51C33C0A5@mac.com> Hi, I am a 3D graphic designer with limited scripting experience (mostly actionscript). I use Poser on a mac G5 an I heard recently that the new version of poser (7) will have improved python support. Just curious if there are any poser programmers out there who could point me in the right direction to get up to speed on poser scripting? Thanks in advance. Bob Maddox Designer/Illustrator 360-446-5609 http://homepage.mac.com/bobmaddox/production/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061125/3f4977bf/attachment.htm From tmj at visi.com Sat Nov 25 16:52:31 2006 From: tmj at visi.com (Thomas Juntunen) Date: Sat, 25 Nov 2006 09:52:31 -0600 Subject: [Pythonmac-SIG] Newby Question: are there Mac python programmers working on Poser scripts on the list? In-Reply-To: <1E8C1032-E494-4361-9651-42A51C33C0A5@mac.com> References: <1E8C1032-E494-4361-9651-42A51C33C0A5@mac.com> Message-ID: <20061125095231.822679.45523199@visi.com> On Sat, 25 Nov 2006 05:16:51 -0800, Bob Maddox wrote: > Hi, I am a 3D graphic designer with limited scripting > experience(mostly actionscript). I use Poser on a mac G5 an I heard > recently that the new version of poser (7) will have improved python > support. Just curious if there are any poser programmers out there > who could point me in the right direction to get up to speed on poser > scripting? If you've grasped the concepts behind ActionScript (which are similar to most programming languages) -- that is objects, data structures, variables and so forth -- you're in a good position to learn a bit about Python and then study the Python objects Poser exposes. After that you'll likely know enough to get started. A great resource for learning a bit about Python is Mark Pilgrim's book "Dive into Python". He has made the entire book freely available on the web in a variety of formats: http://www.diveintopython.org/ HTH, Thomas Juntunen From mithro at mithis.com Sat Nov 25 17:00:29 2006 From: mithro at mithis.com (Tim Ansell) Date: Sun, 26 Nov 2006 02:30:29 +1030 Subject: [Pythonmac-SIG] Problems bundleing my application with py2app Message-ID: <1164470430.6098.75.camel@localhost> Hello, I'm currently trying to bundle my wxPython application with py2app so it's easy for MacOS X users to run. I keep running into the following error on a few different modules. Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/py2app-0.3.5-py2.3.egg/py2app/build_app.py", line 548, in _run self.run_normal() File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/py2app-0.3.5-py2.3.egg/py2app/build_app.py", line 618, in run_normal py_files, extensions = self.finalize_modulefinder(mf) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/py2app-0.3.5-py2.3.egg/py2app/build_app.py", line 589, in finalize_modulefinder py_files, extensions = parse_mf_results(mf) File "build/bdist.darwin-7.9.0-Power_Macintosh/egg/modulegraph/find_modules.py", line 75, in parse_mf_results RuntimeError: Don't know how to handle ''/Users/tim/Desktop/source/libtpclient-py/client'' > /Users/tim/Desktop/source/tpclient-pywx/build/bdist.darwin-7.9.0-Power_Macintosh/egg/modulegraph/find_modules.py(75)parse_mf_results() (Pdb) I can't figure out what is causing it. I can seem to fix the errors by changing the imports from "from x.y import w" to "import w". I'm not able to produce a simple example of what is causing it. Googling for results doesn't produce any hits. All the source code is open source and can be found at http://darcs.thousandparsec.net/repos/ If you want to run the code you will need to do the following, * darcs * Python * wxPython 2.6 * PIL * Numeric or NumArray Then mkdir tp cd tp darcs get --partial http://darcs.thousandparsec.net/repos/scratchpad darcs get --partial http://darcs.thousandparsec.net/repos/libtpproto-py darcs get --partial http://darcs.thousandparsec.net/repos/libtpclient-py darcs get --partial http://darcs.thousandparsec.net/repos/tpclient-pywx cd scratchpad sh setup.sh cd .. cd tpclient-pywx ./tpclient-pywx Does anyone have any ideas on how to fix it? Thanks for your help. Tim Ansell From bobmaddox at mac.com Sat Nov 25 20:50:08 2006 From: bobmaddox at mac.com (Bob Maddox) Date: Sat, 25 Nov 2006 11:50:08 -0800 Subject: [Pythonmac-SIG] Fwd: Newby Question: are there Mac python programmers working on Poser scripts on the list? References: Message-ID: <36A05A19-B1FB-4D3F-8142-7868FABCC67B@mac.com> > > Thanks Thomas, this is one of the things I was looking for, a solid > foundation text for Python. If anyone knows of mac or poser > specific content about Python I would be interested. > > thanks again, > > Bob Maddox > Designer/Illustrator > 360-446-5609 > http://homepage.mac.com/bobmaddox/production/ > > > > > On Nov 25, 2006, at 7:52 AM, Thomas Juntunen wrote: > >> On Sat, 25 Nov 2006 05:16:51 -0800, Bob Maddox wrote: >>> Hi, I am a 3D graphic designer with limited scripting >>> experience(mostly actionscript). I use Poser on a mac G5 an I heard >>> recently that the new version of poser (7) will have improved python >>> support. Just curious if there are any poser programmers out there >>> who could point me in the right direction to get up to speed on >>> poser >>> scripting? >> >> If you've grasped the concepts behind ActionScript (which are similar >> to most programming languages) -- that is objects, data structures, >> variables and so forth -- you're in a good position to learn a bit >> about Python and then study the Python objects Poser exposes. After >> that you'll likely know enough to get started. A great resource for >> learning a bit about Python is Mark Pilgrim's book "Dive into >> Python". >> He has made the entire book freely available on the web in a >> variety of >> formats: >> >> http://www.diveintopython.org/ >> >> HTH, >> Thomas Juntunen > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061125/aba0a9ef/attachment.html From kw at codebykevin.com Sun Nov 26 02:09:25 2006 From: kw at codebykevin.com (Kevin Walzer) Date: Sat, 25 Nov 2006 20:09:25 -0500 Subject: [Pythonmac-SIG] Tkinter resources Message-ID: <4568E945.6090108@codebykevin.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've posted several items at the Tkinter developer wiki that I think might be of interest to Tkinter developers working on Mac OS X, given the frequent concern expressed about how deficient the look-and-feel of the basic Tk widgets are under Aqua. My posts are about integrating Tile (http://tktable.sourceforge.net/tile), which provides platform-native theming (based on the Appearance Manager API on OS X), and TableList (http://www.nemethi.de, http://wiki.tcl.tk/5527), a powerful multi-column listbox widget, into Tkinter applications. I've noted a serious lack of resources/documentation about these two powerful Tk components. In addition to some documentation, screenshots, and sample applications, I've posted updated versions of the original TableList and Tile wrappers by Martin Franklin. Here are the links: http://tkinter.unpythonic.net/wiki/UsingTile http://tkinter.unpythonic.net/wiki/TileWrapper http://tkinter.unpythonic.net/wiki/TableListWrapper http://tkinter.unpythonic.net/wiki/TableListTileWrapper http://tkinter.unpythonic.net/wiki/PyLocateTile http://tkinter.unpythonic.net/wiki/PyLocate Note that the screenshots in the pylocate pages were taken under OS X. Hope these prove useful to others, as starting points for your own work if nothing else. Corrections and improvements are of course invited; it's a wiki! - -- 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 iD8DBQFFaOlEEsLm8HXyq4sRAuItAJ9CjDe3YCeuZ4zY/euFTQ/83TMx+gCfQVU+ rwQ/hXqFhmsQvO3UkzOwlk8= =0F7T -----END PGP SIGNATURE----- From mithro at mithis.com Sun Nov 26 19:49:37 2006 From: mithro at mithis.com (Tim Ansell) Date: Mon, 27 Nov 2006 05:19:37 +1030 Subject: [Pythonmac-SIG] py2app iconfile not working? Message-ID: <1164566977.6098.89.camel@localhost> Hello, I'm still trying to bundle my application with py2app. I've used the img2icns application (version 0.3) to create a icns file from a png file. However, when I use the "iconfile" option (either by --iconfile or 'py2app':{"iconfile": ...) the icon does not get applied to the bundle. I'm using MacOS X 10.3.9 with Python 2.4 and py2app 0.3.5 I am able to use the "copy and paste" method to put the icon onto the bundle. I seem to get an icon which looks like a couple of pieces of paper and pencil/ruler. Can anyone give me any hints on how to debug this problem? Tim Ansell From mithro at mithis.com Sun Nov 26 19:52:01 2006 From: mithro at mithis.com (Tim Ansell) Date: Mon, 27 Nov 2006 05:22:01 +1030 Subject: [Pythonmac-SIG] Problems bundleing my application with py2app In-Reply-To: <1164470430.6098.75.camel@localhost> References: <1164470430.6098.75.camel@localhost> Message-ID: <1164567121.6098.92.camel@localhost> On Sun, 2006-11-26 at 02:30 +1030, Tim Ansell wrote: > Hello, > > I'm currently trying to bundle my wxPython application with py2app so > it's easy for MacOS X users to run. > > I keep running into the following error on a few different modules. > > Traceback (most recent call last): > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/py2app-0.3.5-py2.3.egg/py2app/build_app.py", line 548, in _run > self.run_normal() > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/py2app-0.3.5-py2.3.egg/py2app/build_app.py", line 618, in run_normal > py_files, extensions = self.finalize_modulefinder(mf) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/py2app-0.3.5-py2.3.egg/py2app/build_app.py", line 589, in finalize_modulefinder > py_files, extensions = parse_mf_results(mf) > File > "build/bdist.darwin-7.9.0-Power_Macintosh/egg/modulegraph/find_modules.py", line 75, in parse_mf_results > RuntimeError: Don't know how to handle > ''/Users/tim/Desktop/source/libtpclient-py/client'' > > /Users/tim/Desktop/source/tpclient-pywx/build/bdist.darwin-7.9.0-Power_Macintosh/egg/modulegraph/find_modules.py(75)parse_mf_results() > (Pdb) > After many hours moving stuff around I have gotten rid of these errors. I'm still not quite sure was causing this in the first place. Tim From frank at niessink.com Sun Nov 26 21:37:20 2006 From: frank at niessink.com (Frank Niessink) Date: Sun, 26 Nov 2006 21:37:20 +0100 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: <1164566977.6098.89.camel@localhost> References: <1164566977.6098.89.camel@localhost> Message-ID: <4569FB00.9020508@niessink.com> Tim Ansell: > Hello, > > I'm still trying to bundle my application with py2app. > > I've used the img2icns application (version 0.3) to create a icns file > from a png file. However, when I use the "iconfile" option (either by > --iconfile or 'py2app':{"iconfile": ...) the icon does not get applied > to the bundle. I had a similar issue. Adding a plist option to the py2app options solved it. See setup.py fragment below. setupOptions.update(dict(app=['taskcoach.py'], setup_requires=['py2app'], options=dict(py2app=dict(argv_emulation=True, compressed=True, dist_dir=builddir, optimize=2, iconfile='icons.in/taskcoach.icns', packages=['i18n'], plist=dict(CFBundleIconFile='taskcoach.icns'))))) HTH, Frank From mithro at mithis.com Mon Nov 27 09:28:35 2006 From: mithro at mithis.com (Tim Ansell) Date: Mon, 27 Nov 2006 18:58:35 +1030 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: <4569FB00.9020508@niessink.com> References: <1164566977.6098.89.camel@localhost> <4569FB00.9020508@niessink.com> Message-ID: <1164616116.6098.95.camel@localhost> Hello, I have tried this too, but still no luck :/ Could it be something to do with 10.3.9? Has anyone had the icon working with 10.3.9? Tim On Sun, 2006-11-26 at 21:37 +0100, Frank Niessink wrote: > Tim Ansell: > > Hello, > > > > I'm still trying to bundle my application with py2app. > > > > I've used the img2icns application (version 0.3) to create a icns file > > from a png file. However, when I use the "iconfile" option (either by > > --iconfile or 'py2app':{"iconfile": ...) the icon does not get applied > > to the bundle. > > I had a similar issue. Adding a plist option to the py2app options > solved it. See setup.py fragment below. > > setupOptions.update(dict(app=['taskcoach.py'], > setup_requires=['py2app'], > options=dict(py2app=dict(argv_emulation=True, compressed=True, > dist_dir=builddir, optimize=2, > iconfile='icons.in/taskcoach.icns', > packages=['i18n'], > plist=dict(CFBundleIconFile='taskcoach.icns'))))) > > HTH, Frank > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ronaldoussoren at mac.com Mon Nov 27 10:08:25 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 27 Nov 2006 01:08:25 -0800 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: <1164616116.6098.95.camel@localhost> References: <1164566977.6098.89.camel@localhost> <4569FB00.9020508@niessink.com> <1164616116.6098.95.camel@localhost> Message-ID: <605F5E25-010F-1000-D8F6-2596B1B48CC3-Webmail-10006@mac.com> On Monday, November 27, 2006, at 09:58AM, "Tim Ansell" wrote: >Hello, > >I have tried this too, but still no luck :/ > >Could it be something to do with 10.3.9? Has anyone had the icon working >with 10.3.9? Could you please test with 'py2app==dev' (that is the version in the repository)? Icons work for me, but I'm running 10.4 and my 10.3 system is currently powered off (and not even connected to the mains). Ronald From mithro at mithis.com Mon Nov 27 17:10:03 2006 From: mithro at mithis.com (Tim Ansell) Date: Tue, 28 Nov 2006 02:40:03 +1030 Subject: [Pythonmac-SIG] Request for Bundle Builder... Message-ID: <1164643803.6098.129.camel@localhost> Hello, I have spent about 18 hours (over 3 days) trying to package my python application for Mac users. However, I can't seem to get it to work. I'm trying to use Mac OS X 10.3.9 and all the Mac developer tools seem to be for 10.4 or greater. The problems I have run into include; * The app won't run outside the dmg on some computers * Icon file won't be applied * Sometimes you have to open the dmg multiple times before the app runs * Massive sizes of over 80mb I'm sure the application should run in a bundle, it runs in a py2exe file and it runs when frozen under the MacMillian Installer. I was hoping somebody could help me out by become the builder of bundles for my application. Anyone who has packaged wx Python applications before shouldn't have any problems (and most probably has all the pre-requests installed as well). If you want to run the code you will need to do the following, * darcs * Python * wxPython 2.6 (or 2.7) * PIL * Numeric or NumArray Then mkdir tp cd tp darcs get --partial http://darcs.thousandparsec.net/repos/scratchpad darcs get --partial http://darcs.thousandparsec.net/repos/libtpproto-py darcs get --partial http://darcs.thousandparsec.net/repos/libtpclient-py darcs get --partial http://darcs.thousandparsec.net/repos/tpclient-pywx cd scratchpad sh setup.sh cd .. cd tpclient-pywx ./tpclient-pywx python setup.py py2app Thanks for your help. Tim Ansell From Chris.Barker at noaa.gov Mon Nov 27 18:37:03 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 27 Nov 2006 09:37:03 -0800 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: <1164616116.6098.95.camel@localhost> References: <1164566977.6098.89.camel@localhost> <4569FB00.9020508@niessink.com> <1164616116.6098.95.camel@localhost> Message-ID: <456B223F.2060309@noaa.gov> Tim Ansell wrote: > I have tried this too, but still no luck :/ > > Could it be something to do with 10.3.9? Has anyone had the icon working > with 10.3.9? just a note: sometimes when you re-build a .app bundle, the finder has cached it's previous icon, so even if you do everything right, it won't show up in the finder correctly. I wish I could tell you how to get Finder to refresh -- but I don't remember, I only remember the frustration this has caused me in the past! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Mon Nov 27 18:39:25 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 27 Nov 2006 09:39:25 -0800 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 In-Reply-To: References: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> <52537523-06A1-496D-9137-2079F178010A@mac.com> <6a36e7290611231434s61ed5563j296b137d101e1053@mail.gmail.com> Message-ID: <456B22CD.9050801@noaa.gov> Teemu Rinne wrote: > To my great surprise, I managed to compile scipy on Intel Mac Pro without > too much trouble (sorting out gcc and python versions and missing fortran > took awhile). My collection of packages seems to work now Is it a Universal build? WE really do need to get a complete set of up-to-date: numpy matplotlib scipy that all work together. > but there still > remains one (minor) issue with masked arrays. This looks like an MPL bug to me -- have you tested on other platforms? I'd post to the MPL list. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From ronaldoussoren at mac.com Mon Nov 27 18:45:10 2006 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 27 Nov 2006 18:45:10 +0100 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: <456B223F.2060309@noaa.gov> References: <1164566977.6098.89.camel@localhost> <4569FB00.9020508@niessink.com> <1164616116.6098.95.camel@localhost> <456B223F.2060309@noaa.gov> Message-ID: <6223F58A-6AF3-4825-8B29-F535710D5836@mac.com> On 27 Nov 2006, at 6:37 PM, Christopher Barker wrote: > Tim Ansell wrote: >> I have tried this too, but still no luck :/ >> >> Could it be something to do with 10.3.9? Has anyone had the icon >> working >> with 10.3.9? > > just a note: sometimes when you re-build a .app bundle, the finder has > cached it's previous icon, so even if you do everything right, it > won't > show up in the finder correctly. I wish I could tell you how to get > Finder to refresh -- but I don't remember, I only remember the > frustration this has caused me in the past! "touch MyApplication.app" seems to work most of the time. 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/20061127/ac0d90ab/attachment.bin From chris.van.bael at gmail.com Mon Nov 27 21:23:41 2006 From: chris.van.bael at gmail.com (Chris Van Bael) Date: Mon, 27 Nov 2006 21:23:41 +0100 Subject: [Pythonmac-SIG] Getting an ugly icon? In-Reply-To: <494E85C5-010E-1000-97A5-BA8983D6744D-Webmail-10006@mac.com> References: <5465ee790611080007u76ff3b5bj990721df446198b9@mail.gmail.com> <494E85C5-010E-1000-97A5-BA8983D6744D-Webmail-10006@mac.com> Message-ID: <5465ee790611271223k46ec6d9ay1e450caae6265337@mail.gmail.com> Hi Ronald, I tried your suggestions, but now I'm officially completely lost: In Finder I first saw a generic icon. (just after building) I started my application: at first the pygame icon, afterwards my ugly icon. Closed my app and did "touch myapp.app" Now I got a "16ton" icon in Finder and still my ugly icon when running?! It seems my icon is not included in the Resources folder in myapp.app, but PythonApplet.icns is. But how and why is it still showing my ugly icon when running? Can anybody please shed some light on this one, because I'm totally lost... Chris On 11/8/06, Ronald Oussoren wrote: > > On Wednesday, November 08, 2006, at 09:09AM, "Chris Van Bael" wrote: > >Hi, > > > >Whatever I try, I always get a very ugly icon in my Python program. > > > >What I do: > >Open Icon Composer, click on the 128x128 field and open an 180x180 icon. > >Let it rescale it and save it as an icns file. > >In Preview this icns file looks great. > >When I make an app with py2app it's included "--iconfile childsplay.py" > >However when I startup my program, it has a very ugly icon file. > >In the .app I see that the icns file is included. > > > >I once made the app with an ugly windows icon file, but I remove > >everything before I run py2app, so that would seem strange. > >And _some_ file is included, but it is really my icon, but very fugly! > > I have fixed an icon-related issue a while back and don't know if there has been a release since then. Could you try the development version of py2app (easy_install py2app==dev)? > > Ronald > From bthom at cs.hmc.edu Mon Nov 27 21:51:00 2006 From: bthom at cs.hmc.edu (belinda thom) Date: Mon, 27 Nov 2006 12:51:00 -0800 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: <456B223F.2060309@noaa.gov> References: <1164566977.6098.89.camel@localhost> <4569FB00.9020508@niessink.com> <1164616116.6098.95.camel@localhost> <456B223F.2060309@noaa.gov> Message-ID: On Nov 27, 2006, at 9:37 AM, Christopher Barker wrote: > Tim Ansell wrote: >> I have tried this too, but still no luck :/ >> >> Could it be something to do with 10.3.9? Has anyone had the icon >> working >> with 10.3.9? > > just a note: sometimes when you re-build a .app bundle, the finder has > cached it's previous icon, so even if you do everything right, it > won't > show up in the finder correctly. I wish I could tell you how to get > Finder to refresh -- but I don't remember, I only remember the > frustration this has caused me in the past! To restart the finder: cmd+opt+esc, select finder, relaunch > > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From mithro at mithis.com Mon Nov 27 22:27:32 2006 From: mithro at mithis.com (Tim Ansell) Date: Tue, 28 Nov 2006 07:57:32 +1030 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: References: <1164566977.6098.89.camel@localhost> <4569FB00.9020508@niessink.com> <1164616116.6098.95.camel@localhost> <456B223F.2060309@noaa.gov> Message-ID: <1164662852.6098.138.camel@localhost> Hello, I have tried this too. It had no effect for me. Tim Ansell On Mon, 2006-11-27 at 12:51 -0800, belinda thom wrote: > On Nov 27, 2006, at 9:37 AM, Christopher Barker wrote: > > > Tim Ansell wrote: > >> I have tried this too, but still no luck :/ > >> > >> Could it be something to do with 10.3.9? Has anyone had the icon > >> working > >> with 10.3.9? > > > > just a note: sometimes when you re-build a .app bundle, the finder has > > cached it's previous icon, so even if you do everything right, it > > won't > > show up in the finder correctly. I wish I could tell you how to get > > Finder to refresh -- but I don't remember, I only remember the > > frustration this has caused me in the past! > > To restart the finder: cmd+opt+esc, select finder, relaunch > > > > > -Chris > > > > > > > > -- > > Christopher Barker, Ph.D. > > Oceanographer > > > > Emergency Response Division > > NOAA/NOS/OR&R (206) 526-6959 voice > > 7600 Sand Point Way NE (206) 526-6329 fax > > Seattle, WA 98115 (206) 526-6317 main reception > > > > Chris.Barker at noaa.gov > > > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From kw at codebykevin.com Mon Nov 27 22:35:29 2006 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 27 Nov 2006 16:35:29 -0500 Subject: [Pythonmac-SIG] py2app iconfile not working? In-Reply-To: <1164662852.6098.138.camel@localhost> References: <1164566977.6098.89.camel@localhost> <4569FB00.9020508@niessink.com> <1164616116.6098.95.camel@localhost> <456B223F.2060309@noaa.gov> <1164662852.6098.138.camel@localhost> Message-ID: <456B5A21.1070501@codebykevin.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 You could just add the icon file to the app bundle after py2app is done running, and edit info.plist if necessary with the updated icon name. Kind of a hack, but this has worked for me. - -- 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 iD8DBQFFa1ohEsLm8HXyq4sRAvoJAJ4rDz8Yhcx9S6qkxZBD4nxjHlBeKACePCn8 WaFt+i61TatWoy2AwqZMR7o= =JABk -----END PGP SIGNATURE----- From Teemu.Rinne at helsinki.fi Mon Nov 27 22:40:08 2006 From: Teemu.Rinne at helsinki.fi (Teemu Rinne) Date: Mon, 27 Nov 2006 23:40:08 +0200 Subject: [Pythonmac-SIG] module compiled against version 1000002 of C-API but this version of numpy is 1000009 In-Reply-To: <456B22CD.9050801@noaa.gov> References: <2C434D303BD14B57D97AFC48@cs181102088.pp.htv.fi> <52537523-06A1-496D-9137-2079F178010A@mac.com> <6a36e7290611231434s61ed5563j296b137d101e1053@mail.gmail.com> <456B22CD.9050801@noaa.gov> Message-ID: Hi, Based on the response I got from the MPL list (below) it seems that my pylab/MA is actually behaving as expected. MA as a subclass of regular arrays sound like a great idea (see below)! Thanks, Teemu ---------- Forwarded Message ---------- Date: maanantai 27. marraskuu 2006 14:48 -0500 From: Pierre GM To: matplotlib-users at lists.sourceforge.net Subject: Re: [Matplotlib-users] pylab/masked arrays issue on Intel Mac Pro When you type from MA import *, you overwrite the definition of 'array'. And surprisingly enough, a masked array in numpy.core.ma is an object independent of ndarray. Some functions such as swapaxes are not imported by MA (because they were not implemented for one reason or another): you then use the regular numpy function, which doesn't know how to deal with these 'masked arrays' objects. (I simplify a bit, here, but the gist is there) As you've noticed, the best solution is to use import MA. That way, you leave the original numpy namespace alone, and are sure to use only "MA-approved" functions. But you'll likely gonna have to use MA.sqrt, MA.log all over your code. And may run into problems with functions that don't handle masked arrays. Still, it's the cleanest solution (the "from blah import *" tend to be frowned upon these days anyway). An alternative solution is to try the new implementation of masked arrays I've been working on: with this implementation, masked arrays are subclasses of regular arrays, which simplifies life a lot.The source file is available here: http://projects.scipy.org/scipy/numpy/wiki/MaskedArray Note the disclaimer: it's still a work in progress (even if I use it everyday and it works fine) and you'll have to modify a line in the matplotlib source to make it work OK with matplotlib, which is a bit tedious I agree. But it works. And it's actively maintained. Hope it helps P. ---------- End Forwarded Message ---------- --On maanantai 27. marraskuu 2006 09:39 -0800 Christopher Barker wrote: > Teemu Rinne wrote: > >> To my great surprise, I managed to compile scipy on Intel Mac Pro without >> too much trouble (sorting out gcc and python versions and missing fortran >> took awhile). My collection of packages seems to work now > > Is it a Universal build? WE really do need to get a complete set of > up-to-date: > > numpy > matplotlib > scipy > > that all work together. > >> but there still >> remains one (minor) issue with masked arrays. > > This looks like an MPL bug to me -- have you tested on other platforms? > I'd post to the MPL list. > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov From jamie at eurotalk.com Tue Nov 28 17:42:32 2006 From: jamie at eurotalk.com (Jamie Stuart) Date: Tue, 28 Nov 2006 16:42:32 +0000 Subject: [Pythonmac-SIG] controlling iTunes with appscript Message-ID: <456C66F8.4080306@eurotalk.com> Hi, I'm completely new to Python and something is evading me completely. I'm using appscript to add (and convert to mp3) a bunch of .aif files to iTunes. I also want to create a new playlist which they are all added to and then tagged. This is what I have at the moment: itunes = app(id='com.apple.itunes') itunes.run() itunes.make(new=k.playlist, with_properties={k.name:'New Playlist'}) addfile = itunes.add(Alias (outputfile), to=itunes.playlists['New Playlist']) convertfile = itunes.convert(addfile) itunes.delete(addfile) The resultant mp3 file doesn't appear in the playlist - only in the library. Also, how do I tag the files (title, artist, album?) as I can't see how this would be done. Another thing is how can I package up appscript so this thing can be distributed on CD-ROM? Any help much appreciated! Jamie From simon at brunningonline.net Tue Nov 28 18:18:44 2006 From: simon at brunningonline.net (Simon Brunning) Date: Tue, 28 Nov 2006 17:18:44 +0000 Subject: [Pythonmac-SIG] controlling iTunes with appscript In-Reply-To: <456C66F8.4080306@eurotalk.com> References: <456C66F8.4080306@eurotalk.com> Message-ID: <8c7f10c60611280918l786afbecvbfc73b9734381935@mail.gmail.com> On 11/28/06, Jamie Stuart wrote: > Hi, > I'm completely new to Python and something is evading me completely. I'm > using appscript to add (and convert to mp3) a bunch of .aif files to > iTunes. I also want to create a new playlist which they are all added to > and then tagged. This is what I have at the moment: > > itunes = app(id='com.apple.itunes') > itunes.run() > itunes.make(new=k.playlist, with_properties={k.name:'New Playlist'}) > addfile = itunes.add(Alias (outputfile), to=itunes.playlists['New > Playlist']) > convertfile = itunes.convert(addfile) > itunes.delete(addfile) > > > The resultant mp3 file doesn't appear in the playlist - only in the > library. Try creating the playlist with: my_playlist = itunes.make(new=k.user_playlist, with_properties={k.name:'New Playlist'}) Does this help? > Also, how do I tag the files (title, artist, album?) as I can't > see how this would be done. track.name.set('New name') > Another thing is how can I package up appscript so this thing can be > distributed on CD-ROM? Sorry - you're on your own with this! -- Cheers, Simon B simon at brunningonline.net http://www.brunningonline.net/simon/blog/ From jamie at eurotalk.com Tue Nov 28 18:44:28 2006 From: jamie at eurotalk.com (Jamie Stuart) Date: Tue, 28 Nov 2006 17:44:28 +0000 Subject: [Pythonmac-SIG] controlling iTunes with appscript In-Reply-To: <8c7f10c60611280918l786afbecvbfc73b9734381935@mail.gmail.com> References: <456C66F8.4080306@eurotalk.com> <8c7f10c60611280918l786afbecvbfc73b9734381935@mail.gmail.com> Message-ID: <456C757C.6040603@eurotalk.com> Thanks Simon - I've now got it adding correctly to the playlist but still can't seem to set the track name. This is what I was attempting: convertfile = itunes.convert(addfile) convertfile.name.set('New Title') Simon Brunning wrote: > On 11/28/06, Jamie Stuart wrote: >> Hi, >> I'm completely new to Python and something is evading me completely. I'm >> using appscript to add (and convert to mp3) a bunch of .aif files to >> iTunes. I also want to create a new playlist which they are all added to >> and then tagged. This is what I have at the moment: >> >> itunes = app(id='com.apple.itunes') >> itunes.run() >> itunes.make(new=k.playlist, with_properties={k.name:'New Playlist'}) >> addfile = itunes.add(Alias (outputfile), to=itunes.playlists['New >> Playlist']) >> convertfile = itunes.convert(addfile) >> itunes.delete(addfile) >> >> >> The resultant mp3 file doesn't appear in the playlist - only in the >> library. > > Try creating the playlist with: > > my_playlist = itunes.make(new=k.user_playlist, > with_properties={k.name:'New Playlist'}) > > Does this help? > >> Also, how do I tag the files (title, artist, album?) as I can't >> see how this would be done. > > track.name.set('New name') > >> Another thing is how can I package up appscript so this thing can be >> distributed on CD-ROM? > > Sorry - you're on your own with this! > From cdamundsen at gmail.com Tue Nov 28 20:09:41 2006 From: cdamundsen at gmail.com (Craig Amundsen) Date: Tue, 28 Nov 2006 11:09:41 -0800 Subject: [Pythonmac-SIG] controlling iTunes with appscript In-Reply-To: <456C757C.6040603@eurotalk.com> References: <456C66F8.4080306@eurotalk.com> <8c7f10c60611280918l786afbecvbfc73b9734381935@mail.gmail.com> <456C757C.6040603@eurotalk.com> Message-ID: <8dc0c28f0611281109k366efe79lcff010f0ee173f5@mail.gmail.com> Hi - I've had an iTunes appscript question nagging at me, so I'll add another question... I've moved a bunch of my files around and rather than do the 1 at a time showing iTunes the new location, I'd like to use appscript to set the location of the moved songs to the new value. Based on my reading it looks like track.location.set('/Path/To/The/File') should do what I want. The trouble I'm having is getting iTunes to give me a list of all the tracks in the library. I've tried various versions of things in the wiki and hints I've found via Google, but none have worked for me. Is there a canonical appscript call into iTunes that will return a list of all tracks in the library? Thanks, - Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061128/34814ada/attachment.htm From njriley at uiuc.edu Tue Nov 28 20:30:21 2006 From: njriley at uiuc.edu (Nicholas Riley) Date: Tue, 28 Nov 2006 13:30:21 -0600 Subject: [Pythonmac-SIG] controlling iTunes with appscript In-Reply-To: <8dc0c28f0611281109k366efe79lcff010f0ee173f5@mail.gmail.com> References: <456C66F8.4080306@eurotalk.com> <8c7f10c60611280918l786afbecvbfc73b9734381935@mail.gmail.com> <456C757C.6040603@eurotalk.com> <8dc0c28f0611281109k366efe79lcff010f0ee173f5@mail.gmail.com> Message-ID: <20061128193021.GA48180@uiuc.edu> On Tue, Nov 28, 2006 at 11:09:41AM -0800, Craig Amundsen wrote: > I've moved a bunch of my files around and rather than do the 1 at a time > showing iTunes the new location, I'd like to use appscript to set the > location of the moved songs to the new value. Just FYI if you don't know already, iTunes uses aliases to keep track of file locations, so if you're not moving across volumes, you shouldn't have to do anything at all. > Based on my reading it looks like > track.location.set('/Path/To/The/File') > should do what I want. You may end up needing to use HFS rather than POSIX paths, or even aliases, depending on what iTunes expects. > The trouble I'm having is getting iTunes to give me a list of all the tracks > in the library. I've tried various versions of things in the wiki and hints > I've found via Google, but none have worked for me. Is there a canonical > appscript call into iTunes that will return a list of all tracks in the > library? iTunes.sources.filter(its.kind==k.library)[1].library_playlists[1].tracks() if you're using a newer appscript, you'd want instead: iTunes.sources.[its.kind==k.library][1].library_playlists[1].tracks() -- Nicholas Riley | From china at thewrittenword.com Mon Nov 27 04:34:53 2006 From: china at thewrittenword.com (Albert Chin-A-Young) Date: Sun, 26 Nov 2006 21:34:53 -0600 Subject: [Pythonmac-SIG] Does anyone know what is causing these errors? In-Reply-To: <4564DEAB.9040903@lanl.gov> References: <4564DEAB.9040903@lanl.gov> Message-ID: <20061127033453.GJ76234@mail1.thewrittenword.com> On Wed, Nov 22, 2006 at 04:35:07PM -0700, Todd Thal wrote: > I finally got readline working with python2.5. I now get these errors > > I have mac ppc darwin 8.8.0 kernel > > I use the > > Apple's gcc > Apple's veclib for BLAS and LAPACK > > fink g77 > fink fftw > > latest src of Python-2.5; numpy-1.0; and scipy-0.5.1 > > Almost there...arrrgghhhhh We get some of these errors for numpy-1.0, SciPy-0.5.1, and Python 2.4.2 so I don't know how "real" they are. > thanks, > > t. > > ERROR: Solve: single precision complex > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/linsolve/umfpack/tests/test_umfpack.py", > line 25, in check_solve_complex_without_umfpack > x = linsolve.spsolve(a, b) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/linsolve/linsolve.py", > line 76, in spsolve > return gssv(N, lastel, data, index0, index1, b, csc, permc_spec)[0] > TypeError: array cannot be safely cast to required type > > ====================================================================== > ERROR: check loadmat case cellnest > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 80, in cc > self._check_case(name, expected) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 75, in _check_case > self._check_level(k_label, expected, matdict[k]) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 33, in _check_level > self._check_level(level_label, ev, actual[i]) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 33, in _check_level > self._check_level(level_label, ev, actual[i]) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 33, in _check_level > self._check_level(level_label, ev, actual[i]) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 30, in _check_level > assert len(expected) == len(actual), "Different list lengths at %s" % > label > TypeError: len() of unsized object > > ====================================================================== > ERROR: check loadmat case object > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 80, in cc > self._check_case(name, expected) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 70, in _check_case > matdict = loadmat(f) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 804, in loadmat > thisdict = _loadv5(fid,basename) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 742, in _loadv5 > el, varname, unused = _get_element(fid, return_name_dtype=True) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 727, in _get_element > el, name = _parse_mimatrix(fid,numbytes) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 633, in _parse_mimatrix > xrange(0,len(names),namelength)] > TypeError: only 0-d integerarrays can be converted to an index > > ====================================================================== > ERROR: check loadmat case struct > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 80, in cc > self._check_case(name, expected) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 70, in _check_case > matdict = loadmat(f) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 804, in loadmat > thisdict = _loadv5(fid,basename) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 742, in _loadv5 > el, varname, unused = _get_element(fid, return_name_dtype=True) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 727, in _get_element > el, name = _parse_mimatrix(fid,numbytes) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 613, in _parse_mimatrix > xrange(0,len(names),namelength)] > TypeError: only 0-d integerarrays can be converted to an index > > ====================================================================== > ERROR: check loadmat case structarr > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 80, in cc > self._check_case(name, expected) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 70, in _check_case > matdict = loadmat(f) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 804, in loadmat > thisdict = _loadv5(fid,basename) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 742, in _loadv5 > el, varname, unused = _get_element(fid, return_name_dtype=True) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 727, in _get_element > el, name = _parse_mimatrix(fid,numbytes) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 613, in _parse_mimatrix > xrange(0,len(names),namelength)] > TypeError: only 0-d integerarrays can be converted to an index > > ====================================================================== > ERROR: check loadmat case structnest > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 80, in cc > self._check_case(name, expected) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 70, in _check_case > matdict = loadmat(f) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 804, in loadmat > thisdict = _loadv5(fid,basename) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 742, in _loadv5 > el, varname, unused = _get_element(fid, return_name_dtype=True) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 727, in _get_element > el, name = _parse_mimatrix(fid,numbytes) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/mio.py", > line 613, in _parse_mimatrix > xrange(0,len(names),namelength)] > TypeError: only 0-d integerarrays can be converted to an index > > ====================================================================== > FAIL: check_rvs (scipy.stats.tests.test_distributions.test_randint) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/stats/tests/test_distributions.py", > line 84, in check_rvs > assert isinstance(val, numpy.ScalarType),`type(val)` > AssertionError: > > ====================================================================== > FAIL: check loadmat case vec > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 80, in cc > self._check_case(name, expected) > File > "/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/test_mio.py", > line 74, in _check_case > assert k in matdict, "Missing key at %s" % k_label > AssertionError: Missing key at Test 'vec', > file:/usr/lanl/packages/local-python.thetatest/lib/python2.5/site-packages/scipy/io/tests/./data/testvec_4_GLNX86.mat, > variable fit_params > > ---------------------------------------------------------------------- > Ran 1567 tests in 5.337s > > FAILED (failures=2, errors=6) > > > -- albert chin (china at thewrittenword.com) From simon at brunningonline.net Wed Nov 29 10:22:33 2006 From: simon at brunningonline.net (Simon Brunning) Date: Wed, 29 Nov 2006 09:22:33 +0000 Subject: [Pythonmac-SIG] controlling iTunes with appscript In-Reply-To: <456C757C.6040603@eurotalk.com> References: <456C66F8.4080306@eurotalk.com> <8c7f10c60611280918l786afbecvbfc73b9734381935@mail.gmail.com> <456C757C.6040603@eurotalk.com> Message-ID: <8c7f10c60611290122j7e27d687p1bf8990eba4ca78a@mail.gmail.com> On 11/28/06, Jamie Stuart wrote: > Thanks Simon - I've now got it adding correctly to the playlist but > still can't seem to set the track name. This is what I was attempting: > > convertfile = itunes.convert(addfile) > convertfile.name.set('New Title') Hmmmm. Perhaps what the convert function returns isn't a track? I'm in meetings all day today, but I'll have a look when I get the chance. (The referenced for all this stuff is viewable through XCode, BTW. Open up XCode, select File, Open Dictionary, then iTunes, and the reference is there.) -- Cheers, Simon B simon at brunningonline.net http://www.brunningonline.net/simon/blog/ From jamie at eurotalk.com Wed Nov 29 17:12:19 2006 From: jamie at eurotalk.com (Jamie Stuart) Date: Wed, 29 Nov 2006 16:12:19 +0000 Subject: [Pythonmac-SIG] controlling iTunes with appscript In-Reply-To: <8c7f10c60611290122j7e27d687p1bf8990eba4ca78a@mail.gmail.com> References: <456C66F8.4080306@eurotalk.com> <8c7f10c60611280918l786afbecvbfc73b9734381935@mail.gmail.com> <456C757C.6040603@eurotalk.com> <8c7f10c60611290122j7e27d687p1bf8990eba4ca78a@mail.gmail.com> Message-ID: <456DB163.4080207@eurotalk.com> It seems that itunes.convert returns a list of all of the converted tracks, therefore, I needed to do: convertfile[0].name.set('New Title') since I have a single-element list. Simon Brunning wrote: > On 11/28/06, Jamie Stuart wrote: >> Thanks Simon - I've now got it adding correctly to the playlist but >> still can't seem to set the track name. This is what I was attempting: >> >> convertfile = itunes.convert(addfile) >> convertfile.name.set('New Title') > > Hmmmm. Perhaps what the convert function returns isn't a track? I'm in > meetings all day today, but I'll have a look when I get the chance. > (The referenced for all this stuff is viewable through XCode, BTW. > Open up XCode, select File, Open Dictionary, then iTunes, and the > reference is there.) > From emanuelesantos at gmail.com Wed Nov 29 20:17:52 2006 From: emanuelesantos at gmail.com (Emanuele Santos) Date: Wed, 29 Nov 2006 12:17:52 -0700 Subject: [Pythonmac-SIG] Python 2.5 PyOpenGL package Message-ID: <6C9B997C-B448-472E-B0C4-55F77FDE46F4@gmail.com> Does anybody have a Python 2.5 PyOpenGL binary package available or at least knows if the latest source release compiles on a mac? Thanks, -- Emanuele. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20061129/7521566c/attachment.html From telliott99 at mac.com Thu Nov 30 15:06:42 2006 From: telliott99 at mac.com (Tom Elliott) Date: Thu, 30 Nov 2006 09:06:42 -0500 Subject: [Pythonmac-SIG] printing in a PyObjC Document-based app Message-ID: I have a PyObjC Document-based Application set up by Xcode (2.4). When I build the default project, but and then change the document window to contain an NSTableView, the app prints the data from the TableView. I would like to take charge of the print operation to print a modified version of the view. According to the docs, for a Cocoa app, my "NSDocument subclass must override printShowingPrintPanel: to create and run the print operation for the document." A Cocoa Document-based Application will not print if you don't do this, whereas the PyObjC one doesn't need to do this (and in fact won't call the method if I do override it in my NSDocument subclass). I thought of adding a modified Print item to the File menu, but I don't know how to connect the new menu item to my NSDocument subclass. In MainMenu.nib, File's Owner's class is NSApplication. I can set my NSDocument to be the App delegate, but there doesn't seem to be an appropriate delegate method for printing. I thought of trying to put my document at the front of the responder chain, but I can't get to the window. File's owner in the document.nib file has an outlet set to the window, but when I do "print self.window" from the document I get "None." What's the right way to do this? Thanks. Tom Elliott