From jl at jldupont.com Fri Oct 1 23:19:56 2010 From: jl at jldupont.com (Jean-Lou Dupont) Date: Fri, 1 Oct 2010 17:19:56 -0400 Subject: [Pythonmac-SIG] appscript & events Message-ID: Hi, Is it possible to "subscribe" to events using py-appscript? Example: I'd like to be able to get callback when a user changes a rating on iTunes. See also: http://stackoverflow.com/questions/3842882 Thanks! Jean-Lou. From jeanlou.dupont at gmail.com Fri Oct 1 23:21:46 2010 From: jeanlou.dupont at gmail.com (Jean-Lou Dupont) Date: Fri, 1 Oct 2010 17:21:46 -0400 Subject: [Pythonmac-SIG] appscript & event Message-ID: Hi, Is it possible to "subscribe" to events using py-appscript? Example: I'd like to be able to get callback when a user changes a rating on iTunes. See also: http://stackoverflow.com/questions/3842882 Thanks! Jean-Lou. From jeanlou.dupont at gmail.com Fri Oct 1 23:21:46 2010 From: jeanlou.dupont at gmail.com (Jean-Lou Dupont) Date: Fri, 1 Oct 2010 17:21:46 -0400 Subject: [Pythonmac-SIG] appscript & event Message-ID: Hi, Is it possible to "subscribe" to events using py-appscript? Example: I'd like to be able to get callback when a user changes a rating on iTunes. See also: http://stackoverflow.com/questions/3842882 Thanks! Jean-Lou. From martin at v.loewis.de Sat Oct 2 22:08:09 2010 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Sat, 02 Oct 2010 22:08:09 +0200 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: <42516.1286045405@parc.com> References: <42516.1286045405@parc.com> Message-ID: <4CA79129.8050900@v.loewis.de> > Surely someone could volunteer an old Intel Mac to run some tests? > (Actually, two someones -- we'd need separate machines for Leopard and > Snow Leopard.) I'd be happy to stick it in a server room at PARC and > keep an eye on it. (Right now I've got a rack full of old eMacs and a > G5 running PPC buildbots.) Perhaps we could get Apple to contribute > some "seconds"? I believe donations to the PSF are deductible. The issue isn't really to get the hardware. The issue is to find somebody to volunteer running a build slave. Regards, Martin From martin at v.loewis.de Sat Oct 2 22:37:40 2010 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Sat, 02 Oct 2010 22:37:40 +0200 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: <20101002203205.GA24940@illinois.edu> References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> <20101002203205.GA24940@illinois.edu> Message-ID: <4CA79814.3030302@v.loewis.de> > I'm already running a Jython buildslave on an Intel Mac Pro which is > pretty underused - I'd be happy to run a CPython one there too, if > it'd be worthwhile. I think Bill was specifically after Snow Leopard - what system are you using? Regards, Martin From njriley at illinois.edu Sat Oct 2 22:32:05 2010 From: njriley at illinois.edu (Nicholas Riley) Date: Sat, 2 Oct 2010 15:32:05 -0500 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: <4CA79129.8050900@v.loewis.de> References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> Message-ID: <20101002203205.GA24940@illinois.edu> On Sat, Oct 02, 2010 at 10:08:09PM +0200, "Martin v. L?wis" wrote: > > Surely someone could volunteer an old Intel Mac to run some tests? > > (Actually, two someones -- we'd need separate machines for Leopard and > > Snow Leopard.) I'd be happy to stick it in a server room at PARC and > > keep an eye on it. (Right now I've got a rack full of old eMacs and a > > G5 running PPC buildbots.) Perhaps we could get Apple to contribute > > some "seconds"? I believe donations to the PSF are deductible. > > The issue isn't really to get the hardware. The issue is to find > somebody to volunteer running a build slave. I'm already running a Jython buildslave on an Intel Mac Pro which is pretty underused - I'd be happy to run a CPython one there too, if it'd be worthwhile. -- Nicholas Riley From tismer at stackless.com Sun Oct 3 01:32:46 2010 From: tismer at stackless.com (Christian Tismer) Date: Sun, 03 Oct 2010 01:32:46 +0200 Subject: [Pythonmac-SIG] xattr question Message-ID: <4CA7C11E.4040207@stackless.com> Hi Bob, hi mackies while writing some tool for Time Machine, I encountered quite some different implementations of xattr. Actually, for a tool written in python, the internal API is sufficient, but when trying the xattr command, I was quite confused which way to go. At the moment, I see three different implementations of xattr. - one implementation completely in C - one from you (Bob) - the built-in version from Mac Os. The problem is that they are not compatible or subsets of each other, but that they diverge in the one or other aspect. I think this is not a good thing for system tools. They should have different names, or they should be aware of their differences and clearly state this. At the moment, I see the different versions pretty much ignoring that they are not the only implementations, but whatever you install, you think you have "the" tool. I would like to change this, and to find out about an agreed standard for the xattr command that is guaranteed to be supported by every implementations. Is there some definition like this somewhere? Essentially, the basic commands are the same for all versions, but they heavily differ by their options. What is the opinion, especially yours, Bob, hot that should be? Here are the different versions listed. --------------------------------------- (1) http://xattr.sourceforge.net/ See this page which is the man page with links to other implementations and download. Especially misleading is the reference to Bob's version, that suggests it is an enhanced version, instead it is missing most of the features, silently. Options: -s Do not follow symbolic links. -l Display results in extended format. -R Expect to edit existing extended attributes; fail rather than create a new one. -C Expect to create new extended attributes; fail rather than edit an existing one. (2) http://pypi.python.org/pypi/xattr This is Bob's implementation. Options: -l: print long format (attr_name: attr_value) -z: compress or decompress (if compressed) attribute value in zip (3) /usr/bin/xattr-2.6 supplied by Apple. I did not find another source than on Os X. Options: -r: act recursively -l: print long format (attr_name: attr_value and hex output has offsets and ascii representation) -v: also print filename (automatic with -r and with multiple files) -x: attr_value is represented as a hex string for input and output My commentary: -------------- (1) is a simple C implementation. Not bad, but nothing that looks like a good reason to prefer it over Python, except one feature: The options -R and -C ensure your expectations, which helps to prevent typos: If you specify -R for instance, the attribute has to be replaced, i.e. you get an error if it did not exist before. No hex, no zip, no recursion. (2) is a nice Python implementation. It has the extra feature of actimg on zip compressed archives. Non-standard imports import zlib for zip entries (3) is also a nice Python implementation, and pretty similar to (2). No idea who is the hen and who the egg. Non-standard imports: import binascii for hex operation import string white space elimination for hex (maketrans) The hex feature of (3) is a real advantage if you want to clone certain xattr entries which are binary. You can really use a hex dump, remove formatting of the listing, and apply it to another file. The zip feature of (2) is useful if you need to modify archives. The recursion feature of (3) looks handy at first sight, but actually its use is limited, because you have limited control of the traversal of huge Time Machine archives, which tend to have millions of files. It would make sense if you could filter the many xattr entries of little relevance, of filter files which have xattributes at all. It would probably make more sense to add recursion features concerning xattr to the find command, or invent a new one. So here come(s) my question(s): ------------------------------- Does it make sense to further develop a C version? Assuming "no". Is there a reason why Bob-xattr and Apple-xattr do not agree on a common API? Is there any discussion somewhere that leads these decisions? What is you intention, how should xattr functionality be in future? Also in the light of compatibility with other OSses? Where can the Apple version be downloaded, when you try to re-install your system python? I think it would be good to clarify this a bit, and maybe to collect some information for (mostly) newbies like me. Would the python mac wiki be a good place? cheers -- chris -- Christian Tismer :^) tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ From njriley at illinois.edu Sun Oct 3 04:24:39 2010 From: njriley at illinois.edu (Nicholas Riley) Date: Sat, 2 Oct 2010 21:24:39 -0500 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: <4CA79814.3030302@v.loewis.de> References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> <20101002203205.GA24940@illinois.edu> <4CA79814.3030302@v.loewis.de> Message-ID: <20101003022438.GA4247@illinois.edu> On Sat, Oct 02, 2010 at 10:37:40PM +0200, "Martin v. L?wis" wrote: > > I'm already running a Jython buildslave on an Intel Mac Pro which is > > pretty underused - I'd be happy to run a CPython one there too, if > > it'd be worthwhile. > > I think Bill was specifically after Snow Leopard - what system are you > using? It's still on Leopard but I could use another (slower, but still probably fine) machine that has Snow Leopard on it. -- Nicholas Riley From janssen at parc.com Sat Oct 2 20:50:05 2010 From: janssen at parc.com (Bill Janssen) Date: Sat, 2 Oct 2010 11:50:05 PDT Subject: [Pythonmac-SIG] sad state of OS X Python testing... Message-ID: <42516.1286045405@parc.com> Folks, I was looking at the buildbots again. Do you realize that we have no OS X Snow Leopard buildbot? No Intel Leopard buildbot? Well over half of Mac users are using Snow Leopard, and we're not testing on that platform. In fact, the only Intel OS X machine we're testing on is a Core Duo, not a Core 2 Duo, and that's running Tiger. Surely someone could volunteer an old Intel Mac to run some tests? (Actually, two someones -- we'd need separate machines for Leopard and Snow Leopard.) I'd be happy to stick it in a server room at PARC and keep an eye on it. (Right now I've got a rack full of old eMacs and a G5 running PPC buildbots.) Perhaps we could get Apple to contribute some "seconds"? I believe donations to the PSF are deductible. Bill From alan.mcintyre at gmail.com Sat Oct 2 22:16:50 2010 From: alan.mcintyre at gmail.com (Alan McIntyre) Date: Sat, 2 Oct 2010 13:16:50 -0700 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: <4CA79129.8050900@v.loewis.de> References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> Message-ID: I have an Intel Core 2 Duo Mac that I was going to convert into a home file server in the next couple of weeks, and I'd be glad to set it up as a build slave as well. I don't remember what version of OS X it has on it (it's still packed up in the box), but it certainly won't be the latest one. On Sat, Oct 2, 2010 at 1:08 PM, "Martin v. L?wis" wrote: >> Surely someone could volunteer an old Intel Mac to run some tests? >> (Actually, two someones -- we'd need separate machines for Leopard and >> Snow Leopard.) ?I'd be happy to stick it in a server room at PARC and >> keep an eye on it. ?(Right now I've got a rack full of old eMacs and a >> G5 running PPC buildbots.) ?Perhaps we could get Apple to contribute >> some "seconds"? ?I believe donations to the PSF are deductible. > > The issue isn't really to get the hardware. The issue is to find > somebody to volunteer running a build slave. > > Regards, > Martin > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: http://mail.python.org/mailman/options/python-dev/alan.mcintyre%40gmail.com > From alan.mcintyre at gmail.com Sat Oct 2 22:25:44 2010 From: alan.mcintyre at gmail.com (Alan McIntyre) Date: Sat, 2 Oct 2010 13:25:44 -0700 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> Message-ID: On Sat, Oct 2, 2010 at 1:16 PM, Alan McIntyre wrote: > I have an Intel Core 2 Duo Mac that I was going to convert into a home > file server in the next couple of weeks, and I'd be glad to set it up > as a build slave as well. ?I don't remember what version of OS X it > has on it (it's still packed up in the box), but it certainly won't be > the latest one. I just looked and the install disc says it's 10.4.7. From krstic at solarsail.hcs.harvard.edu Sun Oct 3 02:25:48 2010 From: krstic at solarsail.hcs.harvard.edu (=?UTF-8?Q?Ivan_Krsti=C4=87?=) Date: Sat, 2 Oct 2010 17:25:48 -0700 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: <42516.1286045405@parc.com> References: <42516.1286045405@parc.com> Message-ID: <7BA24ABE-163C-4A11-B25F-7D833B5B1457@solarsail.hcs.harvard.edu> On Oct 2, 2010, at 11:50 AM, Bill Janssen wrote: > Perhaps we could get Apple to contribute some "seconds"? If you don't get a good solution soon, let me know off-list and I'll see if Apple can help. Cheers, -- Ivan Krsti? | http://radian.org From fourpaws3 at yahoo.com Sun Oct 3 04:17:32 2010 From: fourpaws3 at yahoo.com (Tom Smith) Date: Sat, 2 Oct 2010 19:17:32 -0700 (PDT) Subject: [Pythonmac-SIG] weather download Message-ID: <268501.30315.qm@web43405.mail.sp1.yahoo.com> I need to download weather images for animation later. Some of the images are updated every 12 hours, some six hours and others are updated every three hours. I have an applescript bringing me the twelve hour images. I figured maybe a shell script could handle the others. The problem is that I'm in Panther and a lot of the automation advances don't apply. So this will have to be hand-coded. maybe Python is a better solution? -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.hellmann at gmail.com Sun Oct 3 17:29:14 2010 From: doug.hellmann at gmail.com (Doug Hellmann) Date: Sun, 3 Oct 2010 11:29:14 -0400 Subject: [Pythonmac-SIG] framework build for 2.7 using old sqlite? Message-ID: <9207678A-3EA2-40F4-BEA0-F009DA224353@gmail.com> I'm trying to write a little program that uses the full text search extension module for sqlite with Python 2.7 on Snow Leopard. I installed Python by downloading the DMG file from python.org. According to the Python docs (http://docs.python.org/library/sqlite3.html#sqlite3.Connection.enable_load_extension), 2.7 should include the functions for handling extension modules, but when I try to use them they are not defined (I get an AttributeError when I call the related methods on the Connection object). In Modules/_sqlite/connection.c I see that there is an #ifdef for HAVE_LOAD_EXTENSION, which is in turn only defined if both the version number is high enough and SQLITE_OMIT_LOAD_EXTENSION is not set. I think the problem is that the build of Python in the DMG I download was created with an old version of the SQLite libraries: farnsworth:dhellmann:~:503 $ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python farnsworth:dhellmann:~:501 $ python Python 2.7 (r27:82508, Jul 3 2010, 21:12:11) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> sqlite3.version_info (2, 6, 0) Can anyone confirm that the installer image for OS X 10.5 and later (http://python.org/ftp/python/2.7/python-2.7-macosx10.5.dmg) was created with an old SQLite library? Is there some way to update that DMG, or do I need to build Python from source myself? Thanks, Doug From doug.hellmann at gmail.com Sun Oct 3 18:39:35 2010 From: doug.hellmann at gmail.com (Doug Hellmann) Date: Sun, 3 Oct 2010 12:39:35 -0400 Subject: [Pythonmac-SIG] framework build for 2.7 using old sqlite? In-Reply-To: <9207678A-3EA2-40F4-BEA0-F009DA224353@gmail.com> References: <9207678A-3EA2-40F4-BEA0-F009DA224353@gmail.com> Message-ID: <698BF31E-E9D4-4820-A75D-D8BF7D04BF6D@gmail.com> On Oct 3, 2010, at 11:29 AM, Doug Hellmann wrote: > I'm trying to write a little program that uses the full text search extension module for sqlite with Python 2.7 on Snow Leopard. I installed Python by downloading the DMG file from python.org. According to the Python docs (http://docs.python.org/library/sqlite3.html#sqlite3.Connection.enable_load_extension), 2.7 should include the functions for handling extension modules, but when I try to use them they are not defined (I get an AttributeError when I call the related methods on the Connection object). > > In Modules/_sqlite/connection.c I see that there is an #ifdef for HAVE_LOAD_EXTENSION, which is in turn only defined if both the version number is high enough and SQLITE_OMIT_LOAD_EXTENSION is not set. > > I think the problem is that the build of Python in the DMG I download was created with an old version of the SQLite libraries: > > farnsworth:dhellmann:~:503 $ which python > /Library/Frameworks/Python.framework/Versions/2.7/bin/python > > farnsworth:dhellmann:~:501 $ python > Python 2.7 (r27:82508, Jul 3 2010, 21:12:11) > [GCC 4.0.1 (Apple Inc. build 5493)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import sqlite3 > >>> sqlite3.version_info > (2, 6, 0) Forget that, the version info is for pysqlite, not the underlying libraries. I found that Python's setup.py has SQLITE_OMIT_LOAD_EXTENSION set, which disables this feature (http://svn.python.org/view?view=rev&revision=78688). Doug From nathan.stocks at gmail.com Sun Oct 3 20:40:22 2010 From: nathan.stocks at gmail.com (Nathan) Date: Sun, 3 Oct 2010 12:40:22 -0600 Subject: [Pythonmac-SIG] weather download In-Reply-To: <268501.30315.qm@web43405.mail.sp1.yahoo.com> References: <268501.30315.qm@web43405.mail.sp1.yahoo.com> Message-ID: What is the problem that you're trying to solve? If you're trying to figure a way to automate running something in Panther, you could probably just run whatever download command you want to use from cron. http://windowsdevcenter.com/pub/a/mac/excerpt/runmacxpanther8/index.html?page=last ~ Nathan On Sat, Oct 2, 2010 at 8:17 PM, Tom Smith wrote: > I need to download weather images for animation later. > Some of the images are updated every 12 hours, some six hours and others > are updated every three hours. > I have an applescript bringing me the twelve hour images. > > I figured maybe a shell script could handle the others. > > The problem is that I'm in Panther and a lot of the automation advances > don't apply. > So this will have to be hand-coded. > > maybe Python is a better solution? > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan.stocks at gmail.com Sun Oct 3 21:29:33 2010 From: nathan.stocks at gmail.com (Nathan) Date: Sun, 3 Oct 2010 13:29:33 -0600 Subject: [Pythonmac-SIG] xattr question In-Reply-To: <4CA7C11E.4040207@stackless.com> References: <4CA7C11E.4040207@stackless.com> Message-ID: On Sat, Oct 2, 2010 at 5:32 PM, Christian Tismer wrote: > Where can the Apple version be downloaded, when you try to re-install > your system python? For all open-source stuff from Apple, you can always check the list at: http://www.apple.com/opensource/ It has a link to the xattr project they include in OS X. ~ Nathan From tismer at stackless.com Sun Oct 3 22:40:04 2010 From: tismer at stackless.com (Christian Tismer) Date: Sun, 03 Oct 2010 22:40:04 +0200 Subject: [Pythonmac-SIG] xattr question In-Reply-To: References: <4CA7C11E.4040207@stackless.com> Message-ID: <4CA8EA24.1080302@stackless.com> On 10/3/10 9:29 PM, Nathan wrote: > On Sat, Oct 2, 2010 at 5:32 PM, Christian Tismer wrote: >> Where can the Apple version be downloaded, when you try to re-install >> your system python? > For all open-source stuff from Apple, you can always check the list at: > > http://www.apple.com/opensource/ > > It has a link to the xattr project they include in OS X. > > ~ Nathan Thanks a lot for this hint, which would be useful in general, but makes very little sense, because it is exactly contradicting you, linking to http://undefined.org/python/#xattr and this is Bob's site. So I assume you have hit the send button too early before reading on. The cycle is closed, and I still can't tell where Apple's version comes from. -- Christian Tismer :^) tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ From richard.fuhr at gmail.com Tue Oct 5 00:51:21 2010 From: richard.fuhr at gmail.com (Richard Fuhr) Date: Mon, 04 Oct 2010 15:51:21 -0700 Subject: [Pythonmac-SIG] Newbie Python User Question About IDLE (File > New Window seems to disable IDLE) Message-ID: <4CAA5A69.5050109@gmail.com> An HTML attachment was scrubbed... URL: From pythonmac at rebertia.com Tue Oct 5 03:21:49 2010 From: pythonmac at rebertia.com (Chris Rebert) Date: Mon, 4 Oct 2010 18:21:49 -0700 Subject: [Pythonmac-SIG] Newbie Python User Question About IDLE (File > New Window seems to disable IDLE) In-Reply-To: <4CAA5A69.5050109@gmail.com> References: <4CAA5A69.5050109@gmail.com> Message-ID: On Mon, Oct 4, 2010 at 3:51 PM, Richard Fuhr wrote: > I am a new Python user and have started to explore a few of its basic > capabilities using IDLE > > I am running Mac OS X Snow Leopard ( version 10.6.4 ) > with Python Version 2.6.1 > ?????????????? Tk Version 8.5 > ??????????? IDLE Version 2.6.1 > > If I launch IDLE and enter Python statements in the initial window that is > presented, all seems fine. > > However, if, in the IDLE session, I invoke the menu item File > New Window > a new window does appear, but I can not type anything into it, and, worse > yet, can not type anything into > the original IDLE session window either, and have to do a force quit. > > Does anyone have any suggestions as to how to properly use the File > New > Window feature of IDLE on the Mac? > > PS - Since first posting this question on another discussion group, I have > been told that there are indeed problems > with some versions of IDLE on the Mac, and was also urged to post this > question here on the pythonmac-sig group > for additional guidance. I can confirm that under Snow Leopard's system/Framework Python+IDLE, doing File -> New Window creates a new window without any window decoration and then causes IDLE to hang. However, there is no such problem with my Python 2.6.5 X11-based IDLE from Fink. You might consider installing another Python from Fink[1] or MacPorts[2], since you don't want to muck around with the system Python anyway (you'll surely want to install 3rd party Python modules/packages at some point). Its IDLE ought to work. [1]: http://www.finkproject.org/ [2]: http://www.macports.org/ Cheers, Chris -- http://blog.rebertia.com From dan at rosspixelworks.com Tue Oct 5 03:49:11 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Mon, 04 Oct 2010 20:49:11 -0500 Subject: [Pythonmac-SIG] Pygame and py2app 0.5.2 Message-ID: <7dd3f77c487aa47628d63e55a8c986c6@rosspixelworks.com> Hi all- I'm getting the following error when trying to launch a bundled Pygame app: 10/4/10 8:43:42 PM [0x0-0x584584].org.pythonmac.unspecified.Cupcake[73356] ImportError: dlopen(/Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so, 2): no suitable image found. Did find: 10/4/10 8:43:42 PM [0x0-0x584584].org.pythonmac.unspecified.Cupcake[73356] /Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so: no matching architecture in universal wrapper The game launches fine from VIM or the command line. This had been working with an earlier version of py2app. I'm guessing it's a 32 vs 64 bit problem of some sort? Any direction would be appreciated. Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at rosspixelworks.com Tue Oct 5 03:55:19 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Mon, 04 Oct 2010 20:55:19 -0500 Subject: [Pythonmac-SIG] Pygame and py2app 0.5.2 Message-ID: Nevermind. It was ActiveState's Python and pygame not playing nicely..... -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Tue Oct 5 05:39:58 2010 From: nad at acm.org (Ned Deily) Date: Mon, 04 Oct 2010 20:39:58 -0700 Subject: [Pythonmac-SIG] Newbie Python User Question About IDLE (File > New Window seems to disable IDLE) References: <4CAA5A69.5050109@gmail.com> Message-ID: In article , Chris Rebert wrote: > On Mon, Oct 4, 2010 at 3:51 PM, Richard Fuhr wrote: > > I am a new Python user and have started to explore a few of its basic > > capabilities using IDLE > > > > I am running Mac OS X Snow Leopard ( version 10.6.4 ) > > with Python Version 2.6.1 > > ?????????????? Tk Version 8.5 > > ??????????? IDLE Version 2.6.1 > > PS - Since first posting this question on another discussion group, I have > > been told that there are indeed problems > > with some versions of IDLE on the Mac, and was also urged to post this > > question here on the pythonmac-sig group > > for additional guidance. > > I can confirm that under Snow Leopard's system/Framework Python+IDLE, > doing File -> New Window creates a new window without any window > decoration and then causes IDLE to hang. > > However, there is no such problem with my Python 2.6.5 X11-based IDLE from > Fink. > You might consider installing another Python from Fink[1] or > MacPorts[2], since you don't want to muck around with the system > Python anyway (you'll surely want to install 3rd party Python > modules/packages at some point). Its IDLE ought to work. Another option is to use the python.org 2.6.6 installer for Mac OS X which uses the Apple-supplied Aqua Tk 8.4 or an ActiveState Tk 8.4 (if you install it), so it does not use X11. It's 32-bit only but IDLE and Tkinter work just fine. You can download it from here: http://www.python.org/download/releases/2.6.6/ By the way, Python 2.7 is already out. There are two OS X installers for 2.7. If you want to try 2.7 and use IDLE, stick with the 32-bit "for 10.3 and later" installer; there are problems with the "10.5 and later" when used on 10.6 that will be fixed in the next release. http://www.python.org/download/releases/2.7/ If you want to be on the cutting edge of new Python features, look at Python 3. Python 3.1.2 is the most recent stable release; 3.2 is currently in alpha testing. But there are some major incompatibilities between Python 2 and 3 and the two versions will co-exist for some time. -- Ned Deily, nad at acm.org From richard.fuhr at gmail.com Tue Oct 5 07:52:13 2010 From: richard.fuhr at gmail.com (Richard Fuhr) Date: Mon, 4 Oct 2010 22:52:13 -0700 Subject: [Pythonmac-SIG] Newbie Python User Question About IDLE (File > New Window seems to disable IDLE) In-Reply-To: References: <4CAA5A69.5050109@gmail.com> Message-ID: Thanks! I tried Python 2.6.6 for Mac OS X via http://www.python.org/download/releases/2.6.6/ and it looks like IDLE is working properly now. Am about to take a University of Washington Python programming class here in Seattle, and the instructor will be focusing on the 2.x versions during Autumn Quarter, On Mon, Oct 4, 2010 at 8:39 PM, Ned Deily wrote: > In article > , > Chris Rebert wrote: > > > On Mon, Oct 4, 2010 at 3:51 PM, Richard Fuhr > wrote: > > > I am a new Python user and have started to explore a few of its basic > > > capabilities using IDLE > > > > > > I am running Mac OS X Snow Leopard ( version 10.6.4 ) > > > with Python Version 2.6.1 > > > Tk Version 8.5 > > > IDLE Version 2.6.1 > > > PS - Since first posting this question on another discussion group, I > have > > > been told that there are indeed problems > > > with some versions of IDLE on the Mac, and was also urged to post this > > > question here on the pythonmac-sig group > > > for additional guidance. > > > > I can confirm that under Snow Leopard's system/Framework Python+IDLE, > > doing File -> New Window creates a new window without any window > > decoration and then causes IDLE to hang. > > > > However, there is no such problem with my Python 2.6.5 X11-based IDLE > from > > Fink. > > You might consider installing another Python from Fink[1] or > > MacPorts[2], since you don't want to muck around with the system > > Python anyway (you'll surely want to install 3rd party Python > > modules/packages at some point). Its IDLE ought to work. > > Another option is to use the python.org 2.6.6 installer for Mac OS X > which uses the Apple-supplied Aqua Tk 8.4 or an ActiveState Tk 8.4 (if > you install it), so it does not use X11. It's 32-bit only but IDLE and > Tkinter work just fine. You can download it from here: > > http://www.python.org/download/releases/2.6.6/ > > By the way, Python 2.7 is already out. There are two OS X installers > for 2.7. If you want to try 2.7 and use IDLE, stick with the 32-bit > "for 10.3 and later" installer; there are problems with the "10.5 and > later" when used on 10.6 that will be fixed in the next release. > > http://www.python.org/download/releases/2.7/ > > If you want to be on the cutting edge of new Python features, look at > Python 3. Python 3.1.2 is the most recent stable release; 3.2 is > currently in alpha testing. But there are some major incompatibilities > between Python 2 and 3 and the two versions will co-exist for some time. > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian at prinoth.name Tue Oct 5 09:29:37 2010 From: christian at prinoth.name (Christian Prinoth) Date: Tue, 5 Oct 2010 09:29:37 +0200 Subject: [Pythonmac-SIG] State of AppScript Message-ID: Hi, I tried to post a question on this mailing list about AppScript, but nobody replied. I then noticed that most questions about appscript remain unanswered. So I am wondering, what is the state of appscript? Is it under active development? Is anybody using it seriously? Is this mailing list the correct place for support? Thanks Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Tue Oct 5 11:05:02 2010 From: nad at acm.org (Ned Deily) Date: Tue, 05 Oct 2010 02:05:02 -0700 Subject: [Pythonmac-SIG] appscript and mail.app, how to access attachments? References: Message-ID: In article , Christian Prinoth wrote: > I am trying the following: > > mail=app('mail') > msgs=mail.selection() > msg=msgs[0] > > now I would like to use > msg.mail_attachments > but this won't work. If I ask for help, under elements I get the following: > > Elements: > AEType("attc") -- by name, index, relative, range, test, id > bcc_recipients -- by name, index, relative, range, test > cc_recipients -- by name, index, relative, range, test > headers -- by name, index, relative, range, test > recipients -- by name, index, relative, range, test > to_recipients -- by name, index, relative, range, test > > How do I access the attachments? I'm not a Appscript expert but, taking a clue from an earlier answer[1] by has, it appears that there is something problematic about the 10.6 Mail.app scripting terminology. You can see also see that by trying to the ASTranslate.app tool available from the appscript web site. One way to work around it is to use the lower-level aem API to construct a reference using the raw AE codes. >>> from appscript import * >>> import aem >>> mail = app("Mail") >>> msg = mail.selection()[0] >>> msg app(u'/Applications/Mail.app').mailboxes[u'In/InMail'].messages.ID(206990 ) >>> aemref = msg.AS_aemreference.property("attc") >>> attachment = mail.AS_newreference(aemref) >>> attachment app(u'/Applications/Mail.app').AS_newreference(app.elements('mbxp').bynam e(u'In/InMail').elements('mssg').byid(206990).property('attc')) >>> attachment()[0].properties() {k.name: u'20100925_005-001.jpg', aem.AEType('attp'): u'image/jpeg', aem.AEType('atdn'): True, k.class_: aem.AEType('attc'), aem.AEType('atsz'): 387441, k.id: u'2'} Hope that helps. [1] http://permalink.gmane.org/gmane.comp.python.apple/14658 -- Ned Deily, nad at acm.org From nad at acm.org Tue Oct 5 11:07:49 2010 From: nad at acm.org (Ned Deily) Date: Tue, 05 Oct 2010 02:07:49 -0700 Subject: [Pythonmac-SIG] State of AppScript References: Message-ID: In article , Christian Prinoth wrote: > Hi, I tried to post a question on this mailing list about AppScript, but > nobody replied. I then noticed that most questions about appscript remain > unanswered. So I am wondering, what is the state of appscript? Is it under > active development? Is anybody using it seriously? Is this mailing list the > correct place for support? I disagree, I think most questions about appscript are answered and quite often by has himself, the developer of appscript. It is most definitely being used seriously and is well-supported. Note there is contact information in the appscript website (http://appscript.sourceforge.net/discuss.html). P.S. I've posted a reply to your original inquiry. Perhaps has will chime in with the definitive answer. -- Ned Deily, nad at acm.org From jf at ai.univ-paris8.fr Tue Oct 5 11:10:09 2010 From: jf at ai.univ-paris8.fr (Feat) Date: Tue, 5 Oct 2010 11:10:09 +0200 Subject: [Pythonmac-SIG] PyQt won't install Message-ID: hi there! Im running Mac OS X 10.5.8 and Python 2.5.2; having successfully installed: - the latest Qt SDK I could find [mac open source] - the latest SIP [4.11.1] that I succeeded to build (1) I should be able to install PyQt 4.7.7, but even the first configure phase (2) fails when invoking a "QT" command that doesn't exist: >Qt v4.7.0 free edition is being used. >Qt is built as a framework. >SIP 4.11.1 is being used. > ... ... ... >Generating the C++ source for the QtCore module... >sh: QT: command not found what am I missing? has anybody else encountered this issue? how did you solve it? (1) the latest SIP [4.11.2] fails when running the "make install" command (2) this is the usual "python configure.py" command, as recommended in the README file -- Jym Feat ~ Paris FR 75018 From christian at prinoth.name Tue Oct 5 13:45:13 2010 From: christian at prinoth.name (Christian Prinoth) Date: Tue, 5 Oct 2010 13:45:13 +0200 Subject: [Pythonmac-SIG] Pythonmac-SIG Digest, Vol 90, Issue 6 In-Reply-To: References: Message-ID: Thanks for your reply, I was actually just trying to stir the waters a bit, no offense intended ;) appscript is one of the most useful pieces of software on my mac, I could not live without it! Also thanks for your answer to my problem. The link you provided gave me some very useful insight. I guess many apps (think excel!) have buggy applescript implementations and this trick provides a nice solution. Christian On Tue, Oct 5, 2010 at 12:00, wrote: > ---------- Forwarded message ---------- > From: Ned Deily > To: pythonmac-sig at python.org > Date: Tue, 05 Oct 2010 02:07:49 -0700 > Subject: Re: [Pythonmac-SIG] State of AppScript > In article > > >, > Christian Prinoth wrote: > > Hi, I tried to post a question on this mailing list about AppScript, but > > nobody replied. I then noticed that most questions about appscript remain > > unanswered. So I am wondering, what is the state of appscript? Is it > under > > active development? Is anybody using it seriously? Is this mailing list > the > > correct place for support? > > I disagree, I think most questions about appscript are answered and > quite often by has himself, the developer of appscript. It is most > definitely being used seriously and is well-supported. Note there is > contact information in the appscript website > (http://appscript.sourceforge.net/discuss.html). > > P.S. I've posted a reply to your original inquiry. Perhaps has will > chime in with the definitive answer. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apt.shansen at gmail.com Tue Oct 5 19:08:59 2010 From: apt.shansen at gmail.com (Stephen Hansen) Date: Tue, 5 Oct 2010 10:08:59 -0700 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: <4CA79814.3030302@v.loewis.de> References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> <20101002203205.GA24940@illinois.edu> <4CA79814.3030302@v.loewis.de> Message-ID: On Sat, Oct 2, 2010 at 1:37 PM, "Martin v. L?wis" wrote: > > I'm already running a Jython buildslave on an Intel Mac Pro which is > > pretty underused - I'd be happy to run a CPython one there too, if > > it'd be worthwhile. > > I think Bill was specifically after Snow Leopard - what system are you > using? > I have a fairly recent MacPro on Snow Leopard, which I keep consistently up to date and its connected all the time. It has more capacity then I can really find use for. If its still needed, I can set up buildbot to run on it today. Is it all pull/poll oriented, or does the slave need to be connected to by the master? Meaning, do I need to poke a hole in the firewall to allow any external access? The BuildBot page only mentions outgoing access (or I'm misunderstanding it). IIUC, I just need a name/password to tell buildbot to connect to, right? -- Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From emoy at apple.com Tue Oct 5 19:34:41 2010 From: emoy at apple.com (Edward Moy) Date: Tue, 5 Oct 2010 10:34:41 -0700 Subject: [Pythonmac-SIG] xattr question In-Reply-To: <4CA8EA24.1080302@stackless.com> References: <4CA7C11E.4040207@stackless.com> <4CA8EA24.1080302@stackless.com> Message-ID: <88D76C84-3B19-416B-9A61-9B97E0DD5871@apple.com> On Oct 3, 2010, at 1:40 PM, Christian Tismer wrote: > On 10/3/10 9:29 PM, Nathan wrote: >> On Sat, Oct 2, 2010 at 5:32 PM, Christian Tismer wrote: >>> Where can the Apple version be downloaded, when you try to re-install >>> your system python? >> For all open-source stuff from Apple, you can always check the list at: >> >> http://www.apple.com/opensource/ >> >> It has a link to the xattr project they include in OS X. >> >> ~ Nathan > > Thanks a lot for this hint, which would be useful in general, but makes > very little sense, because it is exactly contradicting you, linking to > http://undefined.org/python/#xattr and this is Bob's site. > So I assume you have hit the send button too early before reading on. > The cycle is closed, and I still can't tell where Apple's version comes > from. Try: http://www.opensource.apple.com/source/python_modules/python_modules-21/xattr/xattr.partial OpenSourceProject xattr OpenSourceVersion 0.5 OpenSourceWebsiteURL http://undefined.org/python/#xattr OpenSourceURL https://svn.red-bean.com/bob/xattr/releases/xattr-0.5/ OpenSourceImportDate 2007-06-01 OpenSourceLicense PSFL OpenSourceLicenseFile python_modules.txt OpenSourceModifications improve error handling replaced xattr script with improved version hex output for binary with -l hex input for -w with -x flag So the frontend script was replaced with a new one, but the extension is still Bob's xattr. -------------------------------------------------------------------------- Edward Moy Apple Inc. emoy at apple.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tismer at stackless.com Tue Oct 5 21:06:28 2010 From: tismer at stackless.com (Christian Tismer) Date: Tue, 05 Oct 2010 21:06:28 +0200 Subject: [Pythonmac-SIG] xattr question In-Reply-To: <88D76C84-3B19-416B-9A61-9B97E0DD5871@apple.com> References: <4CA7C11E.4040207@stackless.com> <4CA8EA24.1080302@stackless.com> <88D76C84-3B19-416B-9A61-9B97E0DD5871@apple.com> Message-ID: <4CAB7734.9090908@stackless.com> On 10/5/10 7:34 PM, Edward Moy wrote: > On Oct 3, 2010, at 1:40 PM, Christian Tismer wrote: ... > Try: > > http://www.opensource.apple.com/source/python_modules/python_modules-21/xattr/xattr.partial > > OpenSourceProject > xattr > OpenSourceVersion > 0.5 > OpenSourceWebsiteURL > http://undefined.org/python/#xattr > OpenSourceURL > https://svn.red-bean.com/bob/xattr/releases/xattr-0.5/ > OpenSourceImportDate > 2007-06-01 > OpenSourceLicense > PSFL > OpenSourceLicenseFile > python_modules.txt > OpenSourceModifications > > improve error handling > replaced xattr script with improved version > hex output for binary with -l > hex input for -w with -x flag > > > So the frontend script was replaced with a new one, but the extension > is still Bob's xattr. > > -------------------------------------------------------------------------- > > Edward Moy > > Apple Inc. > > emoy at apple.com > > Whow! This was extremely helpful. It was not obvious for me to find that link. Thank you very much! Would it make sense if I prepared a combined version that contains Bob's additions as well? Then I would offer to do this, to unify things, and send an update, with tests of course. cheers - chris -- Christian Tismer :^) tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at v.loewis.de Tue Oct 5 21:21:27 2010 From: martin at v.loewis.de (=?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?=) Date: Tue, 05 Oct 2010 21:21:27 +0200 Subject: [Pythonmac-SIG] [Python-Dev] sad state of OS X Python testing... In-Reply-To: References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> <20101002203205.GA24940@illinois.edu> <4CA79814.3030302@v.loewis.de> Message-ID: <4CAB7AB7.8040305@v.loewis.de> > I have a fairly recent MacPro on Snow Leopard, which I > keep consistently up to date and its connected all the time. It has more > capacity then I can really find use for. > > If its still needed, I can set up buildbot to run on it today. That would be nice. > Is it all > pull/poll oriented, or does the slave need to be connected to by the > master? It uses Perspective Broker, if that's of any help. The slave creates an outgoing TCP connection (which should be kept up all the time), but the master pushes commands over that connection, no polling. > IIUC, I just need a name/password to tell buildbot to connect to, right? Correct. However, I wouldn't want to create that unless you had all the software in place already - else I find myself often waiting for some time, then removing the slave again. Regards, Martin From tismer at stackless.com Wed Oct 6 02:50:44 2010 From: tismer at stackless.com (Christian Tismer) Date: Wed, 06 Oct 2010 02:50:44 +0200 Subject: [Pythonmac-SIG] PyQt won't install In-Reply-To: References: Message-ID: <4CABC7E4.10607@stackless.com> > hi there! > > Im running Mac OS X 10.5.8 and Python 2.5.2; > having successfully installed: > - the latest Qt SDK I could find [mac open source] > - the latest SIP [4.11.1] that I succeeded to build (1) > > I should be able to install PyQt 4.7.7, but even the first configure phase (2) fails when invoking a "QT" command that doesn't exist: > >> Qt v4.7.0 free edition is being used. >> Qt is built as a framework. >> SIP 4.11.1 is being used. >> ... ... ... >> Generating the C++ source for the QtCore module... >> sh: QT: command not found > what am I missing? > > has anybody else encountered this issue? > > how did you solve it? > > (1) the latest SIP [4.11.2] fails when running the "make install" command > (2) this is the usual "python configure.py" command, as recommended in the README file > Hi Jym, although I had successfully installed the previous version of Qt, PyQt and Eric4 already, I took the chance to check out the new version. I deinstalled it all completely and used the pre-installed Python 2.6 of Snow Leopard, only. Intesting size increase, btw: qt-sdk-mac-opensource-2010.04.dmg 584.3 MB qt-sdk-mac-opensource-2010.05.dmg 972 MB The majority is in the debug libraries, from 341.4 MB to 733.5 MB. Then I followed http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#downloading-sip using the official download links for sip-4.11.1.tar.gz and QScintilla-gpl-2.4.5.tar.gz . For SIP, I used i386, because I need it for psyco. python configure.py --arch i386 --sdk MacOSX10.4u.sdk make sudo make install Then, configured and made PyQt, accordingly,. python configure.py --use-arch i386 make sudo make install This all worked smootly. Then I installed QScintilla, using doc/html-Qt4/index.html . To figure out how to build it for 32 bit, I had to read quite a bit more: http://doc.trolltech.com/4.2/qmake-platform-notes.html qmake qscintilla.pro-spec macx-g++ "CONFIG += x86" make sudo make install And then the Python bindings, which uses the right flags now automatically. python configure.py make make install I stopped here, but I guess the need for the above settings will repeat for example-Qt4 and designer-Qt4 . Your differences are Mac OS X 10.5.8 and Python 2.5.2, so you will have 32 bit by default. I will wait for your reply, and if it does not work still, I will do a python 2.5 trial as well. So far I don't see what could be wrong. Alas, I cannot test on 10.5 . hope you can find it - ciao -- chris -- Christian Tismer :^) tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jf at ai.univ-paris8.fr Wed Oct 6 06:21:12 2010 From: jf at ai.univ-paris8.fr (Feat) Date: Wed, 6 Oct 2010 06:21:12 +0200 Subject: [Pythonmac-SIG] PyQt won't install In-Reply-To: <4CABC7E4.10607@stackless.com> References: <4CABC7E4.10607@stackless.com> Message-ID: At 2:50 +0200 6/10/10, Christian Tismer wrote: >For SIP, I used i386, because I need it for psyco. thanks, Chris: this part also went smooth for me -- as long as I do not try to use the latest SIP 4.11.2 >Then, configured and made PyQt, accordingly yes: it goes as far as generating the C++ source code and compiling it to object code, no problem! but then, this is where it breaks because of the missing QT command: it won't even write the make file for the next step, so I'm stuck... any idea what is that QT program, where it should be, and what it is used for? and which of the above steps should have put it where it belongs? because if I don't solve this, then I cannot configure PyQt, meaning I cannot build the QtCore module... -- Jym Feat ~ Paris FR 75018 From tismer at stackless.com Wed Oct 6 16:26:01 2010 From: tismer at stackless.com (Christian Tismer) Date: Wed, 06 Oct 2010 16:26:01 +0200 Subject: [Pythonmac-SIG] PyQt won't install In-Reply-To: References: Message-ID: <4CAC86F9.6000909@stackless.com> On 10/5/10 11:10 AM, Feat wrote: > hi there! > > Im running Mac OS X 10.5.8 and Python 2.5.2; > having successfully installed: > - the latest Qt SDK I could find [mac open source] > - the latest SIP [4.11.1] that I succeeded to build (1) > > I should be able to install PyQt 4.7.7, but even the first configure phase (2) fails when invoking a "QT" command that doesn't exist: > >> Qt v4.7.0 free edition is being used. >> Qt is built as a framework. >> SIP 4.11.1 is being used. >> ... ... ... >> Generating the C++ source for the QtCore module... >> sh: QT: command not found > Ok, I'm getting a bit closer. The only location where the "QT" string exists in exactly that case is line 1819 of configure.py in function get_qt_configuration(). The f.write creates qtdir.pro and writes (in my case) CONFIG += x86 QT = core # This is for certain broken Linux distros and is needed to make sure that # QT_SHARED is properly defined. CONFIG += link_prl TARGET = qtdirs SOURCES = qtdirs.cpp You don't have set that config extra, so your first line in the file is QT = core I can generate your error message this way: $ sh -c "QT = core" sh: QT: command not found That is wrong sh syntax of course, no white space allowed. For some reason that I don't understand yet, the qtdirs.pro appears to get executed by sh, although it is meant as input file for qmake. It is hard to guess what's going wrong, but it looks like some misconfiguration of your machine, maybe you can check qmake, maybe a crosslink with /bin/sh, or something else is weird: $ which -a qmake /usr/bin/qmake $ qmake -v QMake version 2.01a Using Qt version 4.7.0 in /Library/Frameworks $ Or do you use some 3rd party python executable, anything non-standard? Anything interfering with the install that overwrites files? As a last resort, if you cannot find a clue, use pdb to debug configure.py: Start at the last visible working point, that is line 1502, and add import pdb; pdb.set_trace() Then start the installation. It should stop with the output Generating the C++ source for the QtCore module... and give you the pdb prompt. Then step over line, using the "s" key, until you get the but. Then restart and use the "n" command to dig into the called functions. This way you should be able to find out what it is trying to execute. Let me know if that gets you any further. cheers -- chris -- Christian Tismer :^) tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From rowen at uw.edu Wed Oct 6 20:25:14 2010 From: rowen at uw.edu (Russell E. Owen) Date: Wed, 06 Oct 2010 11:25:14 -0700 Subject: [Pythonmac-SIG] New binary installers for matplotlib and PIL for python 2.6 Message-ID: I built new binary installers for PIL 1.1.7 and matplotlib 1.0.0 for Mac Python 2.6 (from python.org). They are available here for now (though I hope to get them into the standard distributions): I built these on Mac OS X 10.4 and have briefly tested them on 10.3.9 PPC, 10.4 Intel and 10.5 Intel. I would be grateful for any testing anyone can do. I plan to build installers for Python 2.7 next, when I can find some time. -- Russell From jefferis at gmail.com Thu Oct 7 01:14:14 2010 From: jefferis at gmail.com (Gregory Jefferis) Date: Thu, 07 Oct 2010 00:14:14 +0100 Subject: [Pythonmac-SIG] Sending stdout/err to a text console in a py2app App Message-ID: Hello, I've made a simple python script to wrap a complex, long running shell script using easygui. Then I've used py2app to make a Mac Application. I'm happy except I would really like stdout/stderr from both my python wrapper script and the original shell script to be visible as the shell script runs. If I run the app from the Terminal that happens. But if I double click, everything gets sent to the system logs (which can be inspected with Console.app). Is there anyway I can send anything useful to that empty console windows that appears when I start the py2app ? Or a simple way to make a new console to which I can print. Thank you very much for any help you can offer, Greg. Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin MacOSX 10.5.8 intel -- Gregory Jefferis, PhD Division of Neurobiology MRC Laboratory of Molecular Biology, Hills Road, Cambridge, CB2 0QH, UK. http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis http://www.neuroscience.cam.ac.uk/directory/profile.php?gsxej2 http://flybrain.stanford.edu From hengist.podd at virgin.net Thu Oct 7 19:35:05 2010 From: hengist.podd at virgin.net (has) Date: Thu, 07 Oct 2010 18:35:05 +0100 Subject: [Pythonmac-SIG] State of AppScript Message-ID: <4CAE04C9.2060301@virgin.net> Christian Prinoth wrote: > Hi, I tried to post a question on this mailing list about AppScript, but > nobody replied. I then noticed that most questions about appscript remain > unanswered. So I am wondering, what is the state of appscript? Is it under > active development? Is anybody using it seriously? Is this mailing list the > correct place for support? It's supported, though I don't have much time for working on it these days. You're best posting questions on this list as there are a number of experienced users here who can often help. Regards, has -- Learn AppleScript, 3rd edition, Sanderson & Rosenthal: http://apress.com/book/view/9781430223610 Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From solipsis at pitrou.net Fri Oct 8 11:42:20 2010 From: solipsis at pitrou.net (Antoine Pitrou) Date: Fri, 8 Oct 2010 11:42:20 +0200 Subject: [Pythonmac-SIG] sad state of OS X Python testing... References: <42516.1286045405@parc.com> <4CA79129.8050900@v.loewis.de> <20101002203205.GA24940@illinois.edu> <4CA79814.3030302@v.loewis.de> Message-ID: <20101008114220.20369e20@pitrou.net> On Tue, 5 Oct 2010 10:08:59 -0700 Stephen Hansen wrote: > On Sat, Oct 2, 2010 at 1:37 PM, "Martin v. L?wis" wrote: > > > > I'm already running a Jython buildslave on an Intel Mac Pro which is > > > pretty underused - I'd be happy to run a CPython one there too, if > > > it'd be worthwhile. > > > > I think Bill was specifically after Snow Leopard - what system are you > > using? > > > > I have a fairly recent MacPro on Snow Leopard, which I keep consistently up > to date and its connected all the time. It has more capacity then I can > really find use for. Now that the buildbot is up, it is recommended that you try to investigate the failures (and the test_ttk_guionly crash), and that you create bugs reports on http://bugs.python.org for them. Thank you! Antoine. From rowen at uw.edu Fri Oct 8 20:09:04 2010 From: rowen at uw.edu (Russell E. Owen) Date: Fri, 08 Oct 2010 11:09:04 -0700 Subject: [Pythonmac-SIG] Problem bundling matplotlib with py2app: it looks for a font in /Library/Frameworks Message-ID: I have a Mac python application I bundle with py2app. It has successfully included matplotlib for several years. However recently I added strip charts to it and now I find that the Mac bundle is broken: when I run on a system that does not have matplotlib installed it dies with a traceback that ends with: Traceback (most recent call last): File ".../python2.6/RO/Wdg/Toplevel.py", line 138, in __init__ File ".../python2.6/TUI/Guide/GuideMonitor/GuideMonitorWindow.py", line 56, in __init__ File ".../python2.6/RO/Wdg/StripChartWdg.py", line 161, in __init__ File ".../python2.6/RO/Wdg/StripChartWdg.py", line 314, in _updateTimeAxis File ".../python2.6/matplotlib/backends/backend_tkagg.py", line 251, in draw File ".../python2.6/matplotlib/backends/backend_agg.py", line 394, in draw File ".../python2.6/matplotlib/artist.py", line 55, in draw_wrapper File ".../python2.6/matplotlib/figure.py", line 798, in draw File ".../python2.6/matplotlib/artist.py", line 55, in draw_wrapper File ".../python2.6/matplotlib/axes.py", line 1934, in draw File ".../python2.6/matplotlib/artist.py", line 55, in draw_wrapper File ".../python2.6/matplotlib/axis.py", line 1017, in draw File ".../python2.6/matplotlib/artist.py", line 55, in draw_wrapper File ".../python2.6/matplotlib/axis.py", line 234, in draw File ".../python2.6/matplotlib/artist.py", line 55, in draw_wrapper File ".../python2.6/matplotlib/text.py", line 524, in draw File ".../python2.6/matplotlib/text.py", line 298, in _get_layout File ".../python2.6/matplotlib/backends/backend_agg.py", line 180, in get_text_width_height_descent File ".../python2.6/matplotlib/backends/backend_agg.py", line 221, in _get_agg_font RuntimeError: Could not open facefile /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-pack ages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource where ... = /Users/rowen/TUI_1.8.2.1_Source/BuildForMac/dist/TUI.app/Contents/Resourc es/lib That font is available in the bundle itself: ls -l TUI.app/Contents/Resources/lib/python2.6/matplotlib/mpl-data/fonts/ttf total 4304 ... -rw-rw-r-- 1 rowen _rowen 65932 Jul 6 07:43 Vera.ttf -rw-rw-r-- 1 rowen _rowen 63208 Jul 6 07:43 VeraBI.ttf -rw-rw-r-- 1 rowen _rowen 58716 Jul 6 07:43 VeraBd.ttf -rw-rw-r-- 1 rowen _rowen 63684 Jul 6 07:43 VeraIt.ttf -rw-rw-r-- 1 rowen _rowen 55032 Jul 6 07:43 VeraMoBI.ttf -rw-rw-r-- 1 rowen _rowen 49052 Jul 6 07:43 VeraMoBd.ttf -rw-rw-r-- 1 rowen _rowen 54508 Jul 6 07:43 VeraMoIt.ttf -rw-rw-r-- 1 rowen _rowen 49224 Jul 6 07:43 VeraMono.ttf -rw-rw-r-- 1 rowen _rowen 60280 Jul 6 07:43 VeraSe.ttf -rw-rw-r-- 1 rowen _rowen 58736 Jul 6 07:43 VeraSeBd.ttf ... Does anyone have any ideas how to convince matplotlib to look for the font in the right place? -- Russell P.S. my configuration (though I've tried several others): - Mac OS X 10.5 or 10.4 - python 2.6.6 (from python.org) - matplotlib 1.0.0 (via the binary installer) - py2app 0.5.2 - setuptools 0.6c11 From rowen at uw.edu Fri Oct 8 20:23:12 2010 From: rowen at uw.edu (Russell E. Owen) Date: Fri, 08 Oct 2010 11:23:12 -0700 Subject: [Pythonmac-SIG] Sending stdout/err to a text console in a py2app App References: Message-ID: In article , Gregory Jefferis wrote: > Hello, > > I've made a simple python script to wrap a complex, long running shell > script using easygui. Then I've used py2app to make a Mac Application. I'm > happy except I would really like stdout/stderr from both my python wrapper > script and the original shell script to be visible as the shell script runs. > If I run the app from the Terminal that happens. But if I double click, > everything gets sent to the system logs (which can be inspected with > Console.app). > > Is there anyway I can send anything useful to that empty console windows > that appears when I start the py2app ? Or a simple way to make a new > console to which I can print. > > Thank you very much for any help you can offer, > > Greg. > > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > MacOSX 10.5.8 intel It would be so nice if py2applet had this built in. But alas it does not. I assume this is an "applet" that processes files you drop on it (since anything else typically needs a GUI to be useful as a double-clickable application instead of a command-line tool). So far the best I have come up with is RO.Wdg.DropletRunner, which is part of my RO package available at PyPI. Features: - It color codes the messages by source (stdout=black, stderr=red) - Once the script has processed your initial batch of files you can drag new files onto it to process those However, it has a few rough edges: - It requires a trivial script to run your script - It wants a simple property list in your setup.py to specify what kind of files can be dropped on the applet - It buffers the output more than I would like Regards, -- Russell From rowen at uw.edu Fri Oct 8 22:48:50 2010 From: rowen at uw.edu (Russell E. Owen) Date: Fri, 08 Oct 2010 13:48:50 -0700 Subject: [Pythonmac-SIG] Problem bundling matplotlib with py2app: it looks for a font in /Library/Frameworks References: Message-ID: In article , "Russell E. Owen" wrote: > I have a Mac python application I bundle with py2app. It has > successfully included matplotlib for several years. However recently I > added strip charts to it and now I find that the Mac bundle is broken: > when I run on a system that does not have matplotlib installed it dies > with a traceback...(could not find font file in /Library/Frameworks/Python...) I found the problem, though not a robust solution. The problem is that matplotlib is using the font cache in ~/.matplotlib. Sometimes this gets out of date and then font files cannot be found. Unfortunately matplotlib does not realize the data is bogus and so crashes instead of rebuilding the cache files. I have gotten two user reports of this problem. It also invalidates what I thought was a pretty solid test of whether my application is properly self-contained: move the Python, Tcl and Tk frameworks out of the way and then run my bundle. I have to also delete the matplotlib caches and then remember to delete them again after the test. It would be really, really nice to have a standard way of forcing matplotlib to ignore cache files (neither read nor write them). An adequate but less thorough solution is for matplotlib to test the font cache when it first loads it (e.g. by trying to find a font) and rebuild it if it doesn't work. -- Russell From antonio.gomez.soto at gmail.com Sat Oct 9 17:51:03 2010 From: antonio.gomez.soto at gmail.com (=?ISO-8859-1?Q?Antonio_Gom=E9z_Soto?=) Date: Sat, 09 Oct 2010 17:51:03 +0200 Subject: [Pythonmac-SIG] Creating environment to build re-distributable app Message-ID: <4CB08F67.2070201@gmail.com> Hi I am new to this list. I have a Windows/Linux developed wxPython program that I need to create a OSX version for that runs on various OSX platforms. I modified the app to run on OSX from my source directory, and now it runs correctly from there (I use Snow Leopard). I have forced the OSX supplied Python to run in 32-bit using VERSIONER_PYTHON_PREFER_32_BIT=yes, because some of my modules require that, and I can't fix those. I use appscript, twisted, and plan to use WebKit, which appararently only runs 32-bit. I am playing with py2app to create a bundle of my app, but I run into problems: 1. py2app seems to work, but the created app seems to run in 64-bit even if I do the 'defaults write com.apple.versioner.python Prefer-32-Bit -bool yes' command. I get the 'module' object has no attribute TickCount error, which according to Google means I am running in 64-bit mode. 2. I read on this list that I should not use the Apple-supplied Python, because py2app is setup to NOT include that in the build, and this way I cannot distribute my app. the posting said to build python2.6 from python.org, install all my modules, and work from there. 3. I have had bad experience so far building WebKit, because I used macports to get git, and that apparently took over my build environment, and that's why building WebKit failed. I am afraid macports is getting in the way here too. So what is the best way to handle this? Thanks, Antonio. From snearhoo at ksu.edu Mon Oct 11 20:02:56 2010 From: snearhoo at ksu.edu (Sam Nearhood) Date: Mon, 11 Oct 2010 14:02:56 -0400 (EDT) Subject: [Pythonmac-SIG] Py2app problem Message-ID: <51427748.63652.1286820176089.JavaMail.root@ksu-mailstore03.merit.edu> I am trying to build a program with py2app ($ python setup.py py2app) using Mac OS X 10.6.4 and Python 2.7. Right after it finishes bundling the application, the terminal stops with this output: Traceback (most recent call last): File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 604, in _run self.run_normal() File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 675, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 772, in create_binaries target, arcname, pkgexts, copyexts, target.script) File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 1215, in build_executable copy_resource(src, dest, dry_run=self.dry_run) File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py", line 96, in copy_resource copy_file(source, destination, dry_run=dry_run) File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py", line 101, in copy_file zf, zp = path_to_zip(source) File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py", line 133, in path_to_zip raise DistutilsFileError(path) DistutilsFileError: / > /Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py(133)path_to_zip() -> raise DistutilsFileError(path) (Pdb) I can't seem to find this problem answered elsewhere. Does anybody have any suggestions? Thanks, Sam From ronaldoussoren at mac.com Tue Oct 12 19:37:13 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 12 Oct 2010 19:37:13 +0200 Subject: [Pythonmac-SIG] Py2app problem In-Reply-To: <51427748.63652.1286820176089.JavaMail.root@ksu-mailstore03.merit.edu> References: <51427748.63652.1286820176089.JavaMail.root@ksu-mailstore03.merit.edu> Message-ID: <91E3BAEF-A721-430B-B216-9E642A565A1B@mac.com> On 11 Oct, 2010, at 20:02, Sam Nearhood wrote: > I am trying to build a program with py2app ($ python setup.py py2app) using Mac OS X 10.6.4 and Python 2.7. Right after it finishes bundling the application, the terminal stops with this output: > > > Traceback (most recent call last): > File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 604, in _run > self.run_normal() > File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 675, in run_normal > self.create_binaries(py_files, pkgdirs, extensions, loader_files) > File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 772, in create_binaries > target, arcname, pkgexts, copyexts, target.script) > File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/build_app.py", line 1215, in build_executable > copy_resource(src, dest, dry_run=self.dry_run) > File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py", line 96, in copy_resource > copy_file(source, destination, dry_run=dry_run) > File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py", line 101, in copy_file > zf, zp = path_to_zip(source) > File "/Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py", line 133, in path_to_zip > raise DistutilsFileError(path) > DistutilsFileError: / >> /Users/sam/Desktop/Program/py2app-0.5.2-py2.7.egg/py2app/util.py(133)path_to_zip() > -> raise DistutilsFileError(path) > (Pdb) > > > > I can't seem to find this problem answered elsewhere. Does anybody have any suggestions? If I interpret the stacktrace correctly one of the resources/datafiles you're trying to include in the application doesn't exist and py2app craps out in an unhelpful way. To find the path that is causing problems you can give the following two commands on the (Pdb) prompt: (Pdb) up (Pdb) p source BTW. It seems you're lucky in a way, the exeption only occurs with absolute paths (starting with a '/') while non-existing relative paths cause a hanging proces. Ronald > > Thanks, > Sam > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue Oct 12 19:46:19 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 12 Oct 2010 19:46:19 +0200 Subject: [Pythonmac-SIG] Py2app problem In-Reply-To: <91E3BAEF-A721-430B-B216-9E642A565A1B@mac.com> References: <51427748.63652.1286820176089.JavaMail.root@ksu-mailstore03.merit.edu> <91E3BAEF-A721-430B-B216-9E642A565A1B@mac.com> Message-ID: <0A090874-726D-425E-89D0-403A5E6E31AA@mac.com> On 12 Oct, 2010, at 19:37, Ronald Oussoren wrote: >> >> I can't seem to find this problem answered elsewhere. Does anybody have any suggestions? > > If I interpret the stacktrace correctly one of the resources/datafiles you're trying to include in the application doesn't exist and py2app craps out in an unhelpful way. > > To find the path that is causing problems you can give the following two commands on the (Pdb) prompt: > > (Pdb) up > (Pdb) p source > > BTW. It seems you're lucky in a way, the exeption only occurs with absolute paths (starting with a '/') while non-existing relative paths cause a hanging proces. The next release of py2app will print: error: File doesn't exist: dummy (Where "dummy" is the name of the data-file that couldn't be found) Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue Oct 12 19:57:39 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 12 Oct 2010 19:57:39 +0200 Subject: [Pythonmac-SIG] Creating environment to build re-distributable app In-Reply-To: <4CB08F67.2070201@gmail.com> References: <4CB08F67.2070201@gmail.com> Message-ID: On 9 Oct, 2010, at 17:51, Antonio Gom?z Soto wrote: > Hi > > I am new to this list. I have a Windows/Linux developed wxPython program > that I need to create a OSX version for that runs on various OSX platforms. > > I modified the app to run on OSX from my source directory, and now it runs > correctly from there (I use Snow Leopard). > > I have forced the OSX supplied Python to run in 32-bit using > VERSIONER_PYTHON_PREFER_32_BIT=yes, because some of my modules require that, > and I can't fix those. I use appscript, twisted, and plan to use WebKit, > which appararently only runs 32-bit. > > I am playing with py2app to create a bundle of my app, but I run into > problems: > > 1. py2app seems to work, but the created app seems to run in 64-bit > even if I do the 'defaults write com.apple.versioner.python Prefer-32-Bit -bool yes' > command. I get the 'module' object has no attribute TickCount error, which > according to Google means I am running in 64-bit mode. That's not entirely unexpected. You can work around this by converting the executable in YourApp.app/Contents/MacOS to a 32-bit only one using the lipo tool. > > 2. I read on this list that I should not use the Apple-supplied Python, because > py2app is setup to NOT include that in the build, and this way I cannot > distribute my app. That's not entirely correct. Py2app will indeed not include the Apple-supplied python into the app bundle, but you can redistribute the resulting binary. Your bundle will then require a SL system to run though. > the posting said to build python2.6 from python.org, > install all my modules, and work from there. That should work as well. > > 3. I have had bad experience so far building WebKit, because I used macports to > get git, and that apparently took over my build environment, and that's why > building WebKit failed. I am afraid macports is getting in the way here too. > > So what is the best way to handle this? Stop using macports? BTW. The system supplied version of WebKit runs in 64-bit mode, so that shouldn't be a problem. The nightly build (I checked WebKit r69429) also supports x86_64 on SnowLeopard, but not on OSX 10.5 (I wouldn't know why though). Ronald > > Thanks, > Antonio. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue Oct 12 19:58:37 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 12 Oct 2010 19:58:37 +0200 Subject: [Pythonmac-SIG] Sending stdout/err to a text console in a py2app App In-Reply-To: References: Message-ID: On 8 Oct, 2010, at 20:23, Russell E. Owen wrote: > In article , > Gregory Jefferis wrote: > >> Hello, >> >> I've made a simple python script to wrap a complex, long running shell >> script using easygui. Then I've used py2app to make a Mac Application. I'm >> happy except I would really like stdout/stderr from both my python wrapper >> script and the original shell script to be visible as the shell script runs. >> If I run the app from the Terminal that happens. But if I double click, >> everything gets sent to the system logs (which can be inspected with >> Console.app). >> >> Is there anyway I can send anything useful to that empty console windows >> that appears when I start the py2app ? Or a simple way to make a new >> console to which I can print. >> >> Thank you very much for any help you can offer, >> >> Greg. >> >> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) >> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin >> MacOSX 10.5.8 intel > > It would be so nice if py2applet had this built in. But alas it does not. Patches are appreciated. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue Oct 12 20:00:40 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 12 Oct 2010 20:00:40 +0200 Subject: [Pythonmac-SIG] Sending stdout/err to a text console in a py2app App In-Reply-To: References: Message-ID: On 7 Oct, 2010, at 1:14, Gregory Jefferis wrote: > Hello, > > I've made a simple python script to wrap a complex, long running shell > script using easygui. Then I've used py2app to make a Mac Application. I'm > happy except I would really like stdout/stderr from both my python wrapper > script and the original shell script to be visible as the shell script runs. > If I run the app from the Terminal that happens. But if I double click, > everything gets sent to the system logs (which can be inspected with > Console.app). > > Is there anyway I can send anything useful to that empty console windows > that appears when I start the py2app ? Or a simple way to make a new > console to which I can print. > > Thank you very much for any help you can offer, There is no built-in way to do this. The easiest workaround is to grab the output of the script yourself (which is easy when using the subprocess module) and display that using an easygui text widget. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue Oct 12 20:06:40 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 12 Oct 2010 20:06:40 +0200 Subject: [Pythonmac-SIG] Pygame and py2app 0.5.2 In-Reply-To: <7dd3f77c487aa47628d63e55a8c986c6@rosspixelworks.com> References: <7dd3f77c487aa47628d63e55a8c986c6@rosspixelworks.com> Message-ID: <012A5B5F-D618-4BD3-8315-A05FDFDDA4CE@mac.com> On 5 Oct, 2010, at 3:49, Dan Ross wrote: > Hi all- > > I'm getting the following error when trying to launch a bundled Pygame app: > > > 10/4/10 8:43:42 PM [0x0-0x584584].org.pythonmac.unspecified.Cupcake[73356] ImportError: dlopen(/Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so, 2): no suitable image found. Did find: > > 10/4/10 8:43:42 PM [0x0-0x584584].org.pythonmac.unspecified.Cupcake[73356] /Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so: no matching architecture in universal wrapper > > > > The game launches fine from VIM or the command line. > > This had been working with an earlier version of py2app. I'm guessing it's a 32 vs 64 bit problem of some sort? Any direction would be appreciated. > > "file /Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so" shows which architectures are supported by the extension, while "file /Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/MacOS/Cupcake" shows the architectures supported by the application launcher. How can I reproduce this problem? That is, * How did you install python? * How did you install py2app? * How did you install pygame? * Do you have a simple script with setup.py that demonstrates the problem? Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From jefferis at gmail.com Tue Oct 12 20:20:54 2010 From: jefferis at gmail.com (Gregory Jefferis) Date: Tue, 12 Oct 2010 19:20:54 +0100 Subject: [Pythonmac-SIG] Sending stdout/err to a text console in a py2app App In-Reply-To: Message-ID: Hi Ronald, Thank you very much for the reply. On 2010-10-12 19:00, "Ronald Oussoren" wrote: > > On 7 Oct, 2010, at 1:14, Gregory Jefferis wrote: > >> [snip] >> Is there anyway I can send anything useful to that empty console windows >> that appears when I start the py2app ? Or a simple way to make a new >> console to which I can print. > > There is no built-in way to do this. The easiest workaround is to grab the > output of the script yourself (which is easy when using the subprocess module) > and display that using an easygui text widget. The process takes a _long_ time to run. So I need to have a textbox that can be updated. Can I do this with the easygui textbox? All the best, Greg. From ronaldoussoren at mac.com Tue Oct 12 20:38:48 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 12 Oct 2010 20:38:48 +0200 Subject: [Pythonmac-SIG] Sending stdout/err to a text console in a py2app App In-Reply-To: References: Message-ID: <32BAB382-E544-4D6A-83CA-58F303C54937@mac.com> On 12 Oct, 2010, at 20:20, Gregory Jefferis wrote: > Hi Ronald, > > Thank you very much for the reply. > > On 2010-10-12 19:00, "Ronald Oussoren" wrote: > >> >> On 7 Oct, 2010, at 1:14, Gregory Jefferis wrote: >> >>> [snip] >>> Is there anyway I can send anything useful to that empty console windows >>> that appears when I start the py2app ? Or a simple way to make a new >>> console to which I can print. >> >> There is no built-in way to do this. The easiest workaround is to grab the >> output of the script yourself (which is easy when using the subprocess module) >> and display that using an easygui text widget. > > The process takes a _long_ time to run. So I need to have a textbox that > can be updated. Can I do this with the easygui textbox? Hmm. I assumed that easygui was a real GUI toolkit, but it isn't. It tries to mimic a command-line interface using GUI widgets and doesn't allow you to update window contents. Never mind... Ronald > > All the best, > > Greg. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From dan at rosspixelworks.com Tue Oct 12 21:51:31 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Tue, 12 Oct 2010 14:51:31 -0500 Subject: [Pythonmac-SIG] Pygame and py2app 0.5.2 In-Reply-To: <012A5B5F-D618-4BD3-8315-A05FDFDDA4CE@mac.com> References: <7dd3f77c487aa47628d63e55a8c986c6@rosspixelworks.com> <012A5B5F-D618-4BD3-8315-A05FDFDDA4CE@mac.com> Message-ID: <59d9195be5efb87f9d53a76fdcaa5ebc@rosspixelworks.com> I worked around the error by installing the python.org 2.7 rather than Activestate's. I think I mentioned that, but if I didn't, now I did. Originally I installed Activestate's 2.7, installed py2app, built pygame from source, then bundled the game as always. I'm attaching the setup.py script that I've been using. Thanks Ronald. Dan On Tue, 12 Oct 2010 20:06:40 +0200, Ronald Oussoren wrote: On 5 Oct, 2010, at 3:49, Dan Ross wrote: Hi all- I'm getting the following error when trying to launch a bundled Pygame app: 10/4/10 8:43:42 PM [0x0-0x584584].org.pythonmac.unspecified.Cupcake[73356] ImportError: dlopen(/Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so, 2): no suitable image found. Did find: 10/4/10 8:43:42 PM [0x0-0x584584].org.pythonmac.unspecified.Cupcake[73356] /Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so: no matching architecture in universal wrapper The game launches fine from VIM or the command line. This had been working with an earlier version of py2app. I'm guessing it's a 32 vs 64 bit problem of some sort? Any direction would be appreciated. "file /Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/Resources/lib/python2.6/lib-dynload/pygame/base.so" shows which architectures are supported by the extension, while "file /Users/danr/Projects/cupcake/dist/Cupcake.app/Contents/MacOS/Cupcake" shows the architectures supported by the application launcher. How can I reproduce this problem? That is, * How did you install python? * How did you install py2app? * How did you install pygame? * Do you have a simple script with setup.py that demonstrates the problem? Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.py Type: text/x-python-script Size: 728 bytes Desc: not available URL: From erik at letterror.com Wed Oct 13 16:40:29 2010 From: erik at letterror.com (Erik van Blokland) Date: Wed, 13 Oct 2010 16:40:29 +0200 Subject: [Pythonmac-SIG] USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER In-Reply-To: <20100209190213.GA8139@panix.com> References: <4B6B0719.3000604@noaa.gov> <20100204175947.GB4548@panix.com> <3D99B8F8-59BA-4F57-AA3E-14BEF7432E3C@mac.com> <20100207143004.GA11255@panix.com> <69F4EAEF-83DF-4394-8844-C717AB499628@mac.com> <20100209190213.GA8139@panix.com> Message-ID: Hi, This question is about issues with Twisted on OSX. It might be too twistd specific, the issue has popped up in other OSX 10.6 / python contexts. So I will give it a shot. Last year I struggled with crashes in a process using twisted.web, Quartz and OSX 10.6: http://mail.python.org/pipermail/pythonmac-sig/2009-December/022006.html Taking a fresh look (and some excellent help from a friend) I've managed to remove Quartz from the suspect list. The daemonising function in twisted calls fork(), but not exec(), similar to this bug: > http://bugs.python.org/issue7895 The USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER flag shows up in crash reports. - Has anyone seen this specific problem with Twisted and 10.6? - What are the best practices for dealing with this issue? - Take it to the twisted list after all? - Any pointers welcome! The relevant code in twisted: _twistd_unix.py (in /twisted/scripts/). exec() - where? how? def daemonize(): # See http://www.erlenstar.demon.co.uk/unix/faq_toc.html#TOC16 if os.fork(): # launch child and... os._exit(0) # kill off parent os.setsid() if os.fork(): # launch child and... os._exit(0) # kill off parent again. null = os.open('/dev/null', os.O_RDWR) for i in range(3): try: os.dup2(null, i) except OSError, e: if e.errno != errno.EBADF: raise os.close(null) Thanks, Erik -------------- next part -------------- An HTML attachment was scrubbed... URL: From aahz at pythoncraft.com Wed Oct 13 18:10:59 2010 From: aahz at pythoncraft.com (Aahz) Date: Wed, 13 Oct 2010 09:10:59 -0700 Subject: [Pythonmac-SIG] USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER In-Reply-To: References: <4B6B0719.3000604@noaa.gov> <20100204175947.GB4548@panix.com> <3D99B8F8-59BA-4F57-AA3E-14BEF7432E3C@mac.com> <20100207143004.GA11255@panix.com> <69F4EAEF-83DF-4394-8844-C717AB499628@mac.com> <20100209190213.GA8139@panix.com> Message-ID: <20101013161059.GB26961@panix.com> On Wed, Oct 13, 2010, Erik van Blokland wrote: > > This question is about issues with Twisted on OSX. It might be too > twistd specific, the issue has popped up in other OSX 10.6 / python > contexts. So I will give it a shot. > > Last year I struggled with crashes in a process using twisted.web, > Quartz and OSX 10.6: > http://mail.python.org/pipermail/pythonmac-sig/2009-December/022006.html > > Taking a fresh look (and some excellent help from a friend) I've managed > to remove Quartz from the suspect list. The daemonising function in > twisted calls fork(), but not exec(), similar to this bug: > >> http://bugs.python.org/issue7895 As the bug says, it's likely related to GUI use (there should be a more detailed message from Ronald in this list's archives or the pyobjc list), so I would bet that you haven't removed all Quartz usage or that you're somehow activating some other GUI mechanism. You might also look at what the multiprocessing module does, we use that extensively with our GUI app and it works fine. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair From ronaldoussoren at mac.com Wed Oct 13 16:54:05 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 13 Oct 2010 14:54:05 +0000 (GMT) Subject: [Pythonmac-SIG] USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER In-Reply-To: Message-ID: On 13 Oct, 2010,at 04:44 PM, Erik van Blokland wrote: Hi, This question is about issues with Twisted on OSX. It might be too twistd specific, the issue has popped up in other OSX 10.6 / python contexts. So I will give it a shot.? Last year I struggled with crashes in a process using twisted.web, Quartz and OSX 10.6: http://mail.python.org/pipermail/pythonmac-sig/2009-December/022006.html Taking a fresh look (and some excellent help from a friend) I've managed to remove Quartz from the suspect list. The daemonising function in twisted calls fork(), but not exec(), similar to this bug: http://bugs.python.org/issue7895 The USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER flag shows up in crash reports. - Has anyone seen this specific problem with Twisted and 10.6? - What are the best practices for dealing with this issue? - Take it to the twisted list after all? - Any pointers welcome! The relevant code in twisted: _twistd_unix.py (in /twisted/scripts/). exec() - where? how? ? Some code before the call to daemonize calls a Cocoa/Carbon API that triggers this. ?Which version of python are you using? A script that displays the problem would be nice, that would make it a lot easier to hunt down the problem and find a solution. Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik at letterror.com Wed Oct 13 21:31:28 2010 From: erik at letterror.com (Erik van Blokland) Date: Wed, 13 Oct 2010 21:31:28 +0200 Subject: [Pythonmac-SIG] Fwd: [Twisted-Python] _twistd_unix.py / daemonize() / OSX / USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER References: <361A70CD-B61F-42C9-8750-6556D437BD52@fuhm.net> Message-ID: Begin forwarded message: > From: James Y Knight > Date: October 13, 2010 7:20:20 PM GMT+02:00 > To: Twisted general discussion > Subject: Re: [Twisted-Python] _twistd_unix.py / daemonize() / OSX / USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER > Reply-To: Twisted general discussion > > > On Oct 13, 2010, at 12:05 PM, Erik van Blokland wrote: > >> >> On Oct 13, 2010, at 5:52 PM, Phil Mayers wrote: >> >>> Other info indicates this is Apple trying to be clever and "protect" >>> applications from some signal handling issues surrounding fork() with >>> libraries which aren't safe in that situation; presumably these are >>> MacOS-specific libraries? >>> >>> If this really is true, then MacOS X is no longer posix-compliant in >>> those circumstances, and Twisted is going to need some work :o( >>> >>> Can you share more details about the application; the context in which >>> it is started, and which system libraries it's likely to load? >> >> Here's a compact version. The script uses OSX' Quartz to create and manipulate images. Twisted is used to wrap it as a webserver, images are served. More pointers on how to start and use it in the script itself. > > You need to avoid using or importing any OSX APIs until after the daemonization has occurred. Unfortunately, twisted executes the entire script file before daemonizing. [that's unfortunate for other reasons besides this, too] > > Here's a corrected version of your script which works properly. It defers importing Quartz until the reactor is running, by moving it into a function called by reactor.callWhenRunning(). > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python at twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: twisted.quartz.test.py Type: text/x-python-script Size: 5042 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjornjobb at gmail.com Fri Oct 15 10:56:51 2010 From: bjornjobb at gmail.com (BjornJohansson) Date: Fri, 15 Oct 2010 01:56:51 -0700 (PDT) Subject: [Pythonmac-SIG] py2app on linux Message-ID: <29969167.post@talk.nabble.com> Hi, I understood that py2app can only produce mac .apps when run on macosx and not linux. Is this correct? /bjorn -- View this message in context: http://old.nabble.com/py2app-on-linux-tp29969167p29969167.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From kw at codebykevin.com Fri Oct 15 15:24:57 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 15 Oct 2010 09:24:57 -0400 Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: <29969167.post@talk.nabble.com> References: <29969167.post@talk.nabble.com> Message-ID: <4CB85629.3040703@codebykevin.com> On 10/15/10 4:56 AM, BjornJohansson wrote: > > Hi, > I understood that py2app can only produce mac .apps when run on macosx and > not linux. > Is this correct? > /bjorn That's correct. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From bjornjobb at gmail.com Wed Oct 13 18:38:35 2010 From: bjornjobb at gmail.com (BjornJohansson) Date: Wed, 13 Oct 2010 09:38:35 -0700 (PDT) Subject: [Pythonmac-SIG] py2app 64 bit or 32 bit Message-ID: <29954665.post@talk.nabble.com> Hi, I have a couple of questions about py2app. I would like to make a mac executable from a wxPython app that I have written. I have ubuntu 10.04 64-bit version with py2app installed. Can I use this setup to create generally usable apps or do I have to use a 32 bit version of Ubuntu? I am new at this, but I have managed to create a win executables using py2exe. Cheers, bjorn -- View this message in context: http://old.nabble.com/py2app-64-bit-or-32-bit-tp29954665p29954665.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From bjornjobb at gmail.com Fri Oct 15 09:08:05 2010 From: bjornjobb at gmail.com (BjornJohansson) Date: Fri, 15 Oct 2010 00:08:05 -0700 (PDT) Subject: [Pythonmac-SIG] py2app on linux Message-ID: <29969167.post@talk.nabble.com> Hi, I understood that py2app can only produce mac .apps when run on macosx and not linux. Is this correct? /bjorn -- View this message in context: http://old.nabble.com/py2app-on-linux-tp29969167p29969167.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From dan.odonovan at gmail.com Fri Oct 15 15:49:25 2010 From: dan.odonovan at gmail.com (Daniel O'Donovan) Date: Fri, 15 Oct 2010 14:49:25 +0100 Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: <4CB85629.3040703@codebykevin.com> References: <29969167.post@talk.nabble.com> <4CB85629.3040703@codebykevin.com> Message-ID: >> I understood that py2app can only produce mac .apps when run on macosx and >> not linux. >> Is this correct? >> /bjorn > > That's correct. But Freeze may be of interest to you : http://wiki.python.org/moin/Freeze or even PyInstaller http://www.pyinstaller.org (though I don't use either)... And if you're on Windows then py2exe is the bees knees. Dan Daniel O'Donovan dan.odonovan at gmail.com From kw at codebykevin.com Fri Oct 15 16:21:59 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 15 Oct 2010 10:21:59 -0400 Subject: [Pythonmac-SIG] py2app 64 bit or 32 bit In-Reply-To: <29954665.post@talk.nabble.com> References: <29954665.post@talk.nabble.com> Message-ID: <4CB86387.2020305@codebykevin.com> On 10/13/10 12:38 PM, BjornJohansson wrote: > > Hi, > I have a couple of questions about py2app. > I would like to make a mac executable from a wxPython app that I have > written. > I have ubuntu 10.04 64-bit version with py2app installed. > Can I use this setup to create generally usable apps or do I have to use a > 32 bit version of Ubuntu? > > I am new at this, but I have managed to create a win executables using > py2exe. > Cheers, > bjorn > You have to build your Mac apps on a Mac. Even if py2app runs on Linux, which I'm not sure if it does, you'd be bundling up a Linux build of Python and any binary extensions, which obviously won't run on the Mac. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Fri Oct 15 16:57:29 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 15 Oct 2010 14:57:29 +0000 (GMT) Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: Message-ID: On 15 Oct, 2010,at 04:11 PM, Daniel O'Donovan wrote: >> I understood that py2app can only produce mac .apps when run on macosx and >> not linux. >> Is this correct? >> /bjorn > > That's correct. But Freeze may be of interest to you : http://wiki.python.org/moin/Freeze or even PyInstaller http://www.pyinstaller.org (though I don't use either)... And if you're on Windows then py2exe is the bees knees. ? AFAIK neither will create MacOSX application bundles when you're not on an OSX machine. It is in theory possible to tweak py2app to do this, all of py2app is python code and py2app doesn't use the C compiler. But: you'd need to have a Python framework and all dependent C libraries on your linux box. Futhermore you'll need an OSX machine anyway to test if the output of py2app actually works. BTW. While it is possible to tweak py2app to do its work on a Linux box I'm not interested in doing the work. Ronald Dan Daniel O'Donovan dan.odonovan at gmail.com _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG at python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Fri Oct 15 18:34:00 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 15 Oct 2010 09:34:00 -0700 Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: References: Message-ID: <4CB88278.9060400@noaa.gov> On 10/15/10 7:57 AM, Ronald Oussoren wrote: > It is in theory possible to tweak py2app to do this, all of py2app is > python code and py2app doesn't use the C compiler. Doesn't py2app need to use macholib to edit shared libs it's bundling? Is that pure python, and not dependent on any OS-X specific libs? > BTW. While it is possible to tweak py2app to do its work on a Linux box > I'm not interested in doing the work. Frankly, I don't see it as worth the effort. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Fri Oct 15 17:47:03 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 15 Oct 2010 08:47:03 -0700 Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: References: <29969167.post@talk.nabble.com> <4CB85629.3040703@codebykevin.com> Message-ID: <4CB87777.2060005@noaa.gov> On 10/15/10 6:49 AM, Daniel O'Donovan wrote: > But Freeze may be of interest to you : http://wiki.python.org/moin/Freeze or even PyInstaller http://www.pyinstaller.org (though I don't use either)... or bbFreeze. -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 rowen at uw.edu Fri Oct 15 20:58:38 2010 From: rowen at uw.edu (Russell E. Owen) Date: Fri, 15 Oct 2010 11:58:38 -0700 Subject: [Pythonmac-SIG] Advice on building binary installers for Python 2.7? Message-ID: I'd like to build binary installers for PIL and matplotlib for python.org Mac Python 2.7 but I confess I'm not sure how to go about it. As I understand it there are two flavors of Mac Python 2.7: a 32-bit build that is compatible with Mac OS X 10.3.9 and later and a 64-bit build that requires Mac OS X 10.5 or later. A complicating factor is that I have not figured out how to build matplotlib or PIL installers for Python 2.6 on 10.5 or 10.6 that were usable on 10.3.9 or 10.4. I built the libraries they depend on as static universal binaries but even so, it did not work. I ended up building everything on a Mac OS X 10.4 machine (which I have on long-term loan for that sole purpose). I think the following is true, but I'd be most grateful for corrections: - I'll need to make two installers per package, one for the 32-bit python, one for the 64-bit python. - 32-bit python 2.7 should be trivial: treat it exactly like Python 2.6. Build the installers on a Mac OS X 10.4 machine using the existing static libraries I already built and all should be well. - 64-bit python 2.7 is what I'm worried about. For building the dependent libraries do I have to use a particular gcc (e.g. 4.2 instead of 4.0)? What flags should I use? I'm guessing it would be safer to build on Mac OS X 10.5 than 10.6 (especially since the 10.6 XCode has some known issues -- components that were built incorrectly that cause warnings when one tries to build libraries). Any pointers to documentation or advice would be most appreciated. -- Russell P.S. The numpy folks apparently were able to make a single binary installer that works everywhere with both versions of Python 2.7. I'm not sure how they managed that, but perhaps numpy doesn't require bringing in any static libraries (if it uses the built in numeric libraries). From p.oberndoerfer at urheberrecht.org Mon Oct 18 15:03:40 2010 From: p.oberndoerfer at urheberrecht.org (=?ISO-8859-1?Q?=22Dr=2E_Pascal_Obernd=F6rfer=22?=) Date: Mon, 18 Oct 2010 15:03:40 +0200 Subject: [Pythonmac-SIG] Advice on building binary installers for Python 2.7? In-Reply-To: References: Message-ID: <4CBC45AC.8020808@urheberrecht.org> Am 15.10.10 20:58, schrieb Russell E. Owen: > I'd like to build binary installers for PIL and matplotlib for > python.org Mac Python 2.7 but I confess I'm not sure how to go about it. Similar over here, as I am standing in front of the task/challenge to build eggs of lxml as 32-/64-bit for 10.5 onwards. Thanks & best regards, Pascal [...] From rowen at uw.edu Wed Oct 20 00:09:11 2010 From: rowen at uw.edu (Russell E. Owen) Date: Tue, 19 Oct 2010 15:09:11 -0700 Subject: [Pythonmac-SIG] New binary installers for numpy, PIL and matplotlib for 32-bit python 2.7 Message-ID: I have build three binary installers for the python.org 32-bit Python 2.7 (compatible with 10.3.9 and later): numpy 1.5.0 (see note 1) matplotlib 1.0.0 (see note 2) PIL 1.1.7 They are available here: Please test them and let me know if they work for you. So far I have tried them on 10.4 Intel (where I built them) and 10.5 Intel. Notes: 1) the numpy 1.5.0 binary installer that is served by the numpy folks does NOT work with 32-bit python 2.7. That is why I made a new installer. 2) I doubt matplotlib works with wxAgg because I used the wxPython binary installer for 2.7, and I fear it may only be compatible with 64-bit python. I only tested TkAgg. If matplotlib does not work with wxAgg then does anyone know how hard it is to build wxPython from source? I've never tried it. While we are going through the uncomfortable transition between 32-bit and 64-bit python (e.g. while we still support Mac OS X 10.4) it would really help if folks who make binary installers were explicit about which version of Python they are for (32-bit or 64-bit). -- Russell From rowen at uw.edu Wed Oct 20 01:50:51 2010 From: rowen at uw.edu (Russell E. Owen) Date: Tue, 19 Oct 2010 16:50:51 -0700 Subject: [Pythonmac-SIG] New binary installers for Python 2.7 packages (retry) Message-ID: I have build several binary installers for the python.org 32-bit Python 2.7 (compatible with 10.3.9 and later): numpy 1.5.0 (see note 1) matplotlib 1.0.0 (but wx support is iffy; see note 2) PIL 1.1.7 pygame 1.9.1 They are available here: Please test them and let me know if they work for you. So far I have tried them on 10.4 Intel (where I built them) and 10.5 Intel. I also ran code built from them on 10.3.9 PPC. Notes: 1) the numpy 1.5.0 binary installer that is served by the numpy folks does NOT work with 32-bit python 2.7. That is why I made a new installer. 2) I doubt matplotlib works with wxAgg because I used the wxPython binary installer for 2.7, and I fear it may only be compatible with 64-bit python. I only tested TkAgg. While we are going through the uncomfortable transition between 32-bit and 64-bit python (e.g. while we still support Mac OS X 10.4) it would really help if folks who make binary installers were explicit about which version of Python they are for (32-bit or 64-bit). -- Russell P.S. sorry if this is a duplicate. I didn't see my first attempt. From ronaldoussoren at mac.com Wed Oct 20 08:37:08 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 20 Oct 2010 08:37:08 +0200 Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: <4CB88278.9060400@noaa.gov> References: <4CB88278.9060400@noaa.gov> Message-ID: <3AD9C19E-9DD3-4180-8BF3-7B3C9FD26AA6@mac.com> On 15 Oct, 2010, at 18:34, Christopher Barker wrote: > On 10/15/10 7:57 AM, Ronald Oussoren wrote: >> It is in theory possible to tweak py2app to do this, all of py2app is >> python code and py2app doesn't use the C compiler. > > Doesn't py2app need to use macholib to edit shared libs it's bundling? Is that pure python, and not dependent on any OS-X specific libs? Macholib is 100% portable python code. > >> BTW. While it is possible to tweak py2app to do its work on a Linux box >> I'm not interested in doing the work. > > Frankly, I don't see it as worth the effort. I agree. Ronald > > -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 > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ralf.gommers at googlemail.com Wed Oct 20 15:17:10 2010 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Wed, 20 Oct 2010 21:17:10 +0800 Subject: [Pythonmac-SIG] New binary installers for Python 2.7 packages (retry) In-Reply-To: References: Message-ID: On Wed, Oct 20, 2010 at 7:50 AM, Russell E. Owen wrote: > I have build several binary installers for the python.org 32-bit Python > 2.7 (compatible with 10.3.9 and later): > > numpy 1.5.0 (see note 1) > matplotlib 1.0.0 (but wx support is iffy; see note 2) > PIL 1.1.7 > pygame 1.9.1 > > They are available here: > > > Please test them and let me know if they work for you. So far I have > tried them on 10.4 Intel (where I built them) and 10.5 Intel. > I also ran code built from them on 10.3.9 PPC. > > Notes: > 1) the numpy 1.5.0 binary installer that is served by the numpy folks > does NOT work with 32-bit python 2.7. That is why I made a new installer. It apparently depends on your platform, it did work for me. There are some other issues for numpy, like the 2.6 installer working everywhere except on 10.5 Intel. For numpy 1.5.1 we set up a new build box running 10.5 instead of 10.6 and plan to copy the python.org naming scheme (and hence also provide two 2.7 installers). > > 2) I doubt matplotlib works with wxAgg because I used the wxPython > binary installer for 2.7, and I fear it may only be compatible with > 64-bit python. I only tested TkAgg. > > While we are going through the uncomfortable transition between 32-bit > and 64-bit python (e.g. while we still support Mac OS X 10.4) it would > really help if folks who make binary installers were explicit about > which version of Python they are for (32-bit or 64-bit). Agreed. Cheers, Ralf From rowen at uw.edu Wed Oct 20 16:55:49 2010 From: rowen at uw.edu (Russell Owen) Date: Wed, 20 Oct 2010 07:55:49 -0700 Subject: [Pythonmac-SIG] New binary installers for Python 2.7 packages (retry) In-Reply-To: References: Message-ID: <243F71A5-E696-4DA6-9F19-CDEFD4F67015@uw.edu> On Oct 20, 2010, at 6:17 AM, Ralf Gommers wrote: > On Wed, Oct 20, 2010 at 7:50 AM, Russell E. Owen wrote: >> ... >> Notes: >> 1) the numpy 1.5.0 binary installer that is served by the numpy folks >> does NOT work with 32-bit python 2.7. That is why I made a new installer. > > It apparently depends on your platform, it did work for me. There are > some other issues for numpy, like the 2.6 installer working everywhere > except on 10.5 Intel. For numpy 1.5.1 we set up a new build box > running 10.5 instead of 10.6 and plan to copy the python.org naming > scheme (and hence also provide two 2.7 installers). I installed it on Mac OS X 10.4 Intel with the 32-bit Python 2.7 and found that it would not load at all, due to incompatible libraries. I assumed that meant it was only for 64-bit Python. I'm very glad you'll be making two binary distros. I hope you can build a backwards compatible version for 32-bit python on 10.5. I haven't had any luck at that with PIL and matplotlib, but numpy doesn't require any included libraries so it may well work. Regards, -- Russell From kw at codebykevin.com Thu Oct 21 15:22:26 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 21 Oct 2010 09:22:26 -0400 Subject: [Pythonmac-SIG] Mac app store Message-ID: <4CC03E92.1080506@codebykevin.com> Well, I guess it should be no surprise that Apple's bringing the App Store to the Mac. The question is, what does it mean for Python developers? I saw a link to the app store guidelines here: http://pastie.org/1236378 If these are accurate, then I suppose Python apps that are wrapped via py2app wouldn't automatically be excluded. Java apps, however, are specifically excluded. (There are howls of protest on Apple's Java-dev list.) Of course, Apple isn't making the app store the only game in town, which is good. But as a developer of commercial desktop Mac apps in Python, I'm taking a careful look. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From amorris at mistermorris.com Sun Oct 24 08:18:22 2010 From: amorris at mistermorris.com (Adam Morris) Date: Sun, 24 Oct 2010 13:18:22 +0700 Subject: [Pythonmac-SIG] pyobjc with appscript Message-ID: Dear Pythonmac-sig, I have a python script that gives Keynote some added features useful to teachers. It lets students interact with whatever is being projected right at their desk. It's written in python using appscript but at the moment runs entirely from the command line. I'm looking at giving it a GUI. I'm considering using the AppleScriptObjC bridge, but that means converting all my convenience classes from python/appscript into pure AppleScript (boo). The upside though is that I could get started on that right away. I'd really rather use PyObjC but would need a helping hand getting started on making a deployable Snow Leopard-only app, and getting it so that appscript is included. How do I do that without requiring the user to have appscript in its python path? This isn't the first time I've tried figuring this out and don't understand how this works. Can someone point me in the right direction? I'd also be happy to write about my progress making the app so that it might be useful for the future. -Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.ord at omnilab.com.au Mon Oct 25 07:17:46 2010 From: chris.ord at omnilab.com.au (chris.ord) Date: Mon, 25 Oct 2010 16:17:46 +1100 Subject: [Pythonmac-SIG] how to add custom dylib for module? Message-ID: <4CC512FA.9050600@omnilab.com.au> I am trying to enable python-drmaa control of my gridengine cluster but I am coming up against problems caused by my ignorance. I have an nfs share where the full suite of application & software lives. e.g nfs_share/grid/darwin/lib/drmaa.dyld & nfs_share/grid/darwin/bin/sub.app I have a working path in that I can run sub.app and it works. The python-drmaa module claims it has installed ok. It hasn't as it can't find the drmaa.dyld I have attempted to set DYLD_LIBRARY_PATH & DRMAA_LIBRARY_PATH however these do not seem to hold very well in Mac x My question is how do I add a custom path for any dyld that a python module requires? I'm an Admin not a programmer so I have a 'hazy' notion at best of how a module relates to the underlying C or dyld objects. I have successfully dealt with the linux version of this problem but the python on mac situation seems to be more fragmented. Either specific help or (probably better) a pointer to some documents about how this element of python works as I would love to roll my own deployments from a central point and my lack of knowledge in this area is holding me up. Versions Mac 10.6 & 10.5, python 2.6 TIA Chris -- Chris Ord IT Manager 4-14 Dickson Ave. Artarmon NSW 2064 mobile: 0401 836 500 From sanroque.tech at gmail.com Mon Oct 25 20:16:21 2010 From: sanroque.tech at gmail.com (Preston Holmes) Date: Mon, 25 Oct 2010 11:16:21 -0700 Subject: [Pythonmac-SIG] pyobjc with appscript In-Reply-To: References: Message-ID: <5EC42FFD-82D5-4D75-B889-273247CC60C9@gmail.com> You might consider using a web framework like Django I've done some experimenting with using Django as a "local" app. The gunicorn server makes this particularly easy. -Preston PS - I'd love to see your work, as we could use something like this at our school On Oct 23, 2010, at 11:18 PM, Adam Morris wrote: > Dear Pythonmac-sig, > > I have a python script that gives Keynote some added features useful to teachers. It lets students interact with whatever is being projected right at their desk. It's written in python using appscript but at the moment runs entirely from the command line. > > I'm looking at giving it a GUI. I'm considering using the AppleScriptObjC bridge, but that means converting all my convenience classes from python/appscript into pure AppleScript (boo). The upside though is that I could get started on that right away. > > I'd really rather use PyObjC but would need a helping hand getting started on making a deployable Snow Leopard-only app, and getting it so that appscript is included. How do I do that without requiring the user to have appscript in its python path? This isn't the first time I've tried figuring this out and don't understand how this works. Can someone point me in the right direction? > > I'd also be happy to write about my progress making the app so that it might be useful for the future. > > -Adam > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG From aahz at pythoncraft.com Mon Oct 25 21:14:53 2010 From: aahz at pythoncraft.com (Aahz) Date: Mon, 25 Oct 2010 12:14:53 -0700 Subject: [Pythonmac-SIG] pyobjc with appscript In-Reply-To: <5EC42FFD-82D5-4D75-B889-273247CC60C9@gmail.com> References: <5EC42FFD-82D5-4D75-B889-273247CC60C9@gmail.com> Message-ID: <20101025191453.GB26700@panix.com> On Mon, Oct 25, 2010, Preston Holmes wrote: > > You might consider using a web framework like Django > > I've done some experimenting with using Django as a "local" app. The > gunicorn server makes this particularly easy. That's certainly an option; my company uses cherrypy/cheetah to similar effect. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair From nad at acm.org Mon Oct 25 23:21:19 2010 From: nad at acm.org (Ned Deily) Date: Mon, 25 Oct 2010 14:21:19 -0700 Subject: [Pythonmac-SIG] pyobjc with appscript References: Message-ID: In article , Adam Morris wrote: > I have a python script that gives Keynote some added features useful to > teachers. It lets students interact with whatever is being projected right > at their desk. It's written in python using appscript but at the moment runs > entirely from the command line. > > I'm looking at giving it a GUI. I'm considering using the AppleScriptObjC > bridge, but that means converting all my convenience classes from > python/appscript into pure AppleScript (boo). The upside though is that I > could get started on that right away. > > I'd really rather use PyObjC but would need a helping hand getting started > on making a deployable Snow Leopard-only app, and getting it so that > appscript is included. How do I do that without requiring the user to have > appscript in its python path? This isn't the first time I've tried figuring > this out and don't understand how this works. Can someone point me in the > right direction? Another suggestion is to look at using Greg Ewing's PyGUI project, an attempt at a modern cross-platform GUI API for Python. It uses PyObjC on OS X. http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ -- Ned Deily, nad at acm.org From brian.nguyen at gmail.com Tue Oct 26 07:13:20 2010 From: brian.nguyen at gmail.com (brinsknaps) Date: Mon, 25 Oct 2010 22:13:20 -0700 (PDT) Subject: [Pythonmac-SIG] MySQLdb on OS X 10.6 In-Reply-To: <5db256250911111628y3f13a30cp4b3f0b5d37161620@mail.gmail.com> References: <5db256250911111628y3f13a30cp4b3f0b5d37161620@mail.gmail.com> Message-ID: <30054281.post@talk.nabble.com> Hey Brian, I know it's been a long time since you posted this message, but I've been pulling out my hair running into the same issue. I've tried installing 32-bit and 64-bit versions of mysql to test different compatibilities with python 2.6.6, but have had no luck. By any chance did you figure out a solution to this problem? Thanks! Brian -- View this message in context: http://old.nabble.com/MySQLdb-on-OS-X-10.6-tp26311352p30054281.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From nad at acm.org Tue Oct 26 09:21:08 2010 From: nad at acm.org (Ned Deily) Date: Tue, 26 Oct 2010 00:21:08 -0700 Subject: [Pythonmac-SIG] MySQLdb on OS X 10.6 References: <5db256250911111628y3f13a30cp4b3f0b5d37161620@mail.gmail.com> <30054281.post@talk.nabble.com> Message-ID: In article <30054281.post at talk.nabble.com>, brinsknaps wrote: > I know it's been a long time since you posted this message, but I've been > pulling out my hair running into the same issue. I've tried installing > 32-bit and 64-bit versions of mysql to test different compatibilities with > python 2.6.6, but have had no luck. By any chance did you figure out a > solution to this problem? The key to successfully installing MySQLdb on 10.6 is to ensure that the Python version, MySQLdb, and the MySQL client libraries are all built with a common architecture (i386 or x86_64) and ABI (deployment target). Unfortunately, that's easier said than done if you try to do it yourself from source or with installers from various sources. It can be done but my advice is to install everything from MacPorts (http://www.macports.org/). If you haven't already, download and run the base MacPorts installer. Then you can build and install everything you need with: $ sudo /opt/local/bin/port selfupdate $ sudo /opt/local/bin/port install py26-mysql py26-mysql is the MacPorts port name for MySqLdb and installing it will automatically also build all necessary dependencies like Python 2.6 and the MySQL client libraries and they will be built compatibly. To prefer the MacPorts python2.6, add its framework bin directory to the front of your shell search PATH, so something like; $ export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin: /opt/local/bin:$PATH You'll find more suggestions and details by searching on StackOverflow. -- Ned Deily, nad at acm.org From hengist.podd at virgin.net Tue Oct 26 09:34:18 2010 From: hengist.podd at virgin.net (has) Date: Tue, 26 Oct 2010 08:34:18 +0100 Subject: [Pythonmac-SIG] pyobjc with appscript Message-ID: Adam Morris wrote: > I have a python script that gives Keynote some added features useful to teachers. [...] > > I'm looking at giving it a GUI. [...] I'd really rather use PyObjC but would need a helping hand getting started on making a deployable Snow Leopard-only app, and getting it so that appscript is included. Have you looked at py2app? That will identify and bundle all your dependencies for you. http://pypi.python.org/pypi/py2app/ HTH has -- Learn AppleScript, 3rd edition, Sanderson & Rosenthal: http://apress.com/book/view/9781430223610 Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From sridharr at activestate.com Wed Oct 27 20:29:07 2010 From: sridharr at activestate.com (Sridhar Ratnakumar) Date: Wed, 27 Oct 2010 11:29:07 -0700 Subject: [Pythonmac-SIG] Fwd: ANN: ActivePython 3.1.2.4 (with PyPM) is now available Message-ID: <4CC86F73.8050807@activestate.com> Hello - I thought of forwarding this announcement to MacSIG as this is the first release of ActivePython 3.x with 64-bit/Tk8.5 support on MacOSX (PPC is no longer supported). -srid -------- Original Message -------- Subject: ANN: ActivePython 3.1.2.4 (with PyPM) is now available Date: Wed, 27 Oct 2010 11:26:59 -0700 From: Sridhar Ratnakumar Reply-To: python-list at python.org, "ActivePython-feedback at ActiveState.com" Organization: ActiveState To: python-announce-list at python.org, python-list at python.org ActiveState is pleased to announce ActivePython 3.1.2.4, a complete, ready-to-install binary distribution of Python 3.1. A major update in this release is that PyPM (ActiveState's Python Package Manager) is now included with full support for installing Python 3 packages. http://www.activestate.com/activepython What's New in ActivePython-3.1.2.4 ================================== *Release date: 26-Oct-2010* New Features & Upgrades ----------------------- - PyPM (beta) for Python 3 - New tools: Distribute, virtualenv5, SQLAlchemy - [Windows] Installer upgrade: automatically uninstall previous versions - Bug #87783 - [MacOSX] 64-bit support; uses Tcl/Tk 8.5 - [Linux] Include Tcl/Tk development files - Security upgrade to openssl-0.9.8o Noteworthy Changes & Bug Fixes ------------------------------ - [Windows] Include IDLE in the Start Menu shortcut, instead of PythonWin - [Windows] Add file extension to Tools\scripts\2to3.py - Bug #87465 - [Windows] Add "python3.exe" - Bug #87275 - [Windows] Renamed "python31.exe" to "python3.1.exe" (Unix like) - [MacOSX] Fix uninstall on Snow Leopard (10.6) - [MacOSX] Fix Help index on Snow Leopard (10.6) - Bug #87290 - Bug #87600: create a `idleX.Y` script on unix What is ActivePython? ===================== ActivePython is ActiveState's binary distribution of Python. Builds for Windows, Mac OS X, Linux are made freely available. Solaris, HP-UX and AIX builds, and access to older versions are available in ActivePython Business, Enterprise and OEM editions: http://www.activestate.com/python ActivePython includes the Python core and the many core extensions: zlib and bzip2 for data compression, the Berkeley DB (bsddb) and SQLite (sqlite3) database libraries, OpenSSL bindings for HTTPS support, the Tix GUI widgets for Tkinter, ElementTree for XML processing, ctypes (on supported platforms) for low-level library access, and others. The Windows distribution ships with PyWin32 -- a suite of Windows tools developed by Mark Hammond, including bindings to the Win32 API and Windows COM. ActivePython 2.6, 2.7 and 3.1 also include a binary package manager for Python (PyPM) that can be used to install packages much easily. For example: C:\>pypm install mysql-python [...] C:\>python >>> import MySQLdb >>> See this page for full details: http://docs.activestate.com/activepython/3.1/whatsincluded.html As well, ActivePython ships with a wealth of documentation for both new and experienced Python programmers. In addition to the core Python docs, ActivePython includes the "What's New in Python" series, "Dive into Python", the Python FAQs & HOWTOs, and the Python Enhancement Proposals (PEPs). An online version of the docs can be found here: http://docs.activestate.com/activepython/3.1/ We would welcome any and all feedback to: activepython-feedback at activestate.com Please file bugs against ActivePython at: http://bugs.activestate.com/enter_bug.cgi?product=ActivePython Supported Platforms =================== ActivePython is available for the following platforms: - Windows/x86 (32-bit) - Windows/x64 (64-bit) (aka "AMD64") - Mac OS X (32-bit and 64-bit; 10.5+) - Linux/x86 (32-bit) - Linux/x86_64 (64-bit) (aka "AMD64") - Solaris/SPARC (32-bit and 64-bit) (Business, Enterprise or OEM edition only) - Solaris/x86 (32-bit) (Business, Enterprise or OEM edition only) - HP-UX/PA-RISC (32-bit) (Business, Enterprise or OEM edition only) - HP-UX/IA-64 (32-bit and 64-bit) (Enterprise or OEM edition only) - AIX/PowerPC (32-bit and 64-bit) (Business, Enterprise or OEM edition only) More information about the Business Edition can be found here: http://www.activestate.com/business-edition Custom builds are available in the Enterprise Edition: http://www.activestate.com/enterprise-edition Thanks, and enjoy! The Python Team -- Sridhar Ratnakumar sridharr at activestate.com From bjornjobb at gmail.com Thu Oct 28 09:04:28 2010 From: bjornjobb at gmail.com (BjornJohansson) Date: Thu, 28 Oct 2010 00:04:28 -0700 (PDT) Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: <3AD9C19E-9DD3-4180-8BF3-7B3C9FD26AA6@mac.com> References: <29969167.post@talk.nabble.com> <4CB85629.3040703@codebykevin.com> <4CB88278.9060400@noaa.gov> <3AD9C19E-9DD3-4180-8BF3-7B3C9FD26AA6@mac.com> Message-ID: <30073948.post@talk.nabble.com> Hi, and thanks for all the answers. What I wanted to do is distribute a small python app that depends on wx and a few other dependencies. I have a computer running ubuntu 10.04 and I need to distrubute the app to my students who run windows (and do not have python or know how to work the comand line). I used py2exe on xp in virtualbox, and the independent executable came out fine. Apple does not allow you to run their os on non-apple hardware which means that it is next to impossible to create mac executables without apple hardware legally? This is a pity, because I do not want to force even more people to Microsoft. /Bjorn -- View this message in context: http://old.nabble.com/py2app-on-linux-tp29969167p30073948.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From dan at rosspixelworks.com Thu Oct 28 16:21:59 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Thu, 28 Oct 2010 09:21:59 -0500 Subject: [Pythonmac-SIG] If/else vs or Message-ID: <62ede9de3968019dda07ade262514609@rosspixelworks.com> I don't think this is Mac specific, but I wonder if someone could explain why these two groups of code behave differently: [code] colors = ['red', 'green', 'blue', 'orange', 'fuscia', 'black', 'white'] list_of_matches = [] for x in colors: if x == 'red' or 'green' or 'blue': list_of_matches.append(x) print list_of_matches list_of_matches2 = [] for x in colors: if x == 'red': list_of_matches2.append(x) elif x == 'green': list_of_matches2.append(x) elif x == 'blue': list_of_matches2.append(x) else: pass print list_of_matches2 [/code] list_of_matches contains every item in colors. list_of_matches2 only contains the matches, as I would expect. I don't get it...... Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Thu Oct 28 17:08:27 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 28 Oct 2010 17:08:27 +0200 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: <62ede9de3968019dda07ade262514609@rosspixelworks.com> References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> Message-ID: On 28 Oct, 2010, at 16:21, Dan Ross wrote: > I don't think this is Mac specific, but I wonder if someone could explain why these two groups of code behave differently: > > [code] > > colors = ['red', 'green', 'blue', 'orange', 'fuscia', 'black', 'white'] > > list_of_matches = [] > for x in colors: > if x == 'red' or 'green' or 'blue': > This parses as: if x == ('red' or 'green' or blue'): Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From zachary.pincus at yale.edu Thu Oct 28 17:20:26 2010 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Thu, 28 Oct 2010 11:20:26 -0400 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> Message-ID: On Oct 28, 2010, at 11:08 AM, Ronald Oussoren wrote: > > On 28 Oct, 2010, at 16:21, Dan Ross wrote: > >> I don't think this is Mac specific, but I wonder if someone could >> explain why these two groups of code behave differently: >> >> [code] >> >> colors = ['red', 'green', 'blue', 'orange', 'fuscia', 'black', >> 'white'] >> >> list_of_matches = [] >> for x in colors: >> if x == 'red' or 'green' or 'blue': >> > > This parses as: > > if x == ('red' or 'green' or blue'): This would always lead to the if-test failing: ('red' or 'green' or 'blue') evaluates to True, and x != True. What's observed is the if- test always passing... As the equality operator is higher-precedence than boolean operators, and equal precedence operators group left-to- right, the above parses as: if (((x == 'red') or 'green') or 'blue'): noting that non-empty strings (like 'green') evaluate as True in an if- test, this will test if x == 'red', and if not, it will go on to testing if 'green' evaluates to True (which it does), and so forth. Dan, you could fix your code as: if x == 'red' or x == 'green' or x == 'blue': But this is better: if x in ('red', 'green', 'blue'): and this scales best: good_colors = set(['red', 'green', 'blue']) if x in good_colors: Zach > Ronald > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG From richard.fuhr at gmail.com Thu Oct 28 20:23:09 2010 From: richard.fuhr at gmail.com (Richard Fuhr) Date: Thu, 28 Oct 2010 11:23:09 -0700 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> Message-ID: I have attached a copy of the originally-posted Python code and also have attached an IDLE session based on that code, which seems instructive. (Copying and pasting the IDLE session into the email message seems to mess up the indentation.) But Zachary's suggestions for rewriting the original Python to attain the intended result are very helpful. On Thu, Oct 28, 2010 at 8:20 AM, Zachary Pincus wrote: > > On Oct 28, 2010, at 11:08 AM, Ronald Oussoren wrote: > > >> On 28 Oct, 2010, at 16:21, Dan Ross wrote: >> >> I don't think this is Mac specific, but I wonder if someone could explain >>> why these two groups of code behave differently: >>> >>> [code] >>> >>> colors = ['red', 'green', 'blue', 'orange', 'fuscia', 'black', 'white'] >>> >>> list_of_matches = [] >>> for x in colors: >>> if x == 'red' or 'green' or 'blue': >>> >>> >> This parses as: >> >> if x == ('red' or 'green' or blue'): >> > > This would always lead to the if-test failing: ('red' or 'green' or 'blue') > evaluates to True, and x != True. What's observed is the if-test always > passing... As the equality operator is higher-precedence than boolean > operators, and equal precedence operators group left-to-right, the above > parses as: > > if (((x == 'red') or 'green') or 'blue'): > > noting that non-empty strings (like 'green') evaluate as True in an > if-test, this will test if x == 'red', and if not, it will go on to testing > if 'green' evaluates to True (which it does), and so forth. > > Dan, you could fix your code as: > if x == 'red' or x == 'green' or x == 'blue': > > But this is better: > if x in ('red', 'green', 'blue'): > > and this scales best: > good_colors = set(['red', 'green', 'blue']) > if x in good_colors: > > > Zach > > > > > > > Ronald >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Oct28.py Type: application/octet-stream Size: 462 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: IdleSessionOct28 Type: application/octet-stream Size: 794 bytes Desc: not available URL: From Chris.Barker at noaa.gov Thu Oct 28 21:18:20 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 28 Oct 2010 12:18:20 -0700 Subject: [Pythonmac-SIG] py2app on linux In-Reply-To: <30073948.post@talk.nabble.com> References: <29969167.post@talk.nabble.com> <4CB85629.3040703@codebykevin.com> <4CB88278.9060400@noaa.gov> <3AD9C19E-9DD3-4180-8BF3-7B3C9FD26AA6@mac.com> <30073948.post@talk.nabble.com> Message-ID: <4CC9CC7C.5050703@noaa.gov> On 10/28/10 12:04 AM, BjornJohansson wrote: > Apple does not allow you to run their os on non-apple hardware which means > that it is next to impossible to create mac executables without apple > hardware legally? yes that is true. If you aren't worried about legality, you could run OS-X on a "hackintosh" or in a VM, but you are quite right, that violates Apple's license. > This is a pity, because I do not want to force even more > people to Microsoft. Then send them top Linux... But if you have a user that want's a Mac version, then they have a Mac, so you can hopefully find one that will let you use their machine to build binaries. -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 dan at rosspixelworks.com Fri Oct 29 01:42:46 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Thu, 28 Oct 2010 18:42:46 -0500 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> Message-ID: Thank you for your help guys. Zach, I appreciate the explanation. That's what I was looking for. Dan From dan.odonovan at gmail.com Thu Oct 28 17:10:24 2010 From: dan.odonovan at gmail.com (Daniel O'Donovan) Date: Thu, 28 Oct 2010 16:10:24 +0100 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: <62ede9de3968019dda07ade262514609@rosspixelworks.com> References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> Message-ID: <0AFA1D59-1E94-4C80-A416-F384C71EA15A@gmail.com> On 28 Oct 2010, at 15:21, Dan Ross wrote: > if x == 'red' or 'green' or 'blue': > > if x == 'red' or 'green' or 'blue': I think your logic might need straightening here, you're saying if (x == 'red') or if 'green' or if 'blue' but I think you mean if (x == 'red') or if (x == 'green') or if (x == 'blue') so try this if (x == 'red') or (x == 'green') or (x == 'blue'): or maybe even if x in ('red', 'green', 'blue'): *oops* I see Ronald has got his answer in first! HTH Dan Daniel O'Donovan dan.odonovan at gmail.com From dan at rosspixelworks.com Fri Oct 29 16:56:07 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Fri, 29 Oct 2010 09:56:07 -0500 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> Message-ID: <6949eff252b4950d01d51d764fa9cbba@rosspixelworks.com> I've been trying to use more list comprehensions recently. I was just fleshing something out which brought on my post. On Fri, 29 Oct 2010 09:15:47 -0400, Henry Olders wrote: When dealing with lists, list comprehensions are shorter and easier to work with: l=['red','green','orange','blue','red','white'] [x for x in l if x in ['red','blue']] Henry On 2010-10-28, at 10:21 , Dan Ross wrote: I don't think this is Mac specific, but I wonder if someone could explain why these two groups of code behave differently: [code] colors = ['red', 'green', 'blue', 'orange', 'fuscia', 'black', 'white'] list_of_matches = [] for x in colors: if x == 'red' or 'green' or 'blue': list_of_matches.append(x) print list_of_matches list_of_matches2 = [] for x in colors: if x == 'red': list_of_matches2.append(x) elif x == 'green': list_of_matches2.append(x) elif x == 'blue': list_of_matches2.append(x) else: pass print list_of_matches2 [/code] list_of_matches contains every item in colors. list_of_matches2 only contains the matches, as I would expect. I don't get it...... Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Fri Oct 29 18:14:06 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 29 Oct 2010 09:14:06 -0700 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: <6949eff252b4950d01d51d764fa9cbba@rosspixelworks.com> References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> <6949eff252b4950d01d51d764fa9cbba@rosspixelworks.com> Message-ID: <4CCAF2CE.6040900@noaa.gov> On 10/29/10 7:56 AM, Dan Ross wrote: > I've been trying to use more list comprehensions recently. ahh -- then you want something like: In [15]: colors = ['red','green','blue','orange','fuchsia','black','white'] In [16]: subset = ['red','green','blue','purple'] In [17]: [c for c in colors if c in subset] Out[17]: ['red', 'green', 'blue'] (so much for one obvious way to do 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 dan at rosspixelworks.com Fri Oct 29 18:19:50 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Fri, 29 Oct 2010 11:19:50 -0500 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: <4CCAF2CE.6040900@noaa.gov> References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> <6949eff252b4950d01d51d764fa9cbba@rosspixelworks.com> <4CCAF2CE.6040900@noaa.gov> Message-ID: <6bad4ee08e8fcc39514e0f42a9d2f770@rosspixelworks.com> Indeed. That's awfully nice and concise. On Fri, 29 Oct 2010 09:14:06 -0700, Christopher Barker wrote: > On 10/29/10 7:56 AM, Dan Ross wrote: > > I've been trying to use more list comprehensions recently. > > ahh -- then you want something like: > > In [15]: colors = ['red','green','blue','orange','fuchsia','black','white'] > > In [16]: subset = ['red','green','blue','purple'] > > In [17]: [c for c in colors if c in subset] > > Out[17]: ['red', 'green', 'blue'] > > > (so much for one obvious way to do it!) > > -Chris From cweisiger at msg.ucsf.edu Fri Oct 29 18:31:34 2010 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Fri, 29 Oct 2010 09:31:34 -0700 Subject: [Pythonmac-SIG] If/else vs or In-Reply-To: <6bad4ee08e8fcc39514e0f42a9d2f770@rosspixelworks.com> References: <62ede9de3968019dda07ade262514609@rosspixelworks.com> <6949eff252b4950d01d51d764fa9cbba@rosspixelworks.com> <4CCAF2CE.6040900@noaa.gov> <6bad4ee08e8fcc39514e0f42a9d2f770@rosspixelworks.com> Message-ID: Or you could use actual sets: >>> colors = set(['red', 'green', 'blue', 'orange', 'fuscia', 'black', 'white']) >>> subset = set(['red', 'green', 'blue', 'purple']) >>> subset.intersection(colors) set(['blue', 'green', 'red']) Of course, this loses your ordering, but it's otherwise far easier to read than a list comprehension. -Chris On Fri, Oct 29, 2010 at 9:19 AM, Dan Ross wrote: > Indeed. That's awfully nice and concise. > > On Fri, 29 Oct 2010 09:14:06 -0700, Christopher Barker > wrote: > > On 10/29/10 7:56 AM, Dan Ross wrote: > > > I've been trying to use more list comprehensions recently. > > > > ahh -- then you want something like: > > > > In [15]: colors = > ['red','green','blue','orange','fuchsia','black','white'] > > > > In [16]: subset = ['red','green','blue','purple'] > > > > In [17]: [c for c in colors if c in subset] > > > > Out[17]: ['red', 'green', 'blue'] > > > > > > (so much for one obvious way to do it!) > > > > -Chris > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjornjobb at gmail.com Fri Oct 29 18:40:08 2010 From: bjornjobb at gmail.com (BjornJohansson) Date: Fri, 29 Oct 2010 09:40:08 -0700 (PDT) Subject: [Pythonmac-SIG] py2app 64 bit or 32 bit In-Reply-To: <4CB86387.2020305@codebykevin.com> References: <29954665.post@talk.nabble.com> <4CB86387.2020305@codebykevin.com> Message-ID: <30087653.post@talk.nabble.com> Ok, thanks for the reply It is a pain to build executables for mac if you dont own a mac.... Apple does not permit you to run it as a virtual machine either... I think it would be in their interest to distribute a (crippled) version that could be used to build software, since less software is available for mac, and this certainly does not help... /bjorn Kevin Walzer-5 wrote: > > On 10/13/10 12:38 PM, BjornJohansson wrote: >> >> Hi, >> I have a couple of questions about py2app. >> I would like to make a mac executable from a wxPython app that I have >> written. >> I have ubuntu 10.04 64-bit version with py2app installed. >> Can I use this setup to create generally usable apps or do I have to use >> a >> 32 bit version of Ubuntu? >> >> I am new at this, but I have managed to create a win executables using >> py2exe. >> Cheers, >> bjorn >> > > You have to build your Mac apps on a Mac. Even if py2app runs on Linux, > which I'm not sure if it does, you'd be bundling up a Linux build of > Python and any binary extensions, which obviously won't run on the Mac. > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > -- View this message in context: http://old.nabble.com/py2app-64-bit-or-32-bit-tp29971952p30087653.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From brian.nguyen at gmail.com Fri Oct 29 17:53:00 2010 From: brian.nguyen at gmail.com (brinsknaps) Date: Fri, 29 Oct 2010 08:53:00 -0700 (PDT) Subject: [Pythonmac-SIG] MySQLdb on OS X 10.6 In-Reply-To: References: <5db256250911111628y3f13a30cp4b3f0b5d37161620@mail.gmail.com> <30054281.post@talk.nabble.com> Message-ID: <30087228.post@talk.nabble.com> Hi Ned, I really appreciate the reply! I finally made some progress after daunting attempts to get msyql up and running from macports. Ultimately it had to do with some permission issues. Anyway, I can feel a tad bit closer, but am still running into a roadblock: $~/ python Python 2.6.6 (r266:84292, Oct 27 2010, 13:07:13) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet Moreover, once I try the syncdb command in django, I get: $~/Sandbox/mysite/ ./manage.py syncdb /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet Traceback (most recent call last): File "./manage.py", line 11, in execute_manager(settings) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/base.py", line 219, in execute self.validate() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/base.py", line 249, in validate num_errors = get_validation_errors(s, app) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/management/validation.py", line 86, in get_validation_errors connection.validation.validate_field(e, opts, f) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/mysql/validation.py", line 14, in validate_field db_version = self.connection.get_server_version() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/mysql/base.py", line 313, in get_server_version self.cursor() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/__init__.py", line 75, in cursor cursor = self._cursor() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/db/backends/mysql/base.py", line 297, in _cursor self.connection = Database.connect(**kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py", line 74, in Connect return Connection(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/connections.py", line 170, in __init__ super(Connection, self).__init__(*args, **kwargs2) _mysql_exceptions.OperationalError: (1045, "Access denied for user 'admin'@'localhost' (using password: YES)") Again, thanks so much! It's a bit of a relief that I've made it this far! -- View this message in context: http://old.nabble.com/MySQLdb-on-OS-X-10.6-tp26311352p30087228.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From nad at acm.org Sat Oct 30 23:07:37 2010 From: nad at acm.org (Ned Deily) Date: Sat, 30 Oct 2010 14:07:37 -0700 Subject: [Pythonmac-SIG] MySQLdb on OS X 10.6 References: <5db256250911111628y3f13a30cp4b3f0b5d37161620@mail.gmail.com> <30054281.post@talk.nabble.com> <30087228.post@talk.nabble.com> Message-ID: In article <30087228.post at talk.nabble.com>, brinsknaps wrote: > I really appreciate the reply! I finally made some progress after daunting > attempts to get msyql up and running from macports. Ultimately it had to do > with some permission issues. > > Anyway, I can feel a tad bit closer, but am still running into a roadblock: > > $~/ python > Python 2.6.6 (r266:84292, Oct 27 2010, 13:07:13) > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import MySQLdb > /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site > -packages/MySQLdb/__init__.py:34: > DeprecationWarning: the sets module is deprecated > from sets import ImmutableSet Fortunately, that warning can be ignored; it should have no impact on anything. It is an indication, however, that the MySQLdb version in MacPorts has not been updated yet from 1.2.2 to 1.2.3, which was released earlier this year and, among other changes, removes the source of that warning. Unless you find some other reason that you need to update to 1.2.3, I'd advise just living with the warning until the MacPorts port is updated and you feel like updating everything: $ sudo port selfupdate $ sudo port upgrade outdated > Moreover, once I try the syncdb command in django, I get: > > $~/Sandbox/mysite/ ./manage.py syncdb [...] > "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sit > e-packages/MySQLdb/connections.py", > line 170, in __init__ > super(Connection, self).__init__(*args, **kwargs2) > _mysql_exceptions.OperationalError: (1045, "Access denied for user > 'admin'@'localhost' (using password: YES)") Most likely you don't have the correct values in your Django project's settings.py file for one or more of the DATABASE_ variables. First, make sure your MySQL server is up and running and that you can connect to it using one of the standard MySQL command line programs like mysqladmin5 using a valid MySQL user name and password. Then edit settings.py appropriately. -- Ned Deily, nad at acm.org From ronaldoussoren at mac.com Sun Oct 31 15:59:21 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 31 Oct 2010 15:59:21 +0100 Subject: [Pythonmac-SIG] py2app 64 bit or 32 bit In-Reply-To: <30087653.post@talk.nabble.com> References: <29954665.post@talk.nabble.com> <4CB86387.2020305@codebykevin.com> <30087653.post@talk.nabble.com> Message-ID: On 29 Oct, 2010, at 18:40, BjornJohansson wrote: > > Ok, thanks for the reply > It is a pain to build executables for mac if you dont own a mac.... > Apple does not permit you to run it as a virtual machine either... You could always try to create a FrankenMac using VirtualBox (see for an example). AFAIK this is forbidden by the Apple EULA. > I think it would be in their interest to distribute a (crippled) version > that could be used to build software, since > less software is available for mac, and this certainly does not help... Sorry? There is plenty of software available for macosx. This used to be a lot worse, nowadays there is pretty good software available in most application categories. A crippled version that can only be used to build software would IMHO not be in Apple's interest. The costs for buying an apple system should be acceptable for anyone that is serious about developing software for OSX (macmini's are USD 699, and those are easily capable enough to build and test software). Ronald > /bjorn > > > Kevin Walzer-5 wrote: >> >> On 10/13/10 12:38 PM, BjornJohansson wrote: >>> >>> Hi, >>> I have a couple of questions about py2app. >>> I would like to make a mac executable from a wxPython app that I have >>> written. >>> I have ubuntu 10.04 64-bit version with py2app installed. >>> Can I use this setup to create generally usable apps or do I have to use >>> a >>> 32 bit version of Ubuntu? >>> >>> I am new at this, but I have managed to create a win executables using >>> py2exe. >>> Cheers, >>> bjorn >>> >> >> You have to build your Mac apps on a Mac. Even if py2app runs on Linux, >> which I'm not sure if it does, you'd be bundling up a Linux build of >> Python and any binary extensions, which obviously won't run on the Mac. >> >> -- >> Kevin Walzer >> Code by Kevin >> http://www.codebykevin.com >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG >> >> > > -- > View this message in context: http://old.nabble.com/py2app-64-bit-or-32-bit-tp29971952p30087653.html > Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From brian.nguyen at gmail.com Sun Oct 31 02:33:15 2010 From: brian.nguyen at gmail.com (brinsknaps) Date: Sat, 30 Oct 2010 18:33:15 -0700 (PDT) Subject: [Pythonmac-SIG] MySQLdb on OS X 10.6 In-Reply-To: References: <5db256250911111628y3f13a30cp4b3f0b5d37161620@mail.gmail.com> <30054281.post@talk.nabble.com> <30087228.post@talk.nabble.com> Message-ID: <30096268.post@talk.nabble.com> Thank you so much Ned!!! I completely overlooked that after reinstalling mysql via macports. I added the db, user, pw, and everything worked perfectly! There's hope for me and Django after all haha. Again, I really appreciate your help and time, saving my n00bness to python and Django! -- View this message in context: http://old.nabble.com/MySQLdb-on-OS-X-10.6-tp26311352p30096268.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com.