From Chris.Barker at noaa.gov Mon Mar 1 21:50:55 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 01 Mar 2010 12:50:55 -0800 Subject: [Pythonmac-SIG] PyTables installation problems In-Reply-To: <31E5FDC0-3AA4-4324-A7FB-BFF673C3600A@yahoo.it> References: <31E5FDC0-3AA4-4324-A7FB-BFF673C3600A@yahoo.it> Message-ID: <4B8C28AF.5070006@noaa.gov> Massimo Di Stefano wrote: > > tring to install Pytables on a mac osx 10.6.2 i get this error : which python? which version of pytables? How did you install pytables? > Googling a bit i see it's a "common" problem, an extremely quick googling indicated it may be a fixed bug -- make sure you are using the latest released version. -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 amorris at mistermorris.com Tue Mar 2 15:38:00 2010 From: amorris at mistermorris.com (Adam Morris) Date: Tue, 2 Mar 2010 21:38:00 +0700 Subject: [Pythonmac-SIG] usable references to a remote "System Events" application Message-ID: <9b202abc1003020638w97e77efo1fd2dfe76968251d@mail.gmail.com> Hi all, I'm getting lots of milage out of appscript, but ran into a snag that searches haven't resolved. Trying to gui script a remote machine, and appscript doesn't seem to be working. This: app(url='eppc://machine.local/System Events').processes() complains that terminology can't be found and that the application isn't launched Whereas: app(url='eppc://machine.local/System Events') does actually give me a reference. So is there something I'm misunderstanding? Or is remote gui scripting illegal and appscript is just giving me the wrong error? Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From hengist.podd at virgin.net Tue Mar 2 16:16:18 2010 From: hengist.podd at virgin.net (has) Date: Tue, 2 Mar 2010 15:16:18 +0000 Subject: [Pythonmac-SIG] Issue with DEVONthink and ASDictionary In-Reply-To: References: Message-ID: Charles Turner wrote: > Not sure if this is the best place to ask this question, but ASDictionary can't complete its production of a dictionary for DEVONthink Pro Office. See the screenshot here, as I couldn't copy the ASD log for some reason: > > > > Does anyone have an insight as to what's going wrong? Looks like a bug in ASDictionary, maybe triggered by a flaw in the DT dictionary. Don't have time to investigate right now as I'm really busy this week, but you check Console.app for ASDictionary error logs and send us those if found, I'll add it to my TODO list. Thanks, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From loredo at astro.cornell.edu Tue Mar 2 21:04:16 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Tue, 2 Mar 2010 15:04:16 -0500 Subject: [Pythonmac-SIG] Test failure (crash?) with Py-2.6.5rc1 on OS 10.6.2 Message-ID: <1267560256.4b8d6f403bb13@astrosun2.astro.cornell.edu> I've just built Py-2.6.5rc1 on Snow Leopard, configured to build an intel-only universal framework, as follows: export MACOSX_DEPLOYMENT_TARGET=10.6 time ./configure --prefix=/usr/local/tmp --enable-framework --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk --with- universal-archs=intel "make" runs fine, but "make test" fails with what appears to be a crash: test_syntax test_sys test_tarfile test_tcl 2010-03-02 14:39:15.473 python.exe[37210:60b] The application with bundle ID (null) is running setugid(), which is not allowed. make: *** [test] Error 1 I don't know what to make of this; I'm not even sure what test is causing the problem (is the test name printed before the test executes, or after it runs?). Perhaps it's a Tcl issue, but I don't have any such issues with Py-2.6.4 with an identical configuration. -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From nad at acm.org Tue Mar 2 21:20:34 2010 From: nad at acm.org (Ned Deily) Date: Tue, 02 Mar 2010 12:20:34 -0800 Subject: [Pythonmac-SIG] Test failure (crash?) with Py-2.6.5rc1 on OS 10.6.2 References: <1267560256.4b8d6f403bb13@astrosun2.astro.cornell.edu> Message-ID: In article <1267560256.4b8d6f403bb13 at astrosun2.astro.cornell.edu>, Tom Loredo wrote: > I've just built Py-2.6.5rc1 on Snow Leopard, configured to build > an intel-only universal framework, as follows: > > export MACOSX_DEPLOYMENT_TARGET=10.6 > time ./configure --prefix=/usr/local/tmp --enable-framework > --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk --with- > universal-archs=intel > > "make" runs fine, but "make test" fails with what appears to > be a crash: > > test_syntax > test_sys > test_tarfile > test_tcl > 2010-03-02 14:39:15.473 python.exe[37210:60b] The application with bundle ID > (null) is running setugid(), which is not > allowed. > make: *** [test] Error 1 > > I don't know what to make of this; I'm not even sure what test is > causing the problem (is the test name printed before the test executes, > or after it runs?). Perhaps it's a Tcl issue, but I don't have any > such issues with Py-2.6.4 with an identical configuration. Did you try running it after a make install and while not running as root? Trying to run processes that require a window manager connection is picky. I think you'll find that Tkinter and IDLE actually run OK once installed. -- Ned Deily, nad at acm.org From loredo at astro.cornell.edu Tue Mar 2 21:22:28 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Tue, 2 Mar 2010 15:22:28 -0500 Subject: [Pythonmac-SIG] Other test failures with Py-2.6.5rc1 on OS 10.6.2 Message-ID: <1267561348.4b8d73844c042@astrosun2.astro.cornell.edu> I should have looked at the whole test output before my previous post; there are other test failures, or at least "unexpected output." The full output, up to the crash(?), is at this pastie: http://www.pastie.org/850452 The troublesome parts are excerpted in part below. -Tom test_asynchat test test_asynchat produced unexpected output: ********************************************************************** error: uncaptured python exception, closing channel (:[Errno 9] Bad file descriptor [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- 2.6.5rc1/Lib/asyncore.py|readwrite|107] [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- 2.6.5rc1/Lib/asyncore.py|handle_expt_event|441] [|getsockopt|1] [/Volumes/Tracking/Temp-work/Sandbox- installs/Python-2.6.5rc1/Lib/socket.py|_dummy|165]) .. test_os couldn't allocate two consecutive fds, skipping test_closerange /Volumes/Tracking/Temp-work/Sandbox-installs/Python-2.6.5rc1/Lib/os.py:760: DeprecationWarning: integer argument expected, got float bs += read(_urandomfd, n - len(bs)) .. test test_smtplib produced unexpected output: ********************************************************************** error: uncaptured python exception, closing channel (:[Errno 9] Bad file descriptor [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- 2.6.5rc1/Lib/asyncore.py|readwrite|107] [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- 2.6.5rc1/Lib/asyncore.py|handle_expt_event|441] [|getsockopt|1] [/Volumes/Tracking/Temp-work/Sandbox- installs/Python-2.6.5rc1/Lib/socket.py|_dummy|165]) .. test_tcl 2010-03-02 14:36:19.459 python.exe[35793:60b] The application with bundle ID (null) is running setugid(), which is not allowed. make: [test] Error 1 (ignored) DYLD_FRAMEWORK_PATH=/Volumes/Tracking/Temp-work/Sandbox-installs/Python-2.6.5rc1: ./python.exe -E -tt ./Lib/test/regrtest.py -l .. ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From loredo at astro.cornell.edu Tue Mar 2 21:33:44 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Tue, 2 Mar 2010 15:33:44 -0500 Subject: [Pythonmac-SIG] Test failure (crash?) with Py-2.6.5rc1 on OS 10.6.2 Message-ID: <1267562024.4b8d7628edc88@astrosun2.astro.cornell.edu> Hi Ned- > Did you try running it after a make install and while not running as > root? Trying to run processes that require a window manager connection > is picky. I think you'll find that Tkinter and IDLE actually run OK > once installed. I'm not sure what you mean by "running as root" (which I've never done on OS X). My account is also the admin account, but I'm not using admin permissions for anything. I am not running "sudo" for anything. My /usr/local has been chown'ed to me (the preferred way to maintain /usr/local for homebrew) so sudo is not needed for the /usr/local installs, and it is also not needed for installing the public framework. I'm installing it exactly the way that works successfully for 2.6.4 and 2.7a3. I just did a "make install" and reran "make test" with the same results as previously: test_tcl 2010-03-02 15:27:08.016 python.exe[40951:60b] The application with bundle ID (null) is running setugid(), which is not allowed. make: [test] Error 1 (ignored) DYLD_FRAMEWORK_PATH=/Volumes/Tracking/Temp-work/Sandbox-installs/Python-2.6.5rc1: ./python.exe -E -tt ./Lib/test/regrtest.py -l (That's the 1st time through; the 2nd time it doesn't show the DYLD... line.) Anything else I should try? -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From zvezdan at zope.com Tue Mar 2 23:45:07 2010 From: zvezdan at zope.com (Zvezdan Petkovic) Date: Tue, 2 Mar 2010 17:45:07 -0500 Subject: [Pythonmac-SIG] Other test failures with Py-2.6.5rc1 on OS 10.6.2 In-Reply-To: <1267561348.4b8d73844c042@astrosun2.astro.cornell.edu> References: <1267561348.4b8d73844c042@astrosun2.astro.cornell.edu> Message-ID: I can confirm the same test failures on the same platform. Configured like this: ./configure \ --prefix=${HOME}/opt \ BASECFLAGS="-arch x86_64 -arch i386" \ CFLAGS="-arch x86_64 -arch i386" \ LDFLAGS="-arch x86_64 -arch i386" \ MACOSX_DEPLOYMENT_TARGET=10.6 The tests were run using: ~/opt/bin/pythonX.Y -E -tt -m test.regrtest -l -uall Comments are below. On Mar 2, 2010, at 3:22 PM, Tom Loredo wrote: > test_asynchat > test test_asynchat produced unexpected output: > ********************************************************************** > error: uncaptured python exception, closing channel ( 'socket.error'>:[Errno 9] Bad file descriptor [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- > 2.6.5rc1/Lib/asyncore.py|readwrite|107] [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- > 2.6.5rc1/Lib/asyncore.py|handle_expt_event|441] [|getsockopt|1] [/Volumes/Tracking/Temp-work/Sandbox- > installs/Python-2.6.5rc1/Lib/socket.py|_dummy|165]) > .. This test fails for both Python 2.6.4 and 2.6.5 (32- or 64-bit). The test passes for Python 2.7 (and, FWIW, for 2.4.6 and 2.5.5) > test_os > couldn't allocate two consecutive fds, skipping test_closerange > /Volumes/Tracking/Temp-work/Sandbox-installs/Python-2.6.5rc1/Lib/os.py:760: DeprecationWarning: integer argument > expected, got float > bs += read(_urandomfd, n - len(bs)) > .. These tests pass in the end. So this is a non-issue. > > > test test_smtplib produced unexpected output: > ********************************************************************** > error: uncaptured python exception, closing channel > (:[Errno 9] Bad file descriptor [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- > 2.6.5rc1/Lib/asyncore.py|readwrite|107] [/Volumes/Tracking/Temp-work/Sandbox-installs/Python- > 2.6.5rc1/Lib/asyncore.py|handle_expt_event|441] [|getsockopt|1] [/Volumes/Tracking/Temp-work/Sandbox- > installs/Python-2.6.5rc1/Lib/socket.py|_dummy|165]) > .. This test fails for both Python 2.6.4 and 2.6.5 (32- or 64-bit). The test passes for Python 2.7. > test_tcl > 2010-03-02 14:36:19.459 python.exe[35793:60b] The application with bundle ID (null) is running setugid(), which is not > allowed. > make: [test] Error 1 (ignored) > DYLD_FRAMEWORK_PATH=/Volumes/Tracking/Temp-work/Sandbox-installs/Python-2.6.5rc1: ./python.exe -E -tt > ./Lib/test/regrtest.py -l > .. This is an interesting one. Testing stops completely after this failure. This problem was introduced very recently. I have Python 2.6.4+ built from Python trunk checkout on February 11. It passes this test. Python 2.6.4 and 2.7 also pass this test. So, the problem was introduced between February 11 and 2.6.5rc1 release. This is a regression. Zvezdan From nad at acm.org Wed Mar 3 01:40:01 2010 From: nad at acm.org (Ned Deily) Date: Tue, 02 Mar 2010 16:40:01 -0800 Subject: [Pythonmac-SIG] Test failure (crash?) with Py-2.6.5rc1 on OS 10.6.2 References: <1267562024.4b8d7628edc88@astrosun2.astro.cornell.edu> Message-ID: In article <1267562024.4b8d7628edc88 at astrosun2.astro.cornell.edu>, Tom Loredo wrote: > > Did you try running it after a make install and while not running as > > root? Trying to run processes that require a window manager connection > > is picky. I think you'll find that Tkinter and IDLE actually run OK > > once installed. > I'm not sure what you mean by "running as root" (which I've never > done on OS X). My account is also the admin account, but I'm > not using admin permissions for anything. I am not running "sudo" > for anything. My /usr/local has been chown'ed to me (the preferred > way to maintain /usr/local for homebrew) so sudo is not needed > for the /usr/local installs, and it is also not needed for installing > the public framework. I'm installing it exactly the way that works > successfully for 2.6.4 and 2.7a3. > > I just did a "make install" and reran "make test" with the same > results as previously: > > test_tcl > 2010-03-02 15:27:08.016 python.exe[40951:60b] The application with bundle ID (null) > is running setugid(), which is not allowed. Sorry, I replied somewhat hastily. Good catch, that does seem to be a new problem. I haven't been building and testing as much with 10.6's built-in Tk 8.5 because it has been so problematic with IDLE. I did verify that this doesn't show up with a 10.6.4 rc2 / Tk 8.5 build that I have. On the other hand, test_tcl seems to run OK when run by itself and IDLE seems to work as well as it usually does with the built-in 8.5. I suspect the test failure is due to changes in the way regrtest.py and friends run tests but I'll look into it further. If you feel like opening an issue on the tracker, great, otherwise I will after I've investigated it more. As to the other test failures you subsequently reported, the test_asynchat and test_smtplib failures are long-standing minor problems that have been corrected in 2.7 but not backported to 2.6. The test_closerange failure appears to be intermittent and also doesn't fail when run by itself. But it's also worth looking into, which I will do. Thanks again. -- Ned Deily, nad at acm.org From nad at acm.org Wed Mar 3 01:51:41 2010 From: nad at acm.org (Ned Deily) Date: Tue, 02 Mar 2010 16:51:41 -0800 Subject: [Pythonmac-SIG] Other test failures with Py-2.6.5rc1 on OS 10.6.2 References: <1267561348.4b8d73844c042@astrosun2.astro.cornell.edu> Message-ID: In article , Zvezdan Petkovic wrote: > I can confirm the same test failures on the same platform. Sorry, I didn't see your reply here until after I had sent my most recent one. I agree with your assessments. In particular: > > test_tcl > > 2010-03-02 14:36:19.459 python.exe[35793:60b] The application with bundle > > ID (null) is running setugid(), which is not > > allowed. > > make: [test] Error 1 (ignored) > > DYLD_FRAMEWORK_PATH=/Volumes/Tracking/Temp-work/Sandbox-installs/Python-2.6. > > 5rc1: ./python.exe -E -tt > > ./Lib/test/regrtest.py -l > > .. > > This is an interesting one. > Testing stops completely after this failure. > This problem was introduced very recently. > > I have Python 2.6.4+ built from Python trunk checkout on February 11. > It passes this test. > Python 2.6.4 and 2.7 also pass this test. > > So, the problem was introduced between February 11 and 2.6.5rc1 release. > This is a regression. Yes, and I now have a hunch what triggered it. I'll report back. -- Ned Deily, nad at acm.org From amorris at mistermorris.com Wed Mar 3 03:24:41 2010 From: amorris at mistermorris.com (Adam Morris) Date: Wed, 3 Mar 2010 09:24:41 +0700 Subject: [Pythonmac-SIG] getting a usable reference from app(url='.../System Events') Message-ID: <9b202abc1003021824w6d7ea438q954c616832e94095@mail.gmail.com> Sorry for the resend but I'm not sure if my first attempt went through (new to gmail)! ---- Hi all, I'm getting lots of milage out of appscript, but ran into a snag that searches haven't resolved. Trying to gui script a remote machine, and appscript doesn't seem to be working. This: app(url='eppc://machine.local/System Events').processes() complains that terminology can't be found and that the application isn't launched Whereas: app(url='eppc://machine.local/System Events') does actually give me a reference. So is there something I'm misunderstanding? Or is remote gui scripting illegal and appscript is just giving me the wrong error? -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Wed Mar 3 03:43:27 2010 From: nad at acm.org (Ned Deily) Date: Tue, 02 Mar 2010 18:43:27 -0800 Subject: [Pythonmac-SIG] Other test failures with Py-2.6.5rc1 on OS 10.6.2 References: <1267561348.4b8d73844c042@astrosun2.astro.cornell.edu> Message-ID: In article , Ned Deily wrote: > In article , > Zvezdan Petkovic wrote: > > So, the problem was introduced between February 11 and 2.6.5rc1 release. > > This is a regression. > Yes, and I now have a hunch what triggered it. I'll report back. Yep, found it. It was a test failure side-effect of a fix just checked in over the weekend. See http://bugs.python.org/issue8045 for the details. Thanks, Tom, for finding this and Zvezdan for confirming it. -- Ned Deily, nad at acm.org From loredo at astro.cornell.edu Wed Mar 3 07:44:11 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Wed, 3 Mar 2010 01:44:11 -0500 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) Message-ID: <1267598651.4b8e053b514be@astrosun2.astro.cornell.edu> Ned- Thanks for the quick attention and detective work about the tcl-related bug in 2.6.5. I wouldn't have known how to track it down! Regarding your comment: > I haven't been building and testing as much with 10.6's > built-in Tk 8.5 because it has been so problematic with IDLE. I did > verify that this doesn't show up with a 10.6.4 rc2 / Tk 8.5 build that I > have. Sorting out the Tcl/Tk situation with Python-2.6.4 is coming up quickly on my MacPy to-do list (I'm just setting up a new machine, as you may have guessed). I've experienced the weirdness associated with creating new windows in IDLE (with Apple's Py-2.6.1). I was not clear on whether this problem is unique to Apple's Python (in Snow Leopard), to their Tcl/Tk, or if it is a genuine Python/Tcl issue in the 2.6 series. Digging around, I've found a bug report: http://bugs.python.org/issue6864 I find the report a bit confusing; it gives me the impression that the problem is due to a not-yet-understood (as of Py-2.6.3) interaction between Python and Tk 8.5. But it sounds like you have a working setup with Py-2.6.4 and Tk 8.5. Do you have a recommended Tk setup that works? E.g., does ActiveTcl 8.5 solve this issue (with Py-2.6.4)? My web searching hasn't turned up any clear advice about this. I'll be relying on tkinter, not just for IDLE, but also for matplotlib. In the past I've also used wxpython for matplotlib, but the wxpython situation with Snow Leopard seems even more confusing than the tkinter situation! Thanks, Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From hengist.podd at virgin.net Wed Mar 3 09:13:47 2010 From: hengist.podd at virgin.net (has) Date: Wed, 3 Mar 2010 08:13:47 +0000 Subject: [Pythonmac-SIG] usable references to a remote "System Events" application In-Reply-To: References: Message-ID: <8F9CA3A5-05F6-4CAF-A163-9BA700C0B688@virgin.net> Adam Morris wrote: > I'm getting lots of milage out of appscript, but ran into a snag that searches haven't resolved. > > Trying to gui script a remote machine, and appscript doesn't seem to be working. This: > > app(url='eppc://machine.local/System Events').processes() > > complains that terminology can't be found and that the application isn't launched You can launch remote apps directly via Apple events. Note that SE isn't running by default. You could add it to startup items or open it via the remote Finder if that's running. Beyond that, all the usual stuff about remote AEs apply - check your URL's correct, check your user name and pass are correct, check that remote AEs are enabled and not blocked by the firewall, remember to sacrifice a chicken, etc. > Whereas: > > app(url='eppc://machine.local/System Events') > > does actually give me a reference. So is there something I'm misunderstanding? app objects don't fetch terminology until you start building a reference or command. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From nad at acm.org Wed Mar 3 11:33:39 2010 From: nad at acm.org (Ned Deily) Date: Wed, 03 Mar 2010 02:33:39 -0800 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) References: <1267598651.4b8e053b514be@astrosun2.astro.cornell.edu> Message-ID: In article <1267598651.4b8e053b514be at astrosun2.astro.cornell.edu>, Tom Loredo wrote: > Sorting out the Tcl/Tk situation with Python-2.6.4 is coming > up quickly on my MacPy to-do list (I'm just setting up a new machine, > as you may have guessed). I've experienced the weirdness > associated with creating new windows in IDLE (with Apple's > Py-2.6.1). I was not clear on whether this problem is unique > to Apple's Python (in Snow Leopard), to their Tcl/Tk, or if it > is a genuine Python/Tcl issue in the 2.6 series. > > Digging around, I've found a bug report: > > http://bugs.python.org/issue6864 > > I find the report a bit confusing; it gives me the impression that > the problem is due to a not-yet-understood (as of Py-2.6.3) interaction > between Python and Tk 8.5. But it sounds like you have a working > setup with Py-2.6.4 and Tk 8.5. > > Do you have a recommended Tk setup that works? E.g., does ActiveTcl 8.5 > solve this issue (with Py-2.6.4)? My web searching hasn't turned up > any clear advice about this. Ugh! As far as I know there has not been much progress on this issue since that bug report was opened; certainly I haven't been thinking about it. Time to do some retesting. If anyone has recently, please speak up. The main problem before was 64-bit Tk availability. IIRC, the only real game in town for that was the Apple-supplied 8.5 in 10.6 which apparently pulled in from the TkAqua Cocoa/64-bit port project (which now may be a part of 8.6?). Kevin Walzer was trying to get that the TkAqua 64-bit stuff to work with Python on 10.5 a while back but he ran into various problems. Perhaps he can jump in here with an update. I've seen reports that the X11 version of Tk may work in 64-bit (I think the MacPorts version does) but I have no (recent) personal experience with X11 Tk on OS X and, frankly, I'm not looking to get any more. X11 Tk would probably require some build tweaking. If you don't mind running any Tk-based stuff in 32-bit mode, either the Apple-supplied Tk 8.4 or ActiveState 8.4 worked fine when we last poked at this. But one may need to tweak the build of Tkinter in Python to dynamically link with 8.4, rather than 8.5, when building on 10.6, since both versions exist in /System/Library/Frameworks. Something else to look at. Ronald has suggested modifying Tkinter and the installer build to allow one Python instance to dynamically link with either 8.4 or 8.5, depending on what is available but I don't think anyone has found time to work on that. Contributions welcome! The easy way to avoid nearly all the hassle, at the moment, is to stick with 32-bit and build Python on 10.5 - not a good long term solution. -- Ned Deily, nad at acm.org From kw at codebykevin.com Wed Mar 3 15:54:42 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 03 Mar 2010 09:54:42 -0500 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) In-Reply-To: References: <1267598651.4b8e053b514be@astrosun2.astro.cornell.edu> Message-ID: <4B8E7832.2060701@codebykevin.com> On 3/3/10 5:33 AM, Ned Deily wrote: > > The main problem before was 64-bit Tk availability. IIRC, the only real > game in town for that was the Apple-supplied 8.5 in 10.6 which > apparently pulled in from the TkAqua Cocoa/64-bit port project (which > now may be a part of 8.6?). Kevin Walzer was trying to get that the > TkAqua 64-bit stuff to work with Python on 10.5 a while back but he ran > into various problems. Perhaps he can jump in here with an update. > I've seen reports that the X11 version of Tk may work in 64-bit (I think > the MacPorts version does) but I have no (recent) personal experience > with X11 Tk on OS X and, frankly, I'm not looking to get any more. X11 > Tk would probably require some build tweaking. In general, Tk 8.5 64-bit (based on Cocoa) works fine with Python 64-bit, at least on Leopard. I'm not on Snow Leopard yet. Here are the major issues I've encountered: - Tk Aqua 8.6 (still in beta) is now based on Cocoa and should build as 64-bit with no problem. A Cocoa backport to 8.5 is here: http://github.com/das/tcltk/tree/de-carbon-8-5. - Building everything as a four-way universal binary is a bit tricky. See http://bugs.python.org/issue4165 and http://bugs.python.org/issue6441. These bug reports were helpful to me when I was building my current development stack (Python 2.6.2 and Tk 8.5.7 Cocoa). I see that some of these issues may have been resolved. - IDLE doesn't work out of the box with the 64-bit Cocoa-based version of Tk that ships with Snow Leopard. I've filed some patches at http://bugs.python.org/issue6075 to address the Cocoa-integration/UI issues, but there are still apparently some issues pertaining to stuff locking up (see some of the other bug links in this thread; I haven't seen them but they have caused others some serious problems). There are some other, unrelated bugs on Leopard with Cocoa-Tk IDLE (menus get wonky when they are destroyed and recreated), which won't be fixed because it's at the Appkit level (requires a fix by Apple). As a result, despite my work on integrating IDLE with Tk-Cocoa, I'm not currently using IDLE for my Python work. - A lot of development occurred on Tk-Cocoa after it was included in Snow Leopard, so there may be issues with the system-included libraries that are no longer present in the latest revs of the library. - This isn't directly related to 64-bit Tkinter and Python, but if you're doing GUI development, many developers have reported serious issues with using py2app in a 64-bit context. You can search the list archives for details, but in short, many people can't get their 64-bit Python GUI apps to build with py2app. I've seen reports on issues with PyQt and PyObjC, and I've also had similar issues with my Tkinter apps. One workaround is to use bundlebuilder, which has its own problems but can be coaxed into building 64-bit apps (search the list archives for my notes about that). I don't believe this affects wxPython at present because wxPython/wxWidgets isn't yet supported in 64-bit mode. Hope that helps, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From Chris.Barker at noaa.gov Wed Mar 3 19:18:54 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 03 Mar 2010 10:18:54 -0800 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) In-Reply-To: <1267598651.4b8e053b514be@astrosun2.astro.cornell.edu> References: <1267598651.4b8e053b514be@astrosun2.astro.cornell.edu> Message-ID: <4B8EA80E.3070400@noaa.gov> Tom Loredo wrote: > In the past I've also used wxpython for matplotlib, but the wxpython > situation with Snow Leopard seems even more confusing than the tkinter > situation! How so? Difficult, maybe, but it shouldn't be confusing: wxPython is 32 bit, you need to use it with 32 bit Python. It's 32 bit because it is built on top of Carbon, which is 32 bit. There is a Cocoa version in the works, which I think will be released soon, and it should be full on 64 bit, but I don't know when it will be complete/robust enough for general use. I'm quite happy with wx for MPL and all sorts of other stuff, though I"m not on Snow Leopard yet, either. -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 sanroque.tech at gmail.com Wed Mar 3 21:07:11 2010 From: sanroque.tech at gmail.com (Preston Holmes) Date: Wed, 3 Mar 2010 12:07:11 -0800 Subject: [Pythonmac-SIG] pyqrcode on Snow Leopard with jcc Message-ID: <575CD261-256F-4092-88E0-9FAD484E37FA@gmail.com> I've used the 10.5 binary egg from here with great success: http://pyqrcode.sourceforge.net/ However trying to compile from source on 10.6 has not yet worked for me. I pip install JCC and it compiles fine But when I try to run make in the pyqrcode project, make fails when trying to run jcc with the line that starts like: python -m jcc .... the error is: /Users/admin/.virtualenvs/qrcode/bin/python: jcc is a package and cannot be directly executed I tried this outside of the virtualenv with the same result... I do have distribute installed - not sure if that is related... Anyone have tips for how to get this built? -Preston From janssen at parc.com Wed Mar 3 23:24:03 2010 From: janssen at parc.com (Bill Janssen) Date: Wed, 3 Mar 2010 14:24:03 PST Subject: [Pythonmac-SIG] pyqrcode on Snow Leopard with jcc In-Reply-To: <575CD261-256F-4092-88E0-9FAD484E37FA@gmail.com> References: <575CD261-256F-4092-88E0-9FAD484E37FA@gmail.com> Message-ID: <99557.1267655043@parc.com> Preston Holmes wrote: > I've used the 10.5 binary egg from here with great success: > http://pyqrcode.sourceforge.net/ > > However trying to compile from source on 10.6 has not yet worked for me. > > I pip install JCC and it compiles fine > > But when I try to run make in the pyqrcode project, make fails when > trying to run jcc with the line that starts like: > > python -m jcc .... > > the error is: > > /Users/admin/.virtualenvs/qrcode/bin/python: jcc is a package and > cannot be directly executed There are three different ways to invoke JCC. With 2.5, you use "-m jcc", with 2.6 (which is what you have on Snow Leopard) you use " -m jcc.__main__". Bill From sanroque.tech at gmail.com Thu Mar 4 02:26:14 2010 From: sanroque.tech at gmail.com (Preston Holmes) Date: Wed, 3 Mar 2010 17:26:14 -0800 Subject: [Pythonmac-SIG] pyqrcode on Snow Leopard with jcc In-Reply-To: <99557.1267655043@parc.com> References: <575CD261-256F-4092-88E0-9FAD484E37FA@gmail.com> <99557.1267655043@parc.com> Message-ID: On Mar 3, 2010, at 2:24 PM, Bill Janssen wrote: > Preston Holmes wrote: > >> I've used the 10.5 binary egg from here with great success: >> http://pyqrcode.sourceforge.net/ >> >> However trying to compile from source on 10.6 has not yet worked >> for me. >> >> I pip install JCC and it compiles fine >> >> But when I try to run make in the pyqrcode project, make fails when >> trying to run jcc with the line that starts like: >> >> python -m jcc .... >> >> the error is: >> >> /Users/admin/.virtualenvs/qrcode/bin/python: jcc is a package and >> cannot be directly executed > > There are three different ways to invoke JCC. With 2.5, you use > "-m jcc", with 2.6 (which is what you have on Snow Leopard) you use > " -m jcc.__main__". Thanks Bill - that did it (just edited that bit of the Makefile). For anyone else who comes on this, the other thing I needed to fix was what I assume was a change in JCC. Line 21 of qrcode-0.2.1-py2.6-macosx-10.6-universal.egg/qrcode/ __init__.py Needs to be edited from _qrcode._setExceptionTypes(JavaError, InvalidArgsError) to _qrcode._set_exception_types(JavaError, InvalidArgsError) otherwise a quick decode test worked - no test suite to push it through a complete set of paces, so not sure what other breakage might be lurking - but it decodes what I need it to. -Preston From dan at rosspixelworks.com Thu Mar 4 04:45:52 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Wed, 3 Mar 2010 21:45:52 -0600 Subject: [Pythonmac-SIG] Voice/Speech recognition Message-ID: <9530A7A0-0D21-4127-ADDD-695D58206DDA@rosspixelworks.com> I'd like to make an app/game for my kids in which they would see a word, read it and the game would be able to recognize if they've read it correctly. Does anyone have any suggestions for speech/voice recognition? Thanks in advance. From sanroque.tech at gmail.com Thu Mar 4 07:04:17 2010 From: sanroque.tech at gmail.com (Preston Holmes) Date: Wed, 3 Mar 2010 22:04:17 -0800 Subject: [Pythonmac-SIG] CoreGraphics deprecations Message-ID: <51930487-F258-46AC-927F-DCE754A59BA0@gmail.com> pdf = CGPDFDocumentCreateWithProvider(CGDataProviderCreateWithFilename(aFile)) pdf.getTrimBox(pageNumber).getWidth() I get warning output like: Wed Mar 3 21:48:07 element.sd.cox.net Python[24469] : The function `CGPDFDocumentGetTrimBox' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Please use `CGPDFPageGetBoxRect' instead. However from doing a dir(pdf) I don't see the preferred method exposed through the python bindings. This is 10.5.8 with stock python2.5 in 10.6.2 /System/Library/Frameworks/Python.framework/Versions/2.6/ Extras/lib/python/CoreGraphics/_CoreGraphics.so isn't even 64bit I don't use this stuff often, but are python bindings to OS X to libraries like this withering on the vine? -Preston From ronaldoussoren at mac.com Thu Mar 4 12:28:06 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 04 Mar 2010 12:28:06 +0100 Subject: [Pythonmac-SIG] CoreGraphics deprecations In-Reply-To: <51930487-F258-46AC-927F-DCE754A59BA0@gmail.com> References: <51930487-F258-46AC-927F-DCE754A59BA0@gmail.com> Message-ID: <88EB53EC-27EB-491B-B4A0-3BEDD3D0A4BF@mac.com> On 4 Mar, 2010, at 7:04, Preston Holmes wrote: > pdf = CGPDFDocumentCreateWithProvider(CGDataProviderCreateWithFilename(aFile)) > pdf.getTrimBox(pageNumber).getWidth() > > I get warning output like: > > Wed Mar 3 21:48:07 element.sd.cox.net Python[24469] : The function `CGPDFDocumentGetTrimBox' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Please use `CGPDFPageGetBoxRect' instead. > > However from doing a dir(pdf) I don't see the preferred method exposed through the python bindings. > > This is 10.5.8 with stock python2.5 > > in 10.6.2 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/CoreGraphics/_CoreGraphics.so isn't even 64bit > > I don't use this stuff often, but are python bindings to OS X to libraries like this withering on the vine? The CoreGraphics module is slowly dying and there is nothing we can do about it: it is maintained by Apple and is not opensource (and the last time I checked it used undocumented APIs and is therefore unlikely to ever be opensourced). There is a replacement though: pyobjc-framework-Quartz has the Quartz module which provides bindings to the same APIs, but using a different synta (such closer to the C API). Ronald > > -Preston > > _______________________________________________ > 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 Thu Mar 4 12:39:49 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 04 Mar 2010 12:39:49 +0100 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) In-Reply-To: References: <1267598651.4b8e053b514be@astrosun2.astro.cornell.edu> Message-ID: <96F88486-AA90-41E4-9D12-88AF3261A268@mac.com> On 3 Mar, 2010, at 11:33, Ned Deily wrote: > In article <1267598651.4b8e053b514be at astrosun2.astro.cornell.edu>, > Tom Loredo wrote: >> Sorting out the Tcl/Tk situation with Python-2.6.4 is coming >> up quickly on my MacPy to-do list (I'm just setting up a new machine, >> as you may have guessed). I've experienced the weirdness >> associated with creating new windows in IDLE (with Apple's >> Py-2.6.1). I was not clear on whether this problem is unique >> to Apple's Python (in Snow Leopard), to their Tcl/Tk, or if it >> is a genuine Python/Tcl issue in the 2.6 series. >> >> Digging around, I've found a bug report: >> >> http://bugs.python.org/issue6864 >> >> I find the report a bit confusing; it gives me the impression that >> the problem is due to a not-yet-understood (as of Py-2.6.3) interaction >> between Python and Tk 8.5. But it sounds like you have a working >> setup with Py-2.6.4 and Tk 8.5. >> >> Do you have a recommended Tk setup that works? E.g., does ActiveTcl 8.5 >> solve this issue (with Py-2.6.4)? My web searching hasn't turned up >> any clear advice about this. > > Ugh! As far as I know there has not been much progress on this issue > since that bug report was opened; certainly I haven't been thinking > about it. Time to do some retesting. If anyone has recently, please > speak up. > > The main problem before was 64-bit Tk availability. IIRC, the only real > game in town for that was the Apple-supplied 8.5 in 10.6 which > apparently pulled in from the TkAqua Cocoa/64-bit port project (which > now may be a part of 8.6?). Kevin Walzer was trying to get that the > TkAqua 64-bit stuff to work with Python on 10.5 a while back but he ran > into various problems. Perhaps he can jump in here with an update. > I've seen reports that the X11 version of Tk may work in 64-bit (I think > the MacPorts version does) but I have no (recent) personal experience > with X11 Tk on OS X and, frankly, I'm not looking to get any more. X11 > Tk would probably require some build tweaking. > > If you don't mind running any Tk-based stuff in 32-bit mode, either the > Apple-supplied Tk 8.4 or ActiveState 8.4 worked fine when we last poked > at this. But one may need to tweak the build of Tkinter in Python to > dynamically link with 8.4, rather than 8.5, when building on 10.6, since > both versions exist in /System/Library/Frameworks. Something else to > look at. Ronald has suggested modifying Tkinter and the installer build > to allow one Python instance to dynamically link with either 8.4 or 8.5, > depending on what is available but I don't think anyone has found time > to work on that. Contributions welcome! > > The easy way to avoid nearly all the hassle, at the moment, is to stick > with 32-bit and build Python on 10.5 - not a good long term solution. The best I might be able to implement before 2.7 goes into beta is a hack where Tkinter gets linked to Tk 8.4 when the deployment target is 10.5 or earlier. That would allow building the binary distribution on 10.6 and would result in a working copy of IDLE. Supporting Tk 8.5 would be nice, but is not something I can spend time on at the moment (due to lack of time to do the work). What's important for me: * The distribution on python.org must work on OSX 10.4 or later * IDLE must work on all supported platforms * Users should not have to install Tcl/Tk, Python should use the system install and optionally use a user install in /Library when that is available Ronald > > -- > 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 -------------- 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 Thu Mar 4 12:41:25 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 04 Mar 2010 12:41:25 +0100 Subject: [Pythonmac-SIG] Problems installing Python-2.7a3 on 10.6.2 In-Reply-To: <1266810052.4b81fcc464636@astrosun2.astro.cornell.edu> References: <1266810052.4b81fcc464636@astrosun2.astro.cornell.edu> Message-ID: On 22 Feb, 2010, at 4:40, Tom Loredo wrote: > > Hi folks- > > I've tried installing an intel framework universal build of > Py-2.7a3 on Snow Leopard 10.6.2 (i.e., i386 + x86_64). I > used this configure: > > ./configure --prefix=/usr/local/tmp --enable-framework --with-framework-name=PythonAlpha --enable-universalsdk=/ -- > with-universal-archs=intel The with-framework-name option is broken in the trunk, I know how to fix it but haven't had time to actually commit the fix yet. I'll do so later this week. 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 Thu Mar 4 12:44:42 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 04 Mar 2010 12:44:42 +0100 Subject: [Pythonmac-SIG] py2app pytz error In-Reply-To: <47293.172.16.23.253.1266601381.squirrel@www.cmrr.umn.edu> References: <47293.172.16.23.253.1266601381.squirrel@www.cmrr.umn.edu> Message-ID: <032BC969-2F36-4028-8482-12E07FC0E350@mac.com> On 19 Feb, 2010, at 18:43, robinson at cmrr.umn.edu wrote: > > I'm trying to create a mac .app on an ubuntu-based system. I've got the > pytz module and am using py2app4.3, setuptools-0.6c11, and python 2.5.2. That's not a supported configuration. Py2app must be run on an OSX machine. It is in theory possible to create patches for py2app and friends that would allow running it on Linux while targetting OSX, but I won't do the work. It is also highly likely that any patches to get this working would get broken as py2app evolves. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From loredo at astro.cornell.edu Thu Mar 4 18:23:18 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Thu, 4 Mar 2010 12:23:18 -0500 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) Message-ID: <1267723398.4b8fec86254d6@astrosun2.astro.cornell.edu> Ned wrote: > The easy way to avoid nearly all the hassle, at the moment, is to stick > with 32-bit and build Python on 10.5 - not a good long term solution. I hesitate to bring this up for 2.6.5 because I know you guys are swamped, but... Can you clarify how those of us on Snow Leopard can build a 32-bit 2.6.4 or 2.6.5? If we *deploy* for 10.4 or 10.5 while building on Snow Leopard, can we get a 32-bit intel executable via a universal ppc/i386 build? (Background for those who may not have followed this: A universal intel build currently does build a bundle with 32- and 64-bit executables, but there is no way to access the 32-bit version, and no way to build just 32-bit intel on Snow Leopard. I think the fix is planned for 2.7 but not yet in 2.7a3 and not backported to 2.6.5rc1.) To explain my continued pestering on this: I've written several Homebrew formulae to make installing Python and the libs for NumPy/SciPy pretty painless on the Mac. Homebrew builds everything from source, and its policy is to try as much as possible to target the user's platform; it is being maintained for Snow Leopard (though many formulae build on Leopard). Pretty much everything in Homebrew is intel-only (since Snow Leopard is), hence its current Python formula has only 64-bit intel (default) and universal intel options. Obviously we can put in ppc/intel universal options to get 32-bit (as a stopgap), but I'm now getting dizzy with the number of Python version/config flag permutations I've tried, trying to build an accessible 32-bit Python on Snow Leopard (so far without success on 2.6.4, 2.6.5rc1, and 2.7a3), and I'd prefer to have some guidance on what to do for my next iterations. 8-) Or does one really have to build under Leopard to get 32-bit? Thanks, Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From loredo at astro.cornell.edu Thu Mar 4 19:06:25 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Thu, 4 Mar 2010 13:06:25 -0500 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) Message-ID: <1267725985.4b8ff6a195d81@astrosun2.astro.cornell.edu> Chris wrote: > > In the past I've also used wxpython for matplotlib, but the wxpython > > situation with Snow Leopard seems even more confusing than the tkinter > > situation! > > How so? Difficult, maybe, but it shouldn't be confusing: > > wxPython is 32 bit, you need to use it with 32 bit Python. * At the very top of the wxpython page: (8-Oct-2008) A set of wxPython binaries for Python 2.6 on the Mac and Windows (32-bit and 64-bit) are now available. * On the wxpython download page: http://www.wxpython.org/download.php#binaries the Mac section says not a word about 32- vs 64-bit. * Google: wxpython "Snow Leopard" Does that look very clear or promising? * Apple's Python on SL is 64-bit by default; unless a user understands the 32-bit compatibility and has also figured out how to use Apple's proprietary mechanism to switch Python to 32-bit, they will not have an easy time with Apple's Python and wxpython. The actual situation may be straightforward, but potential users should not have to stumble upon a mailing list posting to figure out what will work. 32-bit Python will be fine for me for the time being, so I'm glad to learn what will work. But some of my time series work is pressing closer to the 32-bit boundary. Also, as long as those with some expertise with what goes on "under the covers" (and Chris has 10^3 times my expertise) don't push on 64-bit to see what breaks when and where, 64-bit will never happen. > I'm quite happy with wx for MPL and all sorts of other stuff, though I"m > not on Snow Leopard yet, either. It's a SL thread, but still I'm glad to learn what combinations work. Can you let us know exactly what is working for you? Leopard? Apple's Python or Python.org or a new build? Which Python version? Which numpy/scipy/mpl versions? (This should probably be another thread!) On a related topic, Kevin noted: > many people can't get their 64-bit > Python GUI apps to build with py2app. I've seen reports on issues with > PyQt and PyObjC, and I've also had similar issues with my Tkinter apps. I don't know how representative this is of the current situation, but it appears 2.6.5 has fixed at least one annoying bug wrt py2app and PyObjC: Building 64-bit PyObjC Applications With Py2app http://www.hardcoded.net/articles/building-64-bit-pyobjc-applications-with-py2app.htm -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From aahz at pythoncraft.com Thu Mar 4 20:00:50 2010 From: aahz at pythoncraft.com (Aahz) Date: Thu, 4 Mar 2010 11:00:50 -0800 Subject: [Pythonmac-SIG] Build hell resolved: 10.4/10.5/10.6 Message-ID: <20100304190050.GA17310@panix.com> [cross-posted to both pythonmac-sig and pyobjc-dev for max audience, Reply-To set to pyobjc-dev for discussion] I finally figured out how to build my app: Turns out that in order to use PyObjC 2.2 you need py2app 0.4.3 -- but PyObjC 1.4 needs py2app 0.3.6. (PyObjC 1.4 is for the main app running on 10.4/10.5/10.6; PyObjC 2.2 is used for FSEvents on 10.5/10.6, previously PyObjC 2.2b2 for 10.5 only, but 2.2b2 doesn't work on 10.6) I built PyObjC 2.2 on 10.5 from source. It's a right royal pain (partly because PyPI has no mechanism for downloading *source* dependencies), and I really hope that the next release of PyObjC makes it much easier to build from source. (Or that binaries for 10.5 get included.) My clue that py2app was the issue was when I figured out that from Foundation import NSAutoreleasePool, NSMutableArray, NSString causing ValueError: Don't know CF type for typestr '^{__CFAllocator=}', cannot create special wrapper only and always occurred in a build, not from plain Python, even on 10.6, meaning that PyObjC wasn't the problem. Incidentally, using py2app 0.4.3 with PyObjC 1.4 resulted in some error about corrupted NIB file that I didn't record exactly. Before someone asks how I can use both PyObjC 1.4 and PyObjC 2.2, I'm playing games with ~/Library/Python/2.6 being a symlink that gets swapped during the build process. (Obviously, I end up with two different apps built.) -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Many customs in this life persist because they ease friction and promote productivity as a result of universal agreement, and whether they are precisely the optimal choices is much less important." --Henry Spencer From loredo at astro.cornell.edu Fri Mar 5 07:28:46 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Fri, 5 Mar 2010 01:28:46 -0500 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? Message-ID: <1267770526.4b90a49e397d6@astrosun2.astro.cornell.edu> Ned wrote: > Ronald has suggested modifying Tkinter and the installer build > to allow one Python instance to dynamically link with either 8.4 or 8.5, > depending on what is available but I don't think anyone has found time > to work on that. Contributions welcome! I looked in Apple's Tcl and Tk frameworks, and the only libraries I find there appear to be *static* libraries (.a files that "file" indicates are ar archives). Am I right about this? Would this make it easier to modify setup.py to build against a particular version? -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From loredo at astro.cornell.edu Fri Mar 5 16:28:58 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Fri, 5 Mar 2010 10:28:58 -0500 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? Message-ID: <1267802938.4b91233a7e90f@astrosun2.astro.cornell.edu> To follow up on my own post: > I looked in Apple's Tcl and Tk frameworks, and the only libraries > I find there appear to be *static* libraries (.a files that "file" indicates > are ar archives). What I didn't realize is that the "Tcl" and "Tk" files in the frameworks are 3-way universal dynamic libs, even though they don't have the .dylib suffix. Any advice on what avenue to pursue to link against 8.4 would be appreciated. I used to edit Modules/Setup to build _tkinter; would this be a possible solution, or does setup.py overrule what is in Setup if it finds system resources? -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From Chris.Barker at noaa.gov Sat Mar 6 19:02:00 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Sat, 06 Mar 2010 10:02:00 -0800 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) In-Reply-To: <1267725985.4b8ff6a195d81@astrosun2.astro.cornell.edu> References: <1267725985.4b8ff6a195d81@astrosun2.astro.cornell.edu> Message-ID: <4B929898.8050002@noaa.gov> Tom Loredo wrote: > Chris wrote: >> wxPython is 32 bit, you need to use it with 32 bit Python. > > * At the very top of the wxpython page: > > (8-Oct-2008) A set of wxPython binaries for Python 2.6 on the Mac and Windows > (32-bit and 64-bit) are now available. I guess that should read: "A set of wxPython binaries for Python 2.6 on the Mac (32 bit) and Windows (32-bit and 64-bit) are now available." English can lack precision. > * On the wxpython download page: > > http://www.wxpython.org/download.php#binaries > > the Mac section says not a word about 32- vs 64-bit. That's 'cause there is only one build, but a bit more text could help. > * Google: > > wxpython "Snow Leopard" > > Does that look very clear or promising? I agree that that looks painful, but here's my take on it: Nothing about snow leopard breaks wxPython -- what breaks wxPython is the Python that Apple ships with Snow Leopard. The answer to that is simple: DO NOT USE Apple's Python. I have never used it is has always been broken one way or another -- the Python/MacPython community has no say or control over what Apples does, and they have consistently broken all kinds of stuff in their build. On Leopard, they got it very, very close, but they still have never updated a version, and don't seem to be careful about compatibility, etc. The truth is, while it sounds great that Apple provides python, they have never treated like a real, supported system component for third party use. If you want wxPython and any number of other assorted third party packages, use the python.org build, it's as simple as that. > * Apple's Python on SL is 64-bit by default; unless a user > understands the 32-bit compatibility and has also figured out > how to use Apple's proprietary mechanism to switch Python to > 32-bit, they will not have an easy time with Apple's Python > and wxpython. exactly --so don't use it! > The actual situation may be straightforward, but potential users > should not have to stumble upon a mailing list posting to figure > out what will work. doc/wiki patches accepted. The binary download section of the wxPython page could use some updating. > 32-bit Python will be fine for me for the time being, so I'm > glad to learn what will work. But some of my time series work > is pressing closer to the 32-bit boundary. Yes, it would be nice to get 64 bit support -- it's a tough transition -- but partly Apple is to blame, they decided not to build a 64 bit Carbon. > Also, as long as > those with some expertise with what goes on "under the covers" > (and Chris has 10^3 times my expertise) don't push on 64-bit to > see what breaks when and where, 64-bit will never happen. well, I'm too dependent on wx, and not nearly enough of an expert to work on wxOSX (Cocoa-based) -- so all I can do is wait for now. I think it's looking pretty promising, though. > It's a SL thread, but still I'm glad to learn what combinations > work. Can you let us know exactly what is working for you? > Leopard? Apple's Python or Python.org or a new build? Which > Python version? Which numpy/scipy/mpl versions? (This should > probably be another thread! As far as I know, everything that works on older systems works on Snow Leopard, so all you need to do is install the standard binaries: Python from python.org wxPython from wxPython.org MPL from the MPL project numpy from the numpy project Do you see a theme, here? It gets tough if you want to use Apple's Python or build stuff yourself on Snow Leopard -- it's always been a pain to build for older systems on a Mac, though it sounds like it's even worse than usual with Snow Leopard. > On a related topic, Kevin noted: > >> many people can't get their 64-bit >> Python GUI apps to build with py2app. yup, there are still issues. The trick is that there just isn't that large a community doing this stuff. There are a lot of folks using python on the Mac, but apparently they are doing mostly web development and other non-gui unix-y stuff, where there are simply fewer issues. The funny thing for me is that my IT folks are making me upgrade to Leopard (from tiger), 'cause Apple has stopped providing security patches, but they won't let go right to Snow Leopard, 'cause they don't have a "standard configuration" defined for that yet -- what a pain! Having a total of 4 architectures for the Mac does NOT make this easy! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From ronaldoussoren at mac.com Sun Mar 7 09:52:15 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 07 Mar 2010 09:52:15 +0100 Subject: [Pythonmac-SIG] Recommended Tcl/Tk with Py-2.6.x? (was: Test failure...) In-Reply-To: <1267723398.4b8fec86254d6@astrosun2.astro.cornell.edu> References: <1267723398.4b8fec86254d6@astrosun2.astro.cornell.edu> Message-ID: <4683E7EB-E36E-44AD-8C95-F6E0DD3C9A54@mac.com> On 4 Mar, 2010, at 18:23, Tom Loredo wrote: > > Ned wrote: > >> The easy way to avoid nearly all the hassle, at the moment, is to stick >> with 32-bit and build Python on 10.5 - not a good long term solution. > > I hesitate to bring this up for 2.6.5 because I know you guys are > swamped, but... Can you clarify how those of us on Snow Leopard > can build a 32-bit 2.6.4 or 2.6.5? If we *deploy* for 10.4 or 10.5 > while building on Snow Leopard, can we get a 32-bit intel executable > via a universal ppc/i386 build? configure --enable-framework --enable-universalsdk make make install This builds a framework install that contains ppc and i386 code. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From eblot.ml at gmail.com Sun Mar 7 19:04:58 2010 From: eblot.ml at gmail.com (Emmanuel Blot) Date: Sun, 7 Mar 2010 19:04:58 +0100 Subject: [Pythonmac-SIG] py2app and PyQt4 Message-ID: <92a1e6ea1003071004g712d32f1g3588191dd00662ea@mail.gmail.com> Hi All, I would like to write a setup.py script for py2app, but I keep bumping into an error I don't know how to resolve: How do I specify a dependency on PyQt4 ? * If I do not tell py2app about the dependency, it successfully creates a Mac OS X application package, but fails to run it as it cannot find the PyQt4 libraries * If I specify 'PyQt4' as a dependency in setup.py, py2app fails to resolve this dependency and refuses to build up the package, with the following error from the underlying pkg_resources module: Traceback (most recent call last): File "setup.py", line 54, in setup_requires = ['py2app'], File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 994, in run_command cmd_obj.ensure_finalized() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 117, in ensure_finalized self.finalize_options() File "/Library/Python/2.6/site-packages/py2app/build_app.py", line 295, in finalize_options self.eggs = require(self.distribution.install_requires) File "/Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 648, in require needed = self.resolve(parse_requirements(requirements)) File "/Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 546, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: PyQt4 I've added the following dependency requirement in the setup.py file install_requires = [ 'PyQt4' ], When I run python from the command line, I don't have any issues to load PyQt4: Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import PyQt4 >>> print PyQt4 >>> Moreover, the application loads and executes fine when it is run from the command line. However, py2app keeps failing to find PyQt4. Any idea about how to solve this issue? I've googled it but had no luck, "pkg_resources.DistributionNotFound: PyQt4" gives no answer. Thanks in advance, Manu If that matters: Snow Leopard 10.6.2 w/ full 64 bits installation on a MBP Unibody From loredo at astro.cornell.edu Sun Mar 7 21:27:33 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Sun, 7 Mar 2010 15:27:33 -0500 Subject: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x) In-Reply-To: <4368_1267951968_4B936960_4368_8794_1_4683E7EB-E36E-44AD-8C95-F6E0DD3C9A54@mac.com> References: <1267723398.4b8fec86254d6@astrosun2.astro.cornell.edu> <4368_1267951968_4B936960_4368_8794_1_4683E7EB-E36E-44AD-8C95-F6E0DD3C9A54@mac.com> Message-ID: <1267993653.4b940c35c6297@astrosun2.astro.cornell.edu> Quoting Ronald Oussoren : > > If we *deploy* for 10.4 or 10.5 > > while building on Snow Leopard, can we get a 32-bit intel executable > > via a universal ppc/i386 build? > > configure --enable-framework --enable-universalsdk > make > make install > > This builds a framework install that contains ppc and i386 code. Thanks, Ronald. According to the Mac/README file, "--enable-universalsdk" should set a path to an appropriate SDK when used on 10.5 or later. "--enable-universalsdk=/" should find an appropriate default, but Ned alerted me that it isn't guaranteed to work in all combinations (there are so many different option combinations in the configuration that I suspect not all have been tested/verified). He suggested that, to play it safe, the configure command should specify the SDK explicitly (full path to the 10.4, 10.5, or 10.6 SDK), as well as set --with-universal-archs (choices are in the Mac/README) and MACOSX_DEPLOYMENT_TARGET (which unfortunately isn't discussed in the README). Regarding building 32-bit *alone* on Snow Leopard, I've been having luck with this, based on a post in a Python bug tracker issue on readline problems: ./configure --prefix=/usr/local/tmp --enable-framework\ BASECFLAGS="-arch i386" \ CFLAGS="-arch i386" \ LDFLAGS="-arch i386" \ MACOSX_DEPLOYMENT_TARGET=10.6 (of course, set the prefix as you need to). It also works deploying for 10.5. I'm not setting the universalsdk here, since I'm not building a universal binary; I hope I'm right that it's not necessary. In any case, it's passing the expected tests. I'm using Py-2.6.5rc1. I was really asking about how to build, on Snow Leopard, a 32-bit version with a *working* tkinter and IDLE. I finally figured out a way to modify setup.py to do this (building against Apple's Tcl/Tk 8.4). It gives an i386 Python framework that passes the tcl tests, with a working IDLE. I'll post the details shortly in case it's of use to anyone, but it's a kind of ugly hack. I don't know if this is interesting enough that I should post the patch on the Python issue tracker; if so, I'd appreciate a pointer to a relevant thread. -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From Chris.Barker at noaa.gov Mon Mar 8 20:14:30 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 08 Mar 2010 11:14:30 -0800 Subject: [Pythonmac-SIG] py2app and PyQt4 In-Reply-To: <92a1e6ea1003071004g712d32f1g3588191dd00662ea@mail.gmail.com> References: <92a1e6ea1003071004g712d32f1g3588191dd00662ea@mail.gmail.com> Message-ID: <4B954C96.90904@noaa.gov> Emmanuel Blot wrote: > I would like to write a setup.py script for py2app, but I keep bumping > into an error I don't know how to resolve: > > How do I specify a dependency on PyQt4 ? First things first: Please specify exactly what versions and builds of python, pyqt4 and py2app, and OS-X you are using. All those make a difference. Second: does anyone have a simple qt4 sample that works? WE should have one in the py2app SVN -- maybe we do... Third, I don't use Qt, so i can't help there, but a few general comments: > * If I do not tell py2app about the dependency, it successfully > creates a Mac OS X application package, but fails to run it as it > cannot find the PyQt4 libraries The question here is: did pyapp not find the dependency?, or did it not include it correctly -- I suspect the second case is what has happened. There used to be a "recipe" for pyqt -- I suspect that it it out of date, and not working quite right. Some things to do to investigate: - start with the very simplest pyqt app you can make -- keep things simpler. - before that, start with the simplest python app you can make (print "something" should do it), make sure you're dealing with a qt problem. - take a look at the py2app output -- yes, there is a lot, but you'll see some hints in there -- maybe search if for "qt4". - take a look inside the app bundle generated (right click on in to do so, or use the command line). By seeing what it in there, you'll get an idea what py2app has done. - take a look at the output generated when you try to start the app -- it should show up in the "Console" app. - You can add some judicious "import sys; print sys.path" statements in your app, and see what happens when you run the bundle. - take a look at the qt recipe that is in the py2app distro -- maybe it needs fixing, maybe it isn't being run, 'cause it isn't set up for pyqt4. > * If I specify 'PyQt4' as a dependency in setup.py, py2app fails > install_requires = [ > 'PyQt4' > ], you've specified it as a dependency to setuptools, not to py2app -- so I wouldn't worry about that not working. To tell py2app that you need a given package, you do something like: packages = ['pyQt4'] see the py2app docs. Though I don't think that's your issue. Anyway, those are all the things I'd do to diagnose the problem. -Chris > If that matters: Snow Leopard 10.6.2 w/ full 64 bits installation on a > MBP Unibody ooops! OK, I think there are some issues with 64 python and py2app -- do some googling of this list for that -- you may need to either fix py2app (or macholib), or use BundleBuilder. You'll see stuff on this list about it. If you don't really need 64bit, I'd just stick with the stock python.org 32 bit builds -- all this will be much easier. -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 dwf at cs.toronto.edu Mon Mar 8 21:48:03 2010 From: dwf at cs.toronto.edu (David Warde-Farley) Date: Mon, 8 Mar 2010 15:48:03 -0500 Subject: [Pythonmac-SIG] Voice/Speech recognition In-Reply-To: <9530A7A0-0D21-4127-ADDD-695D58206DDA@rosspixelworks.com> References: <9530A7A0-0D21-4127-ADDD-695D58206DDA@rosspixelworks.com> Message-ID: On 3-Mar-10, at 10:45 PM, Dan Ross wrote: > I'd like to make an app/game for my kids in which they would see a > word, read it and the game would be able to recognize if they've > read it correctly. > > Does anyone have any suggestions for speech/voice recognition? You ought to be able to leverage the Speech Service built into OS X for this. http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/Speech/Articles/RecognizeSpeech.html David From dan at rosspixelworks.com Mon Mar 8 22:15:39 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Mon, 8 Mar 2010 15:15:39 -0600 Subject: [Pythonmac-SIG] Voice/Speech recognition In-Reply-To: References: <9530A7A0-0D21-4127-ADDD-695D58206DDA@rosspixelworks.com> Message-ID: <23b028d35705611311991d368853a431.squirrel@server3.fusednetwork.com> I thought of this too but was kind of hoping for a pure Python option. PyObjC may be the only route I'm finding.... Thank you for the suggestion David. On Mon, March 8, 2010 2:48 pm, David Warde-Farley wrote: > > On 3-Mar-10, at 10:45 PM, Dan Ross wrote: > >> I'd like to make an app/game for my kids in which they would see a >> word, read it and the game would be able to recognize if they've >> read it correctly. >> >> Does anyone have any suggestions for speech/voice recognition? > > > You ought to be able to leverage the Speech Service built into OS X > for this. > > http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/Speech/Articles/RecognizeSpeech.html > > David > From nad at acm.org Wed Mar 10 00:36:49 2010 From: nad at acm.org (Ned Deily) Date: Tue, 09 Mar 2010 15:36:49 -0800 Subject: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x) References: <1267723398.4b8fec86254d6@astrosun2.astro.cornell.edu> <4368_1267951968_4B936960_4368_8794_1_4683E7EB-E36E-44AD-8C95-F6E0DD3C9A54@mac.com> <1267993653.4b940c35c6297@astrosun2.astro.cornell.edu> Message-ID: In article <1267993653.4b940c35c6297 at astrosun2.astro.cornell.edu>, Tom Loredo wrote: > Regarding building 32-bit *alone* on Snow Leopard, I've been having > luck with this, based on a post in a Python bug tracker issue on > readline problems: > > ./configure --prefix=/usr/local/tmp --enable-framework\ > BASECFLAGS="-arch i386" \ > CFLAGS="-arch i386" \ > LDFLAGS="-arch i386" \ > MACOSX_DEPLOYMENT_TARGET=10.6 > > (of course, set the prefix as you need to). > > It also works deploying for 10.5. I'm not setting the universalsdk > here, since I'm not building a universal binary; I hope I'm right > that it's not necessary. In any case, it's passing the expected > tests. I'm using Py-2.6.5rc1. That looks like it should cover all the bases regarding "-arch" and should work. As long as you are targeting the build just for the build machine and its current os level, you shouldn't need the sdk. It might be nice to have a simpler configure option for this. It wasn't a problem prior to 10.6 because everything ran by default in 32-bit mode so the explicit setting of -arch wasn't needed. > I was really asking about how to build, on Snow Leopard, a 32-bit > version with a *working* tkinter and IDLE. I finally figured out > a way to modify setup.py to do this (building against Apple's > Tcl/Tk 8.4). It gives an i386 Python framework that passes the tcl > tests, with a working IDLE. I'll post the details shortly in case > it's of use to anyone, but it's a kind of ugly hack. I don't know > if this is interesting enough that I should post the patch on > the Python issue tracker; if so, I'd appreciate a pointer to a > relevant thread. The last time I played with the 10.6 Tk 8.4, it worked just fine, so, yeah, if you only need a 32-bit Tk on 10.6 that should be OK. Earlier versions of Aqua Tk shipped with some previous versions of OS X were known to have problems so the standard workaround for that was to make sure the OS X installer was built on a machine with ActiveState's newer Tk 8.4 installed (in /Library/Frameworks/{Tcl,Tk}.frameworks). Then on the installed machine when Tkinter is imported, OS X looks first in /Library/Frameworks/Tk... and, if necessary, falls backs to /System/Library/Frameworks/Tk... Because the python.org installers are targeted to run on 10.3.9 through 10.6, they are still built this way. But, as Ronald points out, a more flexible scheme of dynamically using either 8.5 or 8.4 would be better. (Sorry for the delay in responding: with 2.6.5, 3.1.2, and the final 2.7 alpha releases all in play right now, it's been a little hectic trying to clear out some of the more pressing issues.) -- Ned Deily, nad at acm.org From loredo at astro.cornell.edu Thu Mar 11 06:18:54 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Thu, 11 Mar 2010 00:18:54 -0500 Subject: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x) Message-ID: <1268284734.4b987d3e9546b@astrosun2.astro.cornell.edu> Ned- No need to apologize; I realize the Python developers are juggling many balls right now! But I'll apologize---for always replying in a way that starts yet another thread. I reply to emails or web archive versions of the posts, and as far as I can tell, there is no way to respond in a manner that continues a thread. I've looked for info on this, and from what I can tell it's a capability that is being considered for *future* Mailman web interfaces. If anyone knows of a way to accomplish this right now, please let me know. Regarding my setup.py hack to allow building 32-bit on 10.6 with Tcl/Tk 8.4: > The last time I played with the 10.6 Tk 8.4, it worked just fine, so, > yeah, if you only need a 32-bit Tk on 10.6 that should be OK. Just to clarify: I think the situation is a little worse than some may infer from this. As I understand things, if you want to build Python 2.6 on 10.6 with a working Tkinter and IDLE, and without installing a new Tcl/Tk, your only option is build a 32-bit Python that links against Apple's Tcl/Tk 8.4, and this cannot be done with the existing installer. I just want other readers not to infer from your comment that if you're happy with Python's default 64-bit build, all is fine. If you are willing to install a new Tcl/Tk, you can have success but you have to be careful. Both ActiveTcl 8.4 and 8.5 (the current version) will produce a working IDLE. Both of these are only 32-bit in the free versions, so you will have to do some undocumented installation trickery (in my earlier post) to build a 32-bit Python-2.6 on 10.6 to mate with ActiveTcl, but at least you can avoid patching setup.py. I've also found that the current Tcl/Tk Aqua "de-carbon" 8.5 commit at GitHub seems to work fine with Py-2.6.5rc1, both 32-bit *and* 64-bit (I built universal frameworks, so with one install you can support either 32- or 64-bit Python). 64-bit Python's "make test" will crash when it reaches test_tcl, but if you run the test all alone, it passes, and IDLE works fine. I don't understand what regrtest.py does that affects the test when it's not run in isolation. BTW, with Tcl/Tk de-carbon, I have finally built a 64-bit Python with 64-bit numpy/scipy/matplotlib, with mpl's TkAgg front end working fine for the examples I've tried so far. I'm setting up a Homebrew fork to duplicate these installs; if anyone is interested in it, drop me a line; it would be great to have verification that it works elsewhere. -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From loredo at astro.cornell.edu Thu Mar 11 06:32:24 2010 From: loredo at astro.cornell.edu (Tom Loredo) Date: Thu, 11 Mar 2010 00:32:24 -0500 Subject: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x) Message-ID: <1268285544.4b988068276db@astrosun2.astro.cornell.edu> > If you are willing to install a new Tcl/Tk, you can have success but > you have to be careful. Both ActiveTcl 8.4 and 8.5 (the current > version) will produce a working IDLE. Both of these are only 32-bit > in the free versions, so you will have to do some undocumented installation > trickery (in my earlier post) to build a 32-bit Python-2.6 on 10.6 to > mate with ActiveTcl, but at least you can avoid patching setup.py. I should have added: If you're happy with 32-bit Python on Snow Leopard and have no need to build from source, just do as Chris recommended earlier: Use Python.org's installer. It is built on an earlier OS than SL and links against Apple's Tcl/Tk 8.4, so when you install it on SL, it finds the 8.4 version that Apple includes in SL for backward compatibility. -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From Chris.Barker at noaa.gov Thu Mar 11 20:26:58 2010 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 11 Mar 2010 11:26:58 -0800 Subject: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x) In-Reply-To: <1268285544.4b988068276db@astrosun2.astro.cornell.edu> References: <1268285544.4b988068276db@astrosun2.astro.cornell.edu> Message-ID: <4B994402.7020306@noaa.gov> Tom, Thanks for the summary. Tom Loredo wrote: > I should have added: If you're happy with 32-bit Python on Snow Leopard > and have no need to build from source, just do as Chris recommended > earlier: Use Python.org's installer. It is built on an earlier OS > than SL and links against Apple's Tcl/Tk 8.4, so when you install > it on SL, it finds the 8.4 version that Apple includes in SL for > backward compatibility. And also works with wxPython, MPL, scipy, numpy, and many many other third part packages. -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 faircloth at gmail.com Fri Mar 12 23:43:57 2010 From: faircloth at gmail.com (Brant Faircloth) Date: Fri, 12 Mar 2010 14:43:57 -0800 Subject: [Pythonmac-SIG] Minor bug/typo in r89 (trunk) of py2app/build_app.py Message-ID: <1ca3afe71003121443o2974bf67k78b4bba45c3a0218@mail.gmail.com> hello, i was working out of the trunk for py2app in hopes of building a pyqt4 app, and after updating to r32 of macholib (and fixing the 'unpack requires a string argument of length with?' error), i set about returning to py2app to get things working. anyway, on my renewed building efforts, the macholib error was fixed, but i got: NameError: global name 'PYTHONFRAMEWORK' is not defined /Library/Python/2.6/site-packages/py2app-0.4.4-py2.6.egg/py2app/build_app.py(893)copy_framework() -> if info['shortname'] == PYTHONFRAMEWORK: digging around, i noticed a typo in the global variable name of the current trunk for py2app. this is likely fixed somewhere, but see attached patch if it isn't (it's terribly simple ; ). best, brant < * ) (_ \\ _ || -------------- next part -------------- A non-text attachment was scrubbed... Name: ramework.patch Type: application/octet-stream Size: 396 bytes Desc: not available URL: From rfritz at u.washington.edu Mon Mar 15 04:21:54 2010 From: rfritz at u.washington.edu (R Fritz) Date: Sun, 14 Mar 2010 20:21:54 -0700 Subject: [Pythonmac-SIG] Fun with py2app and OpenGL Message-ID: Explicitly including packages 'photom' (mine) and 'OpenGL' (published) produces strange results when py2app is run. For some reason, instead of ending up in the site-packages.zip file, or the site-packages directory, the packages are dropped into ../site-packages.zip, where they are not found. I ended up hacking this by creating site-packages and moving the packages into it, but am still wondering why it doesn't just work. Is there a simple fix I am missing? -- Randolph Fritz design machine group, architecture department, university of washington rfritz at u.washington.edu -or- rfritz333 at gmail.com setup.py: """ This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup APP = ['PhotomView.py'] DATA_FILES = [] INCLUDES = ['ctypes.util'] PACKAGES = ['photom','OpenGL'] RESOURCES = ['PhotomView.xrc'] OPTIONS = { 'argv_emulation': True, 'includes': INCLUDES, 'packages': PACKAGES, 'resources' : RESOURCES } setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) From rfritz at u.washington.edu Mon Mar 15 17:35:12 2010 From: rfritz at u.washington.edu (R Fritz) Date: Mon, 15 Mar 2010 09:35:12 -0700 Subject: [Pythonmac-SIG] Fun with py2app and OpenGL References: Message-ID: On 2010-03-14 20:21:54 -0700, R Fritz said: > directory, the packages are dropped into ../site-packages.zip, where Correction, "site-packages/.." -- Randolph Fritz design machine group, architecture department, university of washington rfritz at u.washington.edu -or- rfritz333 at gmail.com From Chris.Barker at noaa.gov Mon Mar 15 18:26:39 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 15 Mar 2010 10:26:39 -0700 Subject: [Pythonmac-SIG] Fun with py2app and OpenGL In-Reply-To: References: Message-ID: <4B9E6DCF.6000709@noaa.gov> R Fritz wrote: > Explicitly including packages 'photom' (mine) and 'OpenGL' (published) why did you explicitly include them? They should have been picked up by py2app unless you import them in an odd way. I've got an OpenGL app bundling up fine without any tricks, and it puts OpenGL into: Maproom.app/Contents/Resources/lib/python2.5/OpenGL/ maybe there is a py2app recipe that handles that. -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 rfritz at u.washington.edu Mon Mar 15 20:12:57 2010 From: rfritz at u.washington.edu (R Fritz) Date: Mon, 15 Mar 2010 12:12:57 -0700 Subject: [Pythonmac-SIG] Fun with py2app and OpenGL References: <4B9E6DCF.6000709@noaa.gov> Message-ID: I don't think I am importing them in an odd way, though photom is in my PYTHONPATH. There is an OpenGL recipe, yes. But, all right, I've got it working. Now, however, I have that site.py problem, which I'll be bringing up over on pythonmac. On 2010-03-15 10:26:39 -0700, Christopher Barker said: > R Fritz wrote: >> Explicitly including packages 'photom' (mine) and 'OpenGL' (published) > > why did you explicitly include them? They should have been picked up by > py2app unless you import them in an odd way. > > I've got an OpenGL app bundling up fine without any tricks, and it puts > OpenGL into: > > Maproom.app/Contents/Resources/lib/python2.5/OpenGL/ > > maybe there is a py2app recipe that handles that. > > -Chris -- Randolph Fritz design machine group, architecture department, university of washington rfritz at u.washington.edu -or- rfritz333 at gmail.com From rfritz at u.washington.edu Mon Mar 15 20:45:16 2010 From: rfritz at u.washington.edu (R Fritz) Date: Mon, 15 Mar 2010 12:45:16 -0700 Subject: [Pythonmac-SIG] Fun with py2app and OpenGL References: <4B9E6DCF.6000709@noaa.gov> Message-ID: What's happening is that the files sometimes aren't found in site_packages.zip. Say what? (the site.py problem was a result of zipping and unzipping the app--zip did something to the embedded zip files.) On 2010-03-15 10:26:39 -0700, Christopher Barker said: > R Fritz wrote: >> Explicitly including packages 'photom' (mine) and 'OpenGL' (published) > > why did you explicitly include them? They should have been picked up by > py2app unless you import them in an odd way. > > I've got an OpenGL app bundling up fine without any tricks, and it puts > OpenGL into: > > Maproom.app/Contents/Resources/lib/python2.5/OpenGL/ > > maybe there is a py2app recipe that handles that. > > -Chris -- Randolph Fritz design machine group, architecture department, university of washington rfritz at u.washington.edu -or- rfritz333 at gmail.com From rfritz at u.washington.edu Mon Mar 15 20:58:51 2010 From: rfritz at u.washington.edu (R Fritz) Date: Mon, 15 Mar 2010 12:58:51 -0700 Subject: [Pythonmac-SIG] Fun with py2app and OpenGL References: Message-ID: Correction, I think this one was my error, though I still haven't run it all the way to ground. Sorry, folks. Randolph On 2010-03-15 12:45:16 -0700, R Fritz said: > What's happening is that the files sometimes aren't found in > site_packages.zip. Say what? > > (the site.py problem was a result of zipping and unzipping the app--zip > did something to the embedded zip files.) > > On 2010-03-15 10:26:39 -0700, Christopher Barker said: > >> R Fritz wrote: >>> Explicitly including packages 'photom' (mine) and 'OpenGL' (published) >> >> why did you explicitly include them? They should have been picked up by >> py2app unless you import them in an odd way. >> >> I've got an OpenGL app bundling up fine without any tricks, and it puts >> OpenGL into: >> >> Maproom.app/Contents/Resources/lib/python2.5/OpenGL/ >> >> maybe there is a py2app recipe that handles that. >> >> -Chris -- Randolph Fritz design machine group, architecture department, university of washington rfritz at u.washington.edu -or- rfritz333 at gmail.com From hraban at fiee.net Thu Mar 18 10:33:10 2010 From: hraban at fiee.net (Henning Hraban Ramm) Date: Thu, 18 Mar 2010 10:33:10 +0100 Subject: [Pythonmac-SIG] Installing PIL Message-ID: <954f61111003180233q357b3103of46bec215ec5b9e1@mail.gmail.com> Ahoi, since there was no appropriate binary package/egg for Python 2.6 on OSX 10.4/PPC, I tried to compile from source but did run into some dependency problems: PIL took some libs from my MacPorts installation (/opt/local/) that were incompatible to some it took from the OSX SDKs, and it couldn't find libraries that were installed with X11 (XQuartz 2.5.0 on x.org 1.7.6). I just changed the include paths in setup.py, and this order works best for me: elif sys.platform == "darwin": add_directory(library_dirs, "/usr/local/lib") add_directory(library_dirs, "/usr/X11R6/lib/") add_directory(include_dirs, "/usr/X11R6/include") add_directory(library_dirs, "/Developer/SDKs/MacOSX10.4u.sdk/usr/lib") add_directory(include_dirs, "/Developer/SDKs/MacOSX10.4u.sdk/usr/include") add_directory(library_dirs, "/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib") add_directory(include_dirs, "/Developer/SDKs/MacOSX10.3.9.sdk/usr/include") add_directory(library_dirs, "/opt/local/lib") add_directory(include_dirs, "/opt/local/include") HTH someone else. Greetlings, Hraban From dan at rosspixelworks.com Fri Mar 19 14:32:00 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Fri, 19 Mar 2010 08:32:00 -0500 Subject: [Pythonmac-SIG] Shell login for py2app bundle Message-ID: <4f5f4eaa2ab338002c0feefabb90fbfc.squirrel@server3.fusednetwork.com> I'm trying to call Imagemagick's convert through a subprocess from within a bundled app. Console.app is telling me that it can't find it in /bin/sh which stands to reason. I can change the "convert" command to "/usr/local/bin/convert" in the app but then when convert calls Ghostscript (gs) it can't find IT in /bin/sh. Suggestions? Thanks, Dan From kw at codebykevin.com Fri Mar 19 14:44:23 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 19 Mar 2010 09:44:23 -0400 Subject: [Pythonmac-SIG] Shell login for py2app bundle In-Reply-To: <4f5f4eaa2ab338002c0feefabb90fbfc.squirrel@server3.fusednetwork.com> References: <4f5f4eaa2ab338002c0feefabb90fbfc.squirrel@server3.fusednetwork.com> Message-ID: <4BA37FB7.6080403@codebykevin.com> On 3/19/10 9:32 AM, Dan Ross wrote: > I'm trying to call Imagemagick's convert through a subprocess from within > a bundled app. > > Console.app is telling me that it can't find it in /bin/sh which stands to > reason. > > I can change the "convert" command to "/usr/local/bin/convert" in the app > but then when convert calls Ghostscript (gs) it can't find IT in /bin/sh. > > Suggestions? > > Thanks, > > Dan Why wouldn't you just use the full path to gs as well? /path/to/gs --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From aahz at pythoncraft.com Fri Mar 19 16:04:02 2010 From: aahz at pythoncraft.com (Aahz) Date: Fri, 19 Mar 2010 08:04:02 -0700 Subject: [Pythonmac-SIG] Shell login for py2app bundle In-Reply-To: <4f5f4eaa2ab338002c0feefabb90fbfc.squirrel@server3.fusednetwork.com> References: <4f5f4eaa2ab338002c0feefabb90fbfc.squirrel@server3.fusednetwork.com> Message-ID: <20100319150402.GA2040@panix.com> On Fri, Mar 19, 2010, Dan Ross wrote: > > I'm trying to call Imagemagick's convert through a subprocess from within > a bundled app. > > Console.app is telling me that it can't find it in /bin/sh which stands to > reason. > > I can change the "convert" command to "/usr/local/bin/convert" in the app > but then when convert calls Ghostscript (gs) it can't find IT in /bin/sh. > > Suggestions? PIL? -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Many customs in this life persist because they ease friction and promote productivity as a result of universal agreement, and whether they are precisely the optimal choices is much less important." --Henry Spencer From Chris.Barker at noaa.gov Fri Mar 19 19:52:49 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 19 Mar 2010 11:52:49 -0700 Subject: [Pythonmac-SIG] Shell login for py2app bundle In-Reply-To: <20100319150402.GA2040@panix.com> References: <4f5f4eaa2ab338002c0feefabb90fbfc.squirrel@server3.fusednetwork.com> <20100319150402.GA2040@panix.com> Message-ID: <4BA3C801.5090003@noaa.gov> Aahz wrote: > On Fri, Mar 19, 2010, Dan Ross wrote: >> I'm trying to call Imagemagick's convert through a subprocess from within >> a bundled app. >> >> Console.app is telling me that it can't find it in /bin/sh which stands to >> reason. >> >> I can change the "convert" command to "/usr/local/bin/convert" in the app >> but then when convert calls Ghostscript (gs) it can't find IT in /bin/sh. >> >> Suggestions? > > PIL? right, or the python bindings to Image Magic. Anyway, that aside, there may be other reasons to call command line apps. I think your choices are: 1) hard-code the full paths - but this will only work if every system you run it on has them in the same places. 2) set a PATH environment variable, with at least the standard path in it: /bin:/usr/bin:/usr/local/bin you may want to add some in there for macports or fink, too. I suppose you could even import the users .bash_rc or something, and get it that way. Depending on how you are calling the command line tools, there much be a way to set environment variables -if nothing else, add the: PATH=/bin:/usr/bin:/usr/local/bin right before your command. -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 Sat Mar 20 15:23:55 2010 From: dan at rosspixelworks.com (Dan Ross) Date: Sat, 20 Mar 2010 09:23:55 -0500 Subject: [Pythonmac-SIG] Shell login for py2app bundle In-Reply-To: References: Message-ID: <4BA4DA7B.5050108@rosspixelworks.com> An HTML attachment was scrubbed... URL: From norman at khine.net Mon Mar 22 10:10:03 2010 From: norman at khine.net (Norman Khine) Date: Mon, 22 Mar 2010 10:10:03 +0100 Subject: [Pythonmac-SIG] Build hell resolved: 10.4/10.5/10.6 In-Reply-To: <20100304190050.GA17310@panix.com> References: <20100304190050.GA17310@panix.com> Message-ID: <9c2c8ffb1003220210w38d7737eo8e8874ae406dec8b@mail.gmail.com> Perhaps it would have been simpler to use the MacPorts package manager, if you had it installed. $ port deps py26-pyobjc Full Name: py26-pyobjc @2.2 Build Dependencies: py26-pyobjc2 Library Dependencies: py26-setuptools, py26-py2app On Thu, Mar 4, 2010 at 8:00 PM, Aahz wrote: > [cross-posted to both pythonmac-sig and pyobjc-dev for max audience, > Reply-To set to pyobjc-dev for discussion] > > I finally figured out how to build my app: > > Turns out that in order to use PyObjC 2.2 you need py2app 0.4.3 -- but > PyObjC 1.4 needs py2app 0.3.6. ?(PyObjC 1.4 is for the main app running > on 10.4/10.5/10.6; PyObjC 2.2 is used for FSEvents on 10.5/10.6, > previously PyObjC 2.2b2 for 10.5 only, but 2.2b2 doesn't work on 10.6) > > I built PyObjC 2.2 on 10.5 from source. ?It's a right royal pain (partly > because PyPI has no mechanism for downloading *source* dependencies), and > I really hope that the next release of PyObjC makes it much easier to > build from source. ?(Or that binaries for 10.5 get included.) > > My clue that py2app was the issue was when I figured out that > > from Foundation import NSAutoreleasePool, NSMutableArray, NSString > > causing > > ValueError: Don't know CF type for typestr '^{__CFAllocator=}', cannot create special wrapper > > only and always occurred in a build, not from plain Python, even on 10.6, > meaning that PyObjC wasn't the problem. > > Incidentally, using py2app 0.4.3 with PyObjC 1.4 resulted in some error > about corrupted NIB file that I didn't record exactly. > > Before someone asks how I can use both PyObjC 1.4 and PyObjC 2.2, I'm > playing games with ~/Library/Python/2.6 being a symlink that gets swapped > during the build process. ?(Obviously, I end up with two different apps > built.) > -- > Aahz (aahz at pythoncraft.com) ? ? ? ? ? <*> ? ? ? ? http://www.pythoncraft.com/ > > "Many customs in this life persist because they ease friction and promote > productivity as a result of universal agreement, and whether they are > precisely the optimal choices is much less important." --Henry Spencer > _______________________________________________ > 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 > -- ?no? u?? u?op ?p?sdn ????? u?? ? %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] ) From brendan.simon at etrix.com.au Sat Mar 27 10:22:56 2010 From: brendan.simon at etrix.com.au (Brendan Simon (eTRIX)) Date: Sat, 27 Mar 2010 20:22:56 +1100 Subject: [Pythonmac-SIG] argv emulation with python 2.6.5 Message-ID: <4BADCE70.4040607@etrix.com.au> I'm porting an app from python 2.5 (2.5.4) to python 2.6 (2.6.5) and having timeout issues with argv emulation. Does argv emulation with with python 2.6 (2.6.5) ?? How do I get argv emulation working with 2.6 and/or what is the work around or alternative solution ?? Thanks, Brendan. From noah at coccaro.com Sat Mar 27 07:35:43 2010 From: noah at coccaro.com (Noah Coccaro) Date: Fri, 26 Mar 2010 23:35:43 -0700 Subject: [Pythonmac-SIG] appscript fails to notice System Events is not running Message-ID: <2db068831003262335u876e646ofda64f9375323b34@mail.gmail.com> I have a long running server that uses appscript to send keystroke commands to System Events. It seems that System Events does not run constantly, or frequently dies. Quite often, appscript seems to be in a state where it incorrectly thinks System Events is running, and still sends commands to it, resulting in failures. Is there a workaround for this? A way to tell appscript that an app definitly is not running, or clear some cache maybe that is lingering? I notice if I start a different python instance, and send commands to System Events, it correctly starts it up. Here is a error dump from running essentially app('System Events').run() when it thought it was already running -- the same happens with launch, or any other command -- appscript can't get the terminology for System Events because it isn't running: File "./avjamasserver.py", line 102, in do_POST result = self.CallFunction(request, av.activity) File "./avjamasserver.py", line 74, in CallFunction return function(*function_args) File "/Users/noah/Software/RS232/avcontrol.py", line 300, in AudioMode SafeStart(sys_events) File "/Users/noah/Software/RS232/avcontrol.py", line 20, in SafeStart app_instance.run() File "build/bdist.macosx-10.5-i386/egg/appscript/reference.py", line 578, in __getattr__ selectortype, code = self.AS_appdata.referencebyname()[name] File "build/bdist.macosx-10.5-i386/egg/appscript/reference.py", line 260, in referencebyname self.connect() File "build/bdist.macosx-10.5-i386/egg/appscript/reference.py", line 229, in connect self._terms = terminology.tablesforapp(t) File "build/bdist.macosx-10.5-i386/egg/appscript/terminology.py", line 171, in tablesforapp _terminologycache[aemapp.AEM_identity] = tablesforaetes(aetesforapp(aemapp)) File "build/bdist.macosx-10.5-i386/egg/appscript/terminology.py", line 143, in aetesforapp raise RuntimeError("Can't get terminology for application (%r): %s" % (aemapp, e)) RuntimeError: Can't get terminology for application (aem.Application(u'/System/Library/CoreServices/System Events.app')): Command failed: Application isn't runnin g. (-600) -------------- next part -------------- An HTML attachment was scrubbed... URL: From amorris at mistermorris.com Sun Mar 28 16:12:26 2010 From: amorris at mistermorris.com (Adam Morris) Date: Sun, 28 Mar 2010 21:12:26 +0700 Subject: [Pythonmac-SIG] appscript fails to notice System Events is not running In-Reply-To: <2db068831003262335u876e646ofda64f9375323b34@mail.gmail.com> References: <2db068831003262335u876e646ofda64f9375323b34@mail.gmail.com> Message-ID: <9b202abc1003280712t780687ebif4747b331422075e@mail.gmail.com> I use a function whose sole purpose is to return a reference to System Events to avoid this problem: import appscript as ap def getSystemEvents(): try: # ask System Events for processes to see if it's there throwaway = ap.app('/System Events').processes() # would calling run() be better? result = ap.app('/System Events') except: # open up, Mr System Events ap.app('/Finder').startup_disk.items[':System:Library:CoreServices:System Events'].open() result = ap.app('/System Events') On Sat, Mar 27, 2010 at 1:35 PM, Noah Coccaro wrote: > I have a long running server that uses appscript to send keystroke commands > to System Events. > It seems that System Events does not run constantly, or frequently dies. > Quite often, appscript seems to be in a state where it incorrectly thinks > System Events is running, and still sends commands to it, resulting in > failures. > > Is there a workaround for this? A way to tell appscript that an app > definitly is not running, or clear some cache maybe that is lingering? I > notice if I start a different python instance, and send commands to System > Events, it correctly starts it up. > > Here is a error dump from running essentially app('System Events').run() > when it thought it was already running -- the same happens with launch, or > any other command -- appscript can't get the terminology for System Events > because it isn't running: > > File "./avjamasserver.py", line 102, in do_POST > result = self.CallFunction(request, av.activity) > File "./avjamasserver.py", line 74, in CallFunction > return function(*function_args) > File "/Users/noah/Software/RS232/avcontrol.py", line 300, in AudioMode > SafeStart(sys_events) > File "/Users/noah/Software/RS232/avcontrol.py", line 20, in SafeStart > app_instance.run() > File "build/bdist.macosx-10.5-i386/egg/appscript/reference.py", line 578, > in __getattr__ > selectortype, code = self.AS_appdata.referencebyname()[name] > File "build/bdist.macosx-10.5-i386/egg/appscript/reference.py", line 260, > in referencebyname > self.connect() > File "build/bdist.macosx-10.5-i386/egg/appscript/reference.py", line 229, > in connect > self._terms = terminology.tablesforapp(t) > File "build/bdist.macosx-10.5-i386/egg/appscript/terminology.py", line > 171, in tablesforapp > _terminologycache[aemapp.AEM_identity] = > tablesforaetes(aetesforapp(aemapp)) > File "build/bdist.macosx-10.5-i386/egg/appscript/terminology.py", line > 143, in aetesforapp > raise RuntimeError("Can't get terminology for application (%r): %s" % > (aemapp, e)) > RuntimeError: Can't get terminology for application > (aem.Application(u'/System/Library/CoreServices/System Events.app')): > Command failed: Application isn't runnin > g. (-600) > > > > _______________________________________________ > 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 hengist.podd at virgin.net Mon Mar 29 23:18:24 2010 From: hengist.podd at virgin.net (has) Date: Mon, 29 Mar 2010 22:18:24 +0100 Subject: [Pythonmac-SIG] appscript fails to notice System Events is not running In-Reply-To: References: Message-ID: <88E45C79-D419-45B3-8174-9DA9C657E31A@virgin.net> Noah Coccaro wrote: > I have a long running server that uses appscript to send keystroke commands to System Events. > It seems that System Events does not run constantly, or frequently dies. > Quite often, appscript seems to be in a state where it incorrectly thinks System Events is running, and still sends commands to it, resulting in failures. Appscript makes no assumptions as to whether an application is running or not, except for the first time you use a newly created app object. By default, that is the only time that appscript will automatically launch an application for you if it is not already running. This is different to AppleScript's behaviour but is quite deliberate: if a target application crashes halfway through your script, you generally want to know about this as any documents your script may have been working on will be lost, so there is no point in trying to manipulate them further. In some cases, the default appscript behaviour may not be what you want. In this case, you have several options: 1. Create a new app object before sending a series of commands. This is a fairly cheap option as you are only doing a search of currently running processes for the one you want. (The main cost in creating app objects is in parsing the application dictionary, and appscript caches parsed dictionaries for efficiency.) One downside is that this won't affect existing references that your script created before the application quit, but chances are these references will no longer be valid anyway so no great loss in practice. 2. Send a 'run' or 'launch' command before sending a series of commands. By default, these commands will automatically relaunch the application if necessary and update the app object to point to the current process. 3. Create an app object, then set its 'relaunchmode' property to "always". This will allow the app object to relaunch and reconnect to the target application before sending any command (i.e. equivalent to the AppleScript behaviour). See chapter 7 of the appscript manual for more information. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From kw at codebykevin.com Tue Mar 30 00:01:14 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Mon, 29 Mar 2010 18:01:14 -0400 Subject: [Pythonmac-SIG] PyQt apps on Mac Message-ID: <4BB1232A.3060401@codebykevin.com> Hi all, I'm interested in taking a look at PyQt apps on the Mac. Problem is--I can't find any that are already bundled as standalone apps. Right now I don't have the time or inclination to build PyQt from scratch to test things out...are there any PyQt developers on this list who can post links to standalone PyQt apps wrapped with py2app that run on Leopard? Thanks, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From bluemangroupie at gmail.com Tue Mar 30 00:17:17 2010 From: bluemangroupie at gmail.com (aditya bhargava) Date: Mon, 29 Mar 2010 18:17:17 -0400 Subject: [Pythonmac-SIG] PyQt apps on Mac In-Reply-To: <4BB1232A.3060401@codebykevin.com> References: <4BB1232A.3060401@codebykevin.com> Message-ID: <4d91314c1003291517n1674fde6t27d7336c178f1fee@mail.gmail.com> Are you interested in just an application, or the source too? Here's a standalone app I'd made a while back, just to test out PyQt on the mac: http://perl.wefoundland.com/SoftwareReqs.zip This was made using PyInstaller. The same application built using py2app was significantly larger (~70 mb). Aditya On Mon, Mar 29, 2010 at 6:01 PM, Kevin Walzer wrote: > Hi all, > > I'm interested in taking a look at PyQt apps on the Mac. Problem is--I > can't find any that are already bundled as standalone apps. Right now I > don't have the time or inclination to build PyQt from scratch to test things > out...are there any PyQt developers on this list who can post links to > standalone PyQt apps wrapped with py2app that run on Leopard? > > Thanks, > Kevin > -- > 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 > -- wefoundland.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hraban at fiee.net Tue Mar 30 07:47:52 2010 From: hraban at fiee.net (Henning Hraban Ramm) Date: Tue, 30 Mar 2010 07:47:52 +0200 Subject: [Pythonmac-SIG] PyQt apps on Mac In-Reply-To: <4BB1232A.3060401@codebykevin.com> References: <4BB1232A.3060401@codebykevin.com> Message-ID: Am 2010-03-30 um 00:01 schrieb Kevin Walzer: > I'm interested in taking a look at PyQt apps on the Mac. Problem is-- > I can't find any that are already bundled as standalone apps. Right > now I don't have the time or inclination to build PyQt from scratch > to test things out...are there any PyQt developers on this list who > can post links to standalone PyQt apps wrapped with py2app that run > on Leopard? Have a look at the GRAMPS project: www.gramps-project.org It's also in MacPorts Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From hraban at fiee.net Tue Mar 30 09:19:46 2010 From: hraban at fiee.net (Henning Hraban Ramm) Date: Tue, 30 Mar 2010 09:19:46 +0200 Subject: [Pythonmac-SIG] PyQt apps on Mac In-Reply-To: References: <4BB1232A.3060401@codebykevin.com> Message-ID: Am 2010-03-30 um 07:47 schrieb Henning Hraban Ramm: > Am 2010-03-30 um 00:01 schrieb Kevin Walzer: > >> I'm interested in taking a look at PyQt apps on the Mac. Problem >> is--I can't find any that are already bundled as standalone apps. >> Right now I don't have the time or inclination to build PyQt from >> scratch to test things out...are there any PyQt developers on this >> list who can post links to standalone PyQt apps wrapped with py2app >> that run on Leopard? > > Have a look at the GRAMPS project: www.gramps-project.org > It's also in MacPorts Sorry, GRAMPS is a GTK application, not QT. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From LuHe at gmx.at Tue Mar 30 12:17:53 2010 From: LuHe at gmx.at (Lukas Hetzenecker) Date: Tue, 30 Mar 2010 12:17:53 +0200 Subject: [Pythonmac-SIG] PyQt apps on Mac In-Reply-To: <4BB1232A.3060401@codebykevin.com> References: <4BB1232A.3060401@codebykevin.com> Message-ID: <201003301217.54200.LuHe@gmx.at> Hello, i recently made a standalone app of Series60-Remote [1] for Mac OS X. I used py2app, because Pyinstaller didn't work correctly [2]. You can find the build scripts here: [3] The build process is invoked with "python setup.py py2app" [1] http://series60-remote.sourceforge.net [2] http://www.mail-archive.com/pyinstaller at googlegroups.com/msg01950.html [3] http://series60-remote.svn.sf.net/viewvc/series60- remote/trunk/pc/install/osx/ Am Dienstag 30 M?rz 2010 00:01:14 schrieb Kevin Walzer: > Hi all, > > I'm interested in taking a look at PyQt apps on the Mac. Problem is--I > can't find any that are already bundled as standalone apps. Right now I > don't have the time or inclination to build PyQt from scratch to test > things out...are there any PyQt developers on this list who can post > links to standalone PyQt apps wrapped with py2app that run on Leopard? > > Thanks, > Kevin From ronaldoussoren at mac.com Tue Mar 30 15:04:29 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 30 Mar 2010 15:04:29 +0200 Subject: [Pythonmac-SIG] argv emulation with python 2.6.5 In-Reply-To: <4BADCE70.4040607@etrix.com.au> References: <4BADCE70.4040607@etrix.com.au> Message-ID: <19AD84C6-1D10-4E85-B1AA-168C5A194B72@mac.com> On 27 Mar, 2010, at 10:22, Brendan Simon (eTRIX) wrote: > I'm porting an app from python 2.5 (2.5.4) to python 2.6 (2.6.5) and > having timeout issues with argv emulation. > > Does argv emulation with with python 2.6 (2.6.5) ?? Which argv emenulation? AFAIK both bundlebuilder (included in python) and py2app (a standalone project) include something named argv emulation and both should work on 2.6. Other projects might have something simular. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From hraban at fiee.net Tue Mar 30 17:58:55 2010 From: hraban at fiee.net (Henning Hraban Ramm) Date: Tue, 30 Mar 2010 17:58:55 +0200 Subject: [Pythonmac-SIG] PyQt apps on Mac In-Reply-To: <4BB1232A.3060401@codebykevin.com> References: <4BB1232A.3060401@codebykevin.com> Message-ID: Am 2010-03-30 um 00:01 schrieb Kevin Walzer: > I'm interested in taking a look at PyQt apps on the Mac. Problem is-- > I can't find any that are already bundled as standalone apps. Right > now I don't have the time or inclination to build PyQt from scratch > to test things out...are there any PyQt developers on this list who > can post links to standalone PyQt apps wrapped with py2app that run > on Leopard? A short googling found this: http://arstechnica.com/open-source/guides/2009/03/how-to-deploying-pyqt-applications-on-windows-and-mac-os-x.ars The Eric Python IDE is built on PyQT: http://eric-ide.python-projects.org/ Here's a blog post about installing it on Leopard: http://works13.com/blog/mac/installing-eric4-on-mac-os-x-leopard.htm Opus/UrbanSim is an open source urban development system: http://urbansim.org/Download/MacPortsMacintoshInstallation Here are two tools by Marc Summerfield, author of "Rapid GUI Programming with Python and Qt": http://www.qtrac.eu I guess with a little bit of own research you'll easily find other projects. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From brendan.simon at etrix.com.au Tue Mar 30 23:42:43 2010 From: brendan.simon at etrix.com.au (Brendan Simon (eTRIX)) Date: Wed, 31 Mar 2010 08:42:43 +1100 Subject: [Pythonmac-SIG] argv emulation with python 2.6.5 In-Reply-To: <19AD84C6-1D10-4E85-B1AA-168C5A194B72@mac.com> References: <4BADCE70.4040607@etrix.com.au> <19AD84C6-1D10-4E85-B1AA-168C5A194B72@mac.com> Message-ID: <4BB27053.9010002@etrix.com.au> On 31/03/10 12:04 AM, Ronald Oussoren wrote: >> I'm porting an app from python 2.5 (2.5.4) to python 2.6 (2.6.5) and >> having timeout issues with argv emulation. >> >> Does argv emulation with with python 2.6 (2.6.5) ?? >> > Which argv emenulation? AFAIK both bundlebuilder (included in python) and py2app (a standalone project) include something named argv emulation and both should work on 2.6. Other projects might have something simular. > I'm using py2app. I have successfully used argv emulation with Python 2.5.4, however if I change the path to use Python 2.6.5 and rebuild the app, app fails the argv emulation (e.g. when issuing 'open MyApp myprotocol:abc=123') Is there something special or different that has to be done to get argv emulation working with Python 2.6 ?? The setup.py was created with python 2.5.4, maybe that's the problem ?? Thanks, Brendan. From pirat at ookami.cz Wed Mar 31 10:59:20 2010 From: pirat at ookami.cz (pirat at ookami.cz) Date: Wed, 31 Mar 2010 10:59:20 +0200 (CEST) Subject: [Pythonmac-SIG] GTK2, Snow Leopard, py2app Message-ID: Hello all, For historical reasons I have Python application for Mac with GTK gui. For Leopard GTK was build via jhbuild and everything "works" (there's a special shell script for running it which takes care of setting environmental variables). However, for Snow Leopard all my attempts failed - as soon as you start using threads, it's impossible to quit application :) So I've tried macports. They work, but I was unable to create working independent package by hand - it's still missing something from /opt/local and I've run out of ideas here. py2app creates nice package which tries to start and fails with error 255 (I think). Does anyone know about any reasonably small (not Gimp :) GTK apllication running successfully on Snow Leopard? The one created with py2app would be even better. Thank you very much, Jirka Znamenacek From mk0423 at towb.de Wed Mar 31 14:17:54 2010 From: mk0423 at towb.de (Tobias Weber) Date: Wed, 31 Mar 2010 14:17:54 +0200 Subject: [Pythonmac-SIG] GTK2, Snow Leopard, py2app In-Reply-To: References: Message-ID: <0C117D20-FE86-4298-A582-17005D974107@towb.de> On 31.03.2010, at 10:59, pirat at ookami.cz wrote: > However, for Snow Leopard all my attempts failed - as soon as you start using threads, it's impossible to quit application https://bugzilla.gnome.org/show_bug.cgi?id=613783 (was the same on 10.5) From pirat at ookami.cz Wed Mar 31 15:57:01 2010 From: pirat at ookami.cz (pirat at ookami.cz) Date: Wed, 31 Mar 2010 15:57:01 +0200 (CEST) Subject: [Pythonmac-SIG] GTK2, Snow Leopard, py2app In-Reply-To: <0C117D20-FE86-4298-A582-17005D974107@towb.de> References: <0C117D20-FE86-4298-A582-17005D974107@towb.de> Message-ID: > https://bugzilla.gnome.org/show_bug.cgi?id=613783 Thank you, I'll give it a shot and will report back! JZ