From coolcucumber at gmail.com Mon Sep 1 00:06:55 2008 From: coolcucumber at gmail.com (John Porter Simons) Date: Sun, 31 Aug 2008 15:06:55 -0700 Subject: [Pythonmac-SIG] Rocketship in the Dock In-Reply-To: <48BA9153.5080402@wheel.org> References: <678ff0e00808302002ra6c4c93xe6b2bf3b1355f628@mail.gmail.com> <48BA9153.5080402@wheel.org> Message-ID: <678ff0e00808311506h609bef7arf144fb81909b1b8e@mail.gmail.com> Man I tried everything. This didn't help, nor did a more aggressive statement to let www run anything with no password prompt: www ALL=(ALL) NOPASSWD: ALL Finally I tried just editing my httpd.conf to run Apache as my local logged in user, bad practice I know but now the appscript works from a web script. And I can keep developing like this until I figure out a better solution. On Sun, Aug 31, 2008 at 5:40 AM, tom wible wrote: > Apache/mod_python, it hangs. Probably because Apache doesn't run as a >> normal user so it can't get a GUI context. This is a bummer, I was able >> > > i solved that problem by modding the sudoers file: > > Cmnd_Alias DVR_cmds=/usr/bin/osascript, /DVR/webAccess/scripts/*.sh > www ALL=(DVR_ra) NOPASSWD: DVR_cmds > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joelosco at frontiernet.net Mon Sep 1 14:36:04 2008 From: joelosco at frontiernet.net (Joseph W. Losco) Date: Mon, 1 Sep 2008 08:36:04 -0400 Subject: [Pythonmac-SIG] Py2App and Appscript / wxPython In-Reply-To: <4A5DDCCC-AA71-4EBA-A5F6-F8505736037C@frontiernet.net> References: <4A5DDCCC-AA71-4EBA-A5F6-F8505736037C@frontiernet.net> Message-ID: <25FEA4ED-76FB-41F8-B327-D9B6B41CEC61@frontiernet.net> So I did a little more work and removed all of the py2app / dependancies (macholib and modulegraph) and appscript from my site- packages folder and from the easy_install.pth file. Then I did an easy_install of macholib==dev, modulegraph==dev, and py2app==dev and then downloaded the source of appscrip and did python setup.py develop and somehow it worked.. I must have done things out of the wrong order or had something messed up with the easy_install.pth file or something. Just to follow up and let people know. Joe Losco On Aug 30, 2008, at 1:33 PM, Joseph W. Losco wrote: > Hey all, > I have an app that I've been trying to compile / bundle with py2app > for a little while now. I have been having some trouble and I did a > little research online and learned that py2app can't bundle egg > files, except I thought I saw somewhere that the SVN version can.. > So I've tried with easy_install py2app==dev with its dependancy > modulegraph==dev. I also tried downloading the uncompiled source of > appscript (which I'm not sure if i did properly, but i did a python > setup.py develop so that it would not compile to an egg. > > The error I'm getting is listed below as well as my setup.py > (with minor error differences that I can tell from the versions of > py2app and appscript) > > Any help would be greatly appreciated. > > Joe Losco > > > Error after running python setup.py py2app > > running py2app > Traceback (most recent call last): > File "/Users/josephlosco/Library/Python/2.5/site-packages/ > py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 579, in _run > self.run_normal() > File "/Users/josephlosco/Library/Python/2.5/site-packages/ > py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 631, in run_normal > mf = self.get_modulefinder() > File "/Users/josephlosco/Library/Python/2.5/site-packages/ > py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 539, in > get_modulefinder > debug=debug, > File "build/bdist.macosx-10.3-i386/egg/modulegraph/ > find_modules.py", line 255, in find_modules > find_needed_modules(mf, scripts, includes, packages) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/ > find_modules.py", line 190, in find_needed_modules > path = m.packagepath[0] > TypeError: 'NoneType' object is unsubscriptable > > /Users/josephlosco/Code/hg/CalendarSyncGUI/build/bdist.macosx-10.3- > i386/egg/modulegraph/find_modules.py(190)find_needed_modules() > > > > My setup.py file is as follows. > > #!/usr/bin/env python > """ > setup.py - script for building CalendarSync > > Usage: > % python setup.py py2app > """ > from distutils.core import setup > import py2app > from plistlib import Plist > import os > > name = 'CalendarSync' > version = '1.0.0' > > # Build the .app file > setup( > app=[ name + '.py' ], > options=dict( > py2app=dict( > iconfile='CalendarSync.icns', > packages=['wx','appscript'], > site_packages=True, > resources=['resources/COPYING','CalendarSync.icns'], > plist=dict( > CFBundleName = "CalendarSync", > CFBundleShortVersionString = "1.0.0", # must be > in X.X.X format > CFBundleGetInfoString = "CalendarSync 1.0.0", > CFBundleExecutable = "CalendarSync", > ), > ), > ), > > ) > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From hengist.podd at virgin.net Tue Sep 2 22:51:33 2008 From: hengist.podd at virgin.net (has) Date: Tue, 2 Sep 2008 21:51:33 +0100 Subject: [Pythonmac-SIG] Rocketship in the Dock In-Reply-To: References: Message-ID: John Porter Simons wrote: > I can run appscript from an interactive session and just ignore the > rocketship in the dock, but when I run the same script from a Apache/ > mod_python, it hangs. Probably because Apache doesn't run as a > normal user so it can't get a GUI context. This is a bummer, I was > able to use rb-appscript from a web script, I wish I could use py- > appscript... You're correct that Apache normally runs under a restricted user which can't access the GUI. I'm assuming you were running your Ruby script as a regular user; perhaps you could use the same approach for your Python script? Another option might be to use remote Apple events to communicate with GUI apps running under a regular user. A third possibility would be to run Apache as a regular user. The relevant security caveats and cautions apply to all approaches, of course. BTW, the Dock icon is a red herring here. Both appscript implementations uses the same Process Manager calls. However, the Process Manager only 'helpfully' upgrades processes launched from an .app bundle, and while the Python interpreter is packaged as an .app bundle, the Ruby interpreter is just a regular Unix-style executable. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From hengist.podd at virgin.net Tue Sep 2 22:51:39 2008 From: hengist.podd at virgin.net (has) Date: Tue, 2 Sep 2008 21:51:39 +0100 Subject: [Pythonmac-SIG] Making setuptools compile for x86_64 In-Reply-To: References: Message-ID: John Porter Simons wrote: > Any way to inform setuptools that I also need "x86_64" architecture? > I also ran into this problem while installing mod_python, dinked > around with the makefile flags but gave up until I discovered that > the latest subversion trunk has the correct flags for 64-bit. See: http://developer.apple.com/releasenotes/OpenSource/PerlExtensionsRelNotes/ (Applies to Python, etc. as well as Perl.) To build 64-bit py-appscript you'll need to use the current trunk from svn. (I really should push out a proper file release sometime.) HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From cjs980 at uow.edu.au Wed Sep 3 06:41:30 2008 From: cjs980 at uow.edu.au (Chris Stevens) Date: Wed, 3 Sep 2008 14:41:30 +1000 Subject: [Pythonmac-SIG] Using Appscript in my application, how to include it in the bundle? Message-ID: Hi all, Sorry if this has been previously addressed. I am writing an application in PyObjC and need to control various windows (some system commands and Keynote most notably, to export slides as individual images) using Applescript. I have had great difficulties using the scripting bridge to do this, as there seems to be zero documentation (i figured out how to control some itunes elements, but that was it). Then I found Appscript, and it makes it all so easy. My question is, I had to install Appscript from the source to get it working on this Mac. What will someone using my application have to do? Will they have to install Appscript seperatly? Will I have to include it in the installation package somehow? Thankyou very much for any suggestions, Chris. From joelosco at frontiernet.net Wed Sep 3 13:58:03 2008 From: joelosco at frontiernet.net (Joseph W. Losco) Date: Wed, 3 Sep 2008 07:58:03 -0400 Subject: [Pythonmac-SIG] Using Appscript in my application, how to include it in the bundle? In-Reply-To: References: Message-ID: <6793ED00-B8F3-440A-8F84-A1DEB107E0D4@frontiernet.net> Hello Chris, I just did the same thing however with only a pure python program with py2app, however I expect the process to be the same or similar at least. With this it was a single enclosed app with no additional installs. What i did to make it work was the following. 1) I removed all of the appscript eggs and references from easy_install.pth if you installed it by easy_install. 2) I did an easy_install appscript==dev to get the sources instead of the egg.. 3) for me I had to also get the sources of py2app==dev and its 2 dependancies macholib==dev and modulegraph==dev Hope the helps some. Joe Losco On Sep 3, 2008, at 12:41 AM, Chris Stevens wrote: > Hi all, > > Sorry if this has been previously addressed. I am writing an > application in PyObjC and need to control various windows (some system > commands and Keynote most notably, to export slides as individual > images) using Applescript. I have had great difficulties using the > scripting bridge to do this, as there seems to be zero documentation > (i figured out how to control some itunes elements, but that was it). > Then I found Appscript, and it makes it all so easy. > > My question is, I had to install Appscript from the source to get it > working on this Mac. What will someone using my application have to > do? Will they have to install Appscript seperatly? Will I have to > include it in the installation package somehow? > > Thankyou very much for any suggestions, > Chris. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From coolcucumber at gmail.com Wed Sep 3 18:37:38 2008 From: coolcucumber at gmail.com (John Porter Simons) Date: Wed, 3 Sep 2008 09:37:38 -0700 Subject: [Pythonmac-SIG] Rocketship in the Dock Message-ID: <678ff0e00809030937l79cef7c0gba37faef305ea1ec@mail.gmail.com> Thanks for the info on py-appscript, I think there's no real harm to running Apache as myself. I'm doing some pretty cool stuff with python -- I'm using Django and Orbited together in the same mod_python instance, with Orbited not as a proxy like people usually do. I'm getting it so my Django code can send out messages to Orbited by direct call rather than across a socket. Of course to do this requires a single instance, so I put Apache in worker MPM with a single process. Supposedly not recommended but I haven't had any problems so far. On Wed, Sep 3, 2008 at 3:00 AM, wrote: > Send Pythonmac-SIG mailing list submissions to > pythonmac-sig at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/pythonmac-sig > or, via email, send a message with subject or body 'help' to > pythonmac-sig-request at python.org > > You can reach the person managing the list at > pythonmac-sig-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Pythonmac-SIG digest..." > > Today's Topics: > > 1. Re: Rocketship in the Dock (has) > 2. Re: Making setuptools compile for x86_64 (has) > 3. Using Appscript in my application, how to include it in the > bundle? (Chris Stevens) > > > ---------- Forwarded message ---------- > From: has > To: pythonmac-sig at python.org > Date: Tue, 2 Sep 2008 21:51:33 +0100 > Subject: Re: [Pythonmac-SIG] Rocketship in the Dock > John Porter Simons wrote: > > I can run appscript from an interactive session and just ignore the >> rocketship in the dock, but when I run the same script from a >> Apache/mod_python, it hangs. Probably because Apache doesn't run as a normal >> user so it can't get a GUI context. This is a bummer, I was able to use >> rb-appscript from a web script, I wish I could use py-appscript... >> > > > You're correct that Apache normally runs under a restricted user which > can't access the GUI. I'm assuming you were running your Ruby script as a > regular user; perhaps you could use the same approach for your Python > script? Another option might be to use remote Apple events to communicate > with GUI apps running under a regular user. A third possibility would be to > run Apache as a regular user. The relevant security caveats and cautions > apply to all approaches, of course. > > BTW, the Dock icon is a red herring here. Both appscript implementations > uses the same Process Manager calls. However, the Process Manager only > 'helpfully' upgrades processes launched from an .app bundle, and while the > Python interpreter is packaged as an .app bundle, the Ruby interpreter is > just a regular Unix-style executable. > > HTH > > has > -- > Control AppleScriptable applications from Python, Ruby and ObjC: > http://appscript.sourceforge.net > > > > > ---------- Forwarded message ---------- > From: has > To: pythonmac-sig at python.org > Date: Tue, 2 Sep 2008 21:51:39 +0100 > Subject: Re: [Pythonmac-SIG] Making setuptools compile for x86_64 > John Porter Simons wrote: > > Any way to inform setuptools that I also need "x86_64" architecture? I >> also ran into this problem while installing mod_python, dinked around with >> the makefile flags but gave up until I discovered that the latest subversion >> trunk has the correct flags for 64-bit. >> > > See: > > > http://developer.apple.com/releasenotes/OpenSource/PerlExtensionsRelNotes/ > > (Applies to Python, etc. as well as Perl.) > > To build 64-bit py-appscript you'll need to use the current trunk from svn. > (I really should push out a proper file release sometime.) > > HTH > > has > -- > Control AppleScriptable applications from Python, Ruby and ObjC: > http://appscript.sourceforge.net > > > > > ---------- Forwarded message ---------- > From: "Chris Stevens" > To: pythonmac-sig at python.org > Date: Wed, 3 Sep 2008 14:41:30 +1000 > Subject: [Pythonmac-SIG] Using Appscript in my application, how to include > it in the bundle? > Hi all, > > Sorry if this has been previously addressed. I am writing an > application in PyObjC and need to control various windows (some system > commands and Keynote most notably, to export slides as individual > images) using Applescript. I have had great difficulties using the > scripting bridge to do this, as there seems to be zero documentation > (i figured out how to control some itunes elements, but that was it). > Then I found Appscript, and it makes it all so easy. > > My question is, I had to install Appscript from the source to get it > working on this Mac. What will someone using my application have to > do? Will they have to install Appscript seperatly? Will I have to > include it in the installation package somehow? > > Thankyou very much for any suggestions, > Chris. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From janssen at parc.com Wed Sep 3 19:22:52 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 3 Sep 2008 10:22:52 PDT Subject: [Pythonmac-SIG] Creating Application() In-Reply-To: References: <19133860.post@talk.nabble.com> <3CD63ABF-4357-4786-8FF9-00A25999F731@cwi.nl> <604D2671-52BA-44F0-85F6-C8FB7F021C8F@fiee.net> Message-ID: <08Sep3.102301pdt."58698"@synergy1.parc.xerox.com> > can anyone recommend some tutorials for Cocoa ObjectiveC? An excellent book, COCOA PROGRAMMING FOR MAC OS X, THIRD EDITION, by Aaron Hillegass. Go through the first four chapters and you'll be set. (The rest of the book is about Cocoa and Interface Builder). Bill From skip at pobox.com Fri Sep 5 04:04:03 2008 From: skip at pobox.com (skip at pobox.com) Date: Thu, 4 Sep 2008 21:04:03 -0500 Subject: [Pythonmac-SIG] How to record audio from Python? Message-ID: <18624.37779.984445.384014@montanaro-dyndns-org.local> Can I easily control audio record/playback from Python on my Mac? I know zip about audio recording or about Apple APIs via Python. Pointers to simple examples would be much appreciated. Thanks, Skip From nathan.stocks at gmail.com Mon Sep 8 05:45:04 2008 From: nathan.stocks at gmail.com (Nathan) Date: Sun, 7 Sep 2008 21:45:04 -0600 Subject: [Pythonmac-SIG] py2app and modulegraph>=0.7.2dev ? Message-ID: <96c9d6a80809072045o1b7fe581xb24ea7b647b9bc76@mail.gmail.com> I haven't used py2app for a long time, and never successfully on my current computer. - I'm on OS X Leopard 10.5.4 - Earlier this year I tried installing/using py2app with the system python, which sorta worked, but only on my machine and definitely not on Tiger... - I just installed Python 2.5.2 from python.org, which is what I'm trying to install py2app to use with now and here's what I'm running into: $ sudo /Library/Frameworks/Python.framework/Versions/Current/bin/easy_install py2app Searching for py2app Best match: py2app 0.4.2 Processing py2app-0.4.2-py2.5.egg py2app 0.4.2 is already the active version in easy-install.pth Installing py2applet script to /Library/Frameworks/Python.framework/Versions/2.5/bin Using /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg Processing dependencies for py2app Searching for modulegraph>=0.7.2dev Reading http://pypi.python.org/simple/modulegraph/ Reading http://undefined.org/python/#modulegraph No local packages or download links found for modulegraph>=0.7.2dev error: Could not find suitable distribution for Requirement.parse('modulegraph>=0.7.2dev') $ echo $PATH /Library/Frameworks/Python.framework/Versions/Current/bin/:/usr/local/bin $ echo $PYTHONPATH /Library/Python/2.5/site-packages I can't find any "modulegraph" on the web except a 0.7 and a 0.7.1 version. What am I missing? I'm just trying to package up a 1-file python script as an App that will work on Tiger... ~ Nathan From joelosco at frontiernet.net Mon Sep 8 16:03:35 2008 From: joelosco at frontiernet.net (Joe Losco) Date: Mon, 8 Sep 2008 10:03:35 -0400 Subject: [Pythonmac-SIG] py2app and modulegraph>=0.7.2dev ? In-Reply-To: <96c9d6a80809072045o1b7fe581xb24ea7b647b9bc76@mail.gmail.com> References: <96c9d6a80809072045o1b7fe581xb24ea7b647b9bc76@mail.gmail.com> Message-ID: <4CC54803-2A61-4A82-9898-056C1E1D8868@frontiernet.net> Do easy_install modulegraph==dev, however I also has a few issues with other things and had to easy_install macholib==dev and py2app==dev also to make everything I was doing work.. YMMV That should take care of it. Best of luck, Joe Losco On Sep 7, 2008, at 11:45 PM, Nathan wrote: > I haven't used py2app for a long time, and never successfully on my > current computer. > > - I'm on OS X Leopard 10.5.4 > - Earlier this year I tried installing/using py2app with the system > python, which sorta worked, but only on my machine and definitely not > on Tiger... > - I just installed Python 2.5.2 from python.org, which is what I'm > trying to install py2app to use with now > > and here's what I'm running into: > > $ sudo /Library/Frameworks/Python.framework/Versions/Current/bin/ > easy_install > py2app > Searching for py2app > Best match: py2app 0.4.2 > Processing py2app-0.4.2-py2.5.egg > py2app 0.4.2 is already the active version in easy-install.pth > Installing py2applet script to > /Library/Frameworks/Python.framework/Versions/2.5/bin > > Using /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.4.2-py2.5.egg > Processing dependencies for py2app > Searching for modulegraph>=0.7.2dev > Reading http://pypi.python.org/simple/modulegraph/ > Reading http://undefined.org/python/#modulegraph > No local packages or download links found for modulegraph>=0.7.2dev > error: Could not find suitable distribution for > Requirement.parse('modulegraph>=0.7.2dev') > > $ echo $PATH > /Library/Frameworks/Python.framework/Versions/Current/bin/:/usr/ > local/bin > > $ echo $PYTHONPATH > /Library/Python/2.5/site-packages > > I can't find any "modulegraph" on the web except a 0.7 and a 0.7.1 > version. What am I missing? I'm just trying to package up a 1-file > python script as an App that will work on Tiger... > > ~ Nathan > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From davidmorley at luckmor.com Tue Sep 9 11:06:57 2008 From: davidmorley at luckmor.com (David Morley) Date: Tue, 9 Sep 2008 19:06:57 +1000 Subject: [Pythonmac-SIG] using py-appscript Message-ID: I can use (Python) appscript reasonably well, if I know exactly what "components" I am looking for, e.g., app('TextEdit').documents['Read Me'].paragraphs[1].get() But if I'm faced with a new application I don't know where to start. Is there any way to interactively explore what is available? Something like dir(app('TextEdit')) -> [..., "documents", ...] to let me know that the app has document components app('TextEdit').documents.keys() -> [..., "Read Me", ...] to let me know that "Read Me" is one of the documents and so on. - David From santagada at gmail.com Wed Sep 10 15:15:46 2008 From: santagada at gmail.com (Leonardo Santagada) Date: Wed, 10 Sep 2008 10:15:46 -0300 Subject: [Pythonmac-SIG] using py-appscript In-Reply-To: References: Message-ID: On Sep 9, 2008, at 6:06 AM, David Morley wrote: > I can use (Python) appscript reasonably well, if I know exactly what > "components" I am looking for, e.g., > > app('TextEdit').documents['Read Me'].paragraphs[1].get() > > But if I'm faced with a new application I don't know where to start. > Is there any way to interactively explore what is available? Something > like > dir(app('TextEdit')) -> [..., "documents", ...] > to let me know that the app has document components > app('TextEdit').documents.keys() -> [..., "Read Me", ...] > to let me know that "Read Me" is one of the documents > and so on. http://osx.iusethis.com/app/prefabuibrowser this seems to do that. From rowen at u.washington.edu Thu Sep 11 01:39:38 2008 From: rowen at u.washington.edu (Russell E. Owen) Date: Wed, 10 Sep 2008 16:39:38 -0700 Subject: [Pythonmac-SIG] Please help! py2app broken Message-ID: I was able to run py2app fine until recently. I think the only thing I did was upgrade to svn 1.5.1. Now I see this: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 548, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 600, in run_normal mf = self.get_modulefinder() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 508, in get_modulefinder debug=debug, File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 243, in find_modules find_needed_modules(mf, scripts, includes, packages) File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 179, in find_needed_modules path = m.packagepath[0] TypeError: 'NoneType' object is unsubscriptable > /Users/rowen/TUIRoot/BuildForMac/build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py(179)find_needed_modules() This is using MacOS X 10.4.11 python 2.5.2 (the python.org distro) setuptools 0.6c8 (installed via easy_install) py2app 0.3.6 (installed via easy_install) The file in which the error occurs: build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py does not seem to actually exist, so I'm not sure where to start on debugging. I am desperate because I cannot distribute my application. -- Russell From Chris.Barker at noaa.gov Thu Sep 11 02:01:07 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 10 Sep 2008 17:01:07 -0700 Subject: [Pythonmac-SIG] Please help! py2app broken In-Reply-To: References: Message-ID: <48C85FC3.6000401@noaa.gov> Russell E. Owen wrote: > I was able to run py2app fine until recently. I think the only thing I > did was upgrade to svn 1.5.1. Now I see this: Russell, this is a total WAG, but I know that setuptools has an incompatibility with svn 1.5 -- it tries to parse the .svn files, and crashes out. It as been fixed in the development version, but the fix has not made it into a release. You might try upgrading setuptools to the dev version. See this blog post: http://mrtopf.de/blog/plone/using-subversion-15-with-setuptools-in-python-technical/ it's worth a try! -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 JKelly at nemetschek.net Thu Sep 11 17:25:49 2008 From: JKelly at nemetschek.net (James Kelly) Date: Thu, 11 Sep 2008 11:25:49 -0400 Subject: [Pythonmac-SIG] Please help! py2app broken In-Reply-To: <48C85FC3.6000401@noaa.gov> Message-ID: Alternatively you can also use svn 1.4.4. Jim On 9/10/08 8:01 PM, "Christopher Barker" wrote: > Russell E. Owen wrote: >> I was able to run py2app fine until recently. I think the only thing I >> did was upgrade to svn 1.5.1. Now I see this: > > Russell, > > this is a total WAG, but I know that setuptools has an incompatibility > with svn 1.5 -- it tries to parse the .svn files, and crashes out. It as > been fixed in the development version, but the fix has not made it into > a release. You might try upgrading setuptools to the dev version. See > this blog post: > > http://mrtopf.de/blog/plone/using-subversion-15-with-setuptools-in-python-tech > nical/ > > it's worth a try! > > -Chris > > From hengist.podd at virgin.net Thu Sep 11 14:32:28 2008 From: hengist.podd at virgin.net (has) Date: Thu, 11 Sep 2008 13:32:28 +0100 Subject: [Pythonmac-SIG] using py-appscript Message-ID: <24187589-6C9C-4DA7-AC72-706772B51608@virgin.net> David Morley wrote: > I can use (Python) appscript reasonably well, if I know exactly what > "components" I am looking for, e.g., > > app('TextEdit').documents['Read Me'].paragraphs[1].get() > > But if I'm faced with a new application I don't know where to start. > Is there any way to interactively explore what is available? Something > like > dir(app('TextEdit')) -> [..., "documents", ...] > to let me know that the app has document components > app('TextEdit').documents.keys() -> [..., "Read Me", ...] > to let me know that "Read Me" is one of the documents > and so on. Appscript is basically an RPC+query-driven IPC mechanism with a bunch of vaguely OO-like syntactic sugar on top to make it look nice. Because it deals in queries, not proxy objects (a la COM, CORBA, etc.) and relies heavily on Python's so-called "magic methods" to do its thing, it doesn't play very well with standard Python introspection and documentation tools such as dir() and help(). Instead it provides its own fairly powerful set of tools: 1. ASDictionary exports appscript-style application dictionaries in HTML format 2. ASTranslate converts application commands from AppleScript to appscript syntax 3. Appscript's built-in help method [1] allows you to explore an application's dictionary and object model interactively, e.g.: te = app('TextEdit') te.help() # show terminology for referenced object (in this case TextEdit's 'application' class) te.documents.name.help('-s') # show values of all document objects' name properties And don't forget that you can retrieve referenced values via the get() command, e.g.: te.documents.name.get() # Tip: this can also be written as te.documents.name() BTW, if you haven't done so already, I recommend reading the appscript manual (available on the appscript site or in the .tar.gz file release) to get an idea of how appscript and Apple event IPC in general works. (If it's not clear, drop us a note and I'll try to improve it.) The manual includes a chapter on the available help options and how to use them. HTH has [1] Requires ASDictionary to be installed first. -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From Chris.Barker at noaa.gov Thu Sep 11 20:16:55 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 11 Sep 2008 11:16:55 -0700 Subject: [Pythonmac-SIG] Please help! py2app broken In-Reply-To: References: Message-ID: <48C96097.3020307@noaa.gov> James Kelly wrote: > Alternatively you can also use svn 1.4.4. Yes, you can, and if had to do it all over again, I would not upgrade just yet. However, when you use an SVN1.5 client, it res-structures your local sandbox(s), so you can't just go back and use the old client again. You can start again with a new checkout, or, I think there are tools for reversing the conversion, but it all requires work. -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 negativesum at gmail.com Thu Sep 11 21:33:21 2008 From: negativesum at gmail.com (David Hostetler) Date: Thu, 11 Sep 2008 15:33:21 -0400 Subject: [Pythonmac-SIG] Please help! py2app broken In-Reply-To: References: <48C85FC3.6000401@noaa.gov> Message-ID: <687a7c670809111233t48b05459vf1f747cbf71aec27@mail.gmail.com> On Thu, Sep 11, 2008 at 11:25 AM, James Kelly wrote: > Alternatively you can also use svn 1.4.4. That's not always a palatable option -- subversion tends to fall into the category of 'system package' and it can be cumbersome to swim against the tide of a package update, as you may break some system dependencies for the sake of avoiding others. svn 1.5.1 went 'stable' on some distros recently, so this isn't a problem that's going to go away. And just going back to 1.4.4 for your mac doesn't necessarily dodge the problem, as you may be running setuptools on a mounted drive that has 1.5.1 .svn crumbs in it (or vice versa). It's generally a good idea to keep svn versions in sync across your various development environments anyway (or always do svn actions on one env, even if you mount the directory on several). This is all probably moot soon, as I don't expect the setuptools guys to allow the problem to persist at large. But yeah, in a pinch and disregarding the other stuff, he could roll back to 1.4.4. -David -------------- next part -------------- An HTML attachment was scrubbed... URL: From rowen at u.washington.edu Thu Sep 11 22:16:09 2008 From: rowen at u.washington.edu (Russell E. Owen) Date: Thu, 11 Sep 2008 13:16:09 -0700 Subject: [Pythonmac-SIG] modulegraph bug Message-ID: modulegraph 0.7.2.dev_r21-py2.5 has the following bug (which may be in other versions as well) which causes this error: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 579, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 631, in run_normal mf = self.get_modulefinder() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 539, in get_modulefinder debug=debug, File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 255, in find_modules find_needed_modules(mf, scripts, includes, packages) File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 190, in find_needed_modules path = m.packagepath[0] TypeError: 'NoneType' object is unsubscriptable in modulegraph.py find_needed_modules at line 189: if m is not None: path = m.packagepath[0] in this case m is not None, but m.packagepath is None, which causes the crash. I don't know if the bug is that m.packagepath is None, or that this is not being properly handled. What triggered this bug was that a required package was missing. (I had unzipped my matplotlib egg, but forgot to add a .pth file). -- Russell From Chris.Barker at noaa.gov Thu Sep 11 22:39:48 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 11 Sep 2008 13:39:48 -0700 Subject: [Pythonmac-SIG] Please help! py2app broken In-Reply-To: <687a7c670809111233t48b05459vf1f747cbf71aec27@mail.gmail.com> References: <48C85FC3.6000401@noaa.gov> <687a7c670809111233t48b05459vf1f747cbf71aec27@mail.gmail.com> Message-ID: <48C98214.7040600@noaa.gov> David Hostetler wrote: > This is all probably moot soon, as I don't expect the setuptools guys to > allow the problem to persist at large. Well, I don't know their release plans, but this bug has been out there, and patches offered, for quite a few months without a new release. oh well, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From rowen at u.washington.edu Thu Sep 11 22:45:06 2008 From: rowen at u.washington.edu (Russell E. Owen) Date: Thu, 11 Sep 2008 13:45:06 -0700 Subject: [Pythonmac-SIG] Please help! py2app broken: solved References: <48C85FC3.6000401@noaa.gov> Message-ID: I fixed easy_install, changing the line that uses log (and causes a crash) to a print statement (so that easy_install would work). I then installed: easy_install setuptools==dev06 easy_install py2app==dev this complained about not being able to find modulegraph, so... easy_install modulegraph==dev I then worked around a bug in modulegraph that is described in another posting. This exposed the fact that I was missing a package (actually a .pth file). Fixing that produced: File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 178, in load raise ValueError("Unknown load command: %d" % (cmd_load.cmd,)) ValueError: Unknown load command: 27 > /Users/rowen/TUIRoot/BuildForMac/build/bdist.macosx-10.3-fat/egg/macholib/MachO.py(178)load() I fixed this by: easy_install macholib==dev And now everything is working. Thank you all for your help and advice. I'm relieved to be able to stick with svn 1.5, since I make heavy use of svn. -- Russell In article <48C85FC3.6000401 at noaa.gov>, Christopher Barker wrote: > Russell E. Owen wrote: > > I was able to run py2app fine until recently. I think the only thing I > > did was upgrade to svn 1.5.1. Now I see this: > > Russell, > > this is a total WAG, but I know that setuptools has an incompatibility > with svn 1.5 -- it tries to parse the .svn files, and crashes out. It as > been fixed in the development version, but the fix has not made it into > a release. You might try upgrading setuptools to the dev version. See > this blog post: > > http://mrtopf.de/blog/plone/using-subversion-15-with-setuptools-in-python-tech > nical/ > > it's worth a try! > > -Chris From rowen at u.washington.edu Fri Sep 12 00:11:57 2008 From: rowen at u.washington.edu (Russell E. Owen) Date: Thu, 11 Sep 2008 15:11:57 -0700 Subject: [Pythonmac-SIG] BBEdit 9 Message-ID: BBEdit 9.0 is out and it is a significant update. At risk of sounding like an advertisement, changes that I particularly appreciate are: - The Find/Replace is finally modal (though there is a preference to make it modal if you prefer). It has a cleaner design and the checkboxes all work independently now, which makes "find in selection" usable. The old Find/Replace dialog was a show-stopper for me; it is the reason I avoided BBEdit for years. - An excellent implementation of Project Files. If you add a directory to a Project then it is a live view of the disk, which is just what I want (especially when working with svn repositories and such). You can add individual files and other things as well, but I've not done any of that yet. - The various views of a file can all edited (and of course they stay synchronized). Formerly views such as Find All window were read-only. Of course there are many other fine Mac editors and everybody's taste is different. But if you are looking for an editor then BBEdit 9 is definitely worth a look. -- Russell From mdcrawford at gmail.com Fri Sep 12 00:24:18 2008 From: mdcrawford at gmail.com (Michael Crawford) Date: Thu, 11 Sep 2008 15:24:18 -0700 Subject: [Pythonmac-SIG] BBEdit 9 In-Reply-To: References: Message-ID: On Thu, Sep 11, 2008 at 3:11 PM, Russell E. Owen wrote: > BBEdit 9.0 is out and it is a significant update. ... > Of course there are many other fine Mac editors and everybody's taste is > different. But if you are looking for an editor then BBEdit 9 is > definitely worth a look. I used BBEdit version 3 or 4 back in The Bronze Age. It was quite a powerful editor even then. Bare Bones Software has always been a fine, upstanding member of the Macintosh community, so I don't hesitate in recommending their products. I'd really love to purchase 9.0, but my poor ability to estimate software jobs back when I was a consultant means I won't be able to afford it for quite some time. For now I use TextWrangler, a simpler - but still quite featureful - editor that's available for free download from Bare Bones' website: http://www.barebones.com/products/textwrangler/ I work with hand-coded XHTML/CSS web site extensively, and TextWrangler is the cat's meow for such an application. Mike -- Michael David Crawford mdcrawford at gmail dot com Enjoy my art, photography, music and writing at http://www.geometricvisions.com/ --- Free Compact Disc --- From rowen at u.washington.edu Fri Sep 12 22:09:13 2008 From: rowen at u.washington.edu (Russell E. Owen) Date: Fri, 12 Sep 2008 13:09:13 -0700 Subject: [Pythonmac-SIG] BBEdit 9 References: Message-ID: In article , "Michael Crawford" wrote: > On Thu, Sep 11, 2008 at 3:11 PM, Russell E. Owen > wrote: > > BBEdit 9.0 is out and it is a significant update. > ... > > Of course there are many other fine Mac editors and everybody's taste is > > different. But if you are looking for an editor then BBEdit 9 is > > definitely worth a look. > > I used BBEdit version 3 or 4 back in The Bronze Age. It was quite a > powerful editor even then. Bare Bones Software has always been a > fine, upstanding member of the Macintosh community, so I don't > hesitate in recommending their products. > > I'd really love to purchase 9.0, but my poor ability to estimate > software jobs back when I was a consultant means I won't be able to > afford it for quite some time. For now I use TextWrangler, a simpler > - but still quite featureful - editor that's available for free > download from Bare Bones' website: > > http://www.barebones.com/products/textwrangler/ > > I work with hand-coded XHTML/CSS web site extensively, and > TextWrangler is the cat's meow for such an application. > > Mike Note that (from the BareBones web site): "All registered owners of BBEdit version 2.5 and later are eligible to upgrade to BBEdit 9.0. Upgrade pricing is as follows: US$30 (plus shipping and handling if applicable) for owners of BBEdit 2.5 thru 8.7.2." TextWrangler is a fine editor, but has the old modal find/dialog box. I really hope BareBones will update it. -- Russell From airdrummer at wheel.org Sun Sep 14 20:00:58 2008 From: airdrummer at wheel.org (tom wible) Date: Sun, 14 Sep 2008 14:00:58 -0400 Subject: [Pythonmac-SIG] toxic appscript/python? In-Reply-To: <48CD4E25.9000108@wheel.org> References: <48CBD990.5060104@wheel.org> <48CD4E25.9000108@wheel.org> Message-ID: <48CD515A.10402@wheel.org> i have a cgi called from a webpage that seems to break my webserver's file access: an empty file fails: 2008-09-14 11:14:33: (mod_cgi.c.998) CGI failed: Exec format error /DVR/webAccess/cgi-bin/editrecitem.sh but this python/appscript makes itself invisible to my server(lighttpd): 2008-09-14 13:22:29: (mod_cgi.c.998) CGI failed: No such file or directory /DVR/webAccess/cgi-bin/editrecitem.sh a simple #!/usr/local/bin/python; print "hello, world!" works as expected... weird... From weddingmusic at partybombe.de Mon Sep 15 16:36:07 2008 From: weddingmusic at partybombe.de (weddingmusic at partybombe.de) Date: Mon, 15 Sep 2008 16:36:07 +0200 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? Message-ID: <20080915143607.235240@gmx.net> Hallo folks, i'm quite new to python at all, but never the less i want to develope a standalone application which makes some use of the module mechanize. right now the only source code of myApp.py is: [code] import mechanize [/code] running this in a python shell works fine. now i build a standalone application from that in a X11 shell: /usr/local/bin/python setup.py py2app setup.py looks like this: [code] from setuptools import setup APP = ['myApp.py'] DATA_FILES = [] OPTIONS = {'argv_emulation': True} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) [/code] and here is where problems start: lauching the application results in an error: ImportError: No module named mechanize could anybody please give me some hint, how i can make that module available for my tiny application? thanks all axel -- GMX Kostenlose Spiele: Einfach online spielen und Spa? haben mit Pastry Passion! http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196 From joelosco at frontiernet.net Mon Sep 15 17:36:45 2008 From: joelosco at frontiernet.net (Joe Losco) Date: Mon, 15 Sep 2008 11:36:45 -0400 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? In-Reply-To: <20080915143607.235240@gmx.net> References: <20080915143607.235240@gmx.net> Message-ID: <8D12B554-3635-42A0-9A3A-50F53D127403@frontiernet.net> On Sep 15, 2008, at 10:36 AM, weddingmusic at partybombe.de wrote: > > setup.py looks like this: > [code] > from setuptools import setup > > APP = ['myApp.py'] > DATA_FILES = [] > OPTIONS = {'argv_emulation': True} > > setup( > app=APP, > data_files=DATA_FILES, > options={'py2app': OPTIONS}, > setup_requires=['py2app'], > ) > [/code] > I had an app that I needed to include other modules. I think you need to add some lines to your options area of your setup.py. You have the argv_emulation but not site_packages which allows your Pythonpath to be explored or the specific packages that you wish to include specifically. My Setup.py file is included below for reference. I made mine a kind of default that I include in my packages that I only really need to modify a couple of variable for my builds. Hope this helps some. Joe Losco #!/usr/bin/env python """ setup.py - script for building MyApplication Usage: % python setup.py py2app """ from distutils.core import setup import py2app from plistlib import Plist import os name = 'CalendarSync' version = '1.0.0' Icon = name+".icns" # Build the .app file setup( app=[ name + '.py' ], options=dict( py2app=dict( iconfile=Icon, packages=['wx','appscript'], site_packages=True, resources=['resources/COPYING',Icon], plist=dict( CFBundleName = name, CFBundleShortVersionString = version, # must be in X.X.X format CFBundleGetInfoString = name+" "+ version, CFBundleExecutable = name, ), ), ), ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rajanikanth at gmail.com Tue Sep 16 01:46:39 2008 From: rajanikanth at gmail.com (Rajanikanth Jammalamadaka) Date: Mon, 15 Sep 2008 16:46:39 -0700 Subject: [Pythonmac-SIG] findertools Error Message-ID: <84bdef3c0809151646u1d49a912nab006a0c00db2e3e@mail.gmail.com> Could somebody please tell me why I get this error? >>> import findertools >>> findertools.sleep() Traceback (most recent call last): File "", line 1, in findertools.sleep() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/findertools.py", line 80, in sleep finder.sleep() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages/Finder/Legacy_suite.py", line 65, in sleep _arguments, _attributes) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/aetools.py", line 226, in send return self.sendevent(self.newevent(code, subcode, parameters, attributes)) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/aetools.py", line 220, in sendevent self.send_timeout) Error: (-600, 'no eligible process with specified descriptor') >>> from appscript import * >>> app(u'Finder').sleep() Traceback (most recent call last): File "", line 1, in app(u'Finder').sleep() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", line 439, in __call__ raise CommandError(self, (args, kargs), e) CommandError: CommandError -1708: Application could not handle this command. Failed command: app(u'/System/Library/CoreServices/Finder.app').sleep() >>> app(u'Finder').sleep() Traceback (most recent call last): File "", line 1, in app(u'Finder').sleep() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", line 439, in __call__ raise CommandError(self, (args, kargs), e) CommandError: CommandError -1708: Application could not handle this command. Failed command: app(u'/System/Library/CoreServices/Finder.app').sleep() Also, what would be the best way to mount a .dmg file using appscript? Thanks, Raj From nad at acm.org Tue Sep 16 07:42:40 2008 From: nad at acm.org (Ned Deily) Date: Mon, 15 Sep 2008 22:42:40 -0700 Subject: [Pythonmac-SIG] findertools Error References: <84bdef3c0809151646u1d49a912nab006a0c00db2e3e@mail.gmail.com> Message-ID: In article <84bdef3c0809151646u1d49a912nab006a0c00db2e3e at mail.gmail.com>, "Rajanikanth Jammalamadaka" wrote: > Could somebody please tell me why I get this error? > > >>> import findertools > >>> findertools.sleep() [...] The simple answer is: don't use findertools, or most other MacPython modules for that matter. They were written for classic MacOS, aren't really supported anymore under OS X, and are being removed in future versions of Python. You're on the right track by using appscript. > >>> from appscript import * > >>> app(u'Finder').sleep() > > Traceback (most recent call last): > File "", line 1, in > app(u'Finder').sleep() > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag > es/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", > line 439, in __call__ > raise CommandError(self, (args, kargs), e) > CommandError: CommandError -1708: Application could not handle this command. > Failed command: app(u'/System/Library/CoreServices/Finder.app').sleep() > >>> app(u'Finder').sleep() > > Traceback (most recent call last): > File "", line 1, in > app(u'Finder').sleep() > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag > es/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", > line 439, in __call__ > raise CommandError(self, (args, kargs), e) > CommandError: CommandError -1708: Application could not handle this command. > Failed command: app(u'/System/Library/CoreServices/Finder.app').sleep() The problem here is that "sleep" and various other commands. which were a part of the Finder in classic MacOS, are now - under the covers - implemented by other services in OS X. In particular, 'sleep' and other power events are scripted through the "System Events" agent. >>> from appscript import * >>> app('System Events').sleep() You can browse its terminology using, for example, appscript's built-in help introspection or Apple's Script Editor. > Also, what would be the best way to mount a .dmg file using appscript? One simple way is to just pass the path of the .dmg file to System Event's open: >>> app('System Events').open('/Users/nad/blah.dmg') If that's too simple-minded, you could wrap a shell call to hdiutil(1). -- Ned Deily, nad at acm.org From rajanikanth at gmail.com Tue Sep 16 08:45:07 2008 From: rajanikanth at gmail.com (Rajanikanth Jammalamadaka) Date: Mon, 15 Sep 2008 23:45:07 -0700 Subject: [Pythonmac-SIG] findertools Error In-Reply-To: References: <84bdef3c0809151646u1d49a912nab006a0c00db2e3e@mail.gmail.com> Message-ID: <84bdef3c0809152345pa8c777asd22a13f87dbd08fa@mail.gmail.com> Thanks for the answers Ned. Regards, Raj On Mon, Sep 15, 2008 at 10:42 PM, Ned Deily wrote: > In article > <84bdef3c0809151646u1d49a912nab006a0c00db2e3e at mail.gmail.com>, > "Rajanikanth Jammalamadaka" wrote: > >> Could somebody please tell me why I get this error? >> >> >>> import findertools >> >>> findertools.sleep() > [...] > > The simple answer is: don't use findertools, or most other MacPython > modules for that matter. They were written for classic MacOS, aren't > really supported anymore under OS X, and are being removed in future > versions of Python. > > You're on the right track by using appscript. > >> >>> from appscript import * >> >>> app(u'Finder').sleep() >> >> Traceback (most recent call last): >> File "", line 1, in >> app(u'Finder').sleep() >> File >> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag >> es/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", >> line 439, in __call__ >> raise CommandError(self, (args, kargs), e) >> CommandError: CommandError -1708: Application could not handle this command. >> Failed command: app(u'/System/Library/CoreServices/Finder.app').sleep() >> >>> app(u'Finder').sleep() >> >> Traceback (most recent call last): >> File "", line 1, in >> app(u'Finder').sleep() >> File >> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packag >> es/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", >> line 439, in __call__ >> raise CommandError(self, (args, kargs), e) >> CommandError: CommandError -1708: Application could not handle this command. >> Failed command: app(u'/System/Library/CoreServices/Finder.app').sleep() > > The problem here is that "sleep" and various other commands. which were > a part of the Finder in classic MacOS, are now - under the covers - > implemented by other services in OS X. In particular, 'sleep' and other > power events are scripted through the "System Events" agent. > >>>> from appscript import * >>>> app('System Events').sleep() > > You can browse its terminology using, for example, appscript's built-in > help introspection or Apple's Script Editor. > >> Also, what would be the best way to mount a .dmg file using appscript? > > One simple way is to just pass the path of the .dmg file to System > Event's open: > >>>> app('System Events').open('/Users/nad/blah.dmg') > > If that's too simple-minded, you could wrap a shell call to hdiutil(1). > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- Rajanikanth From weddingmusic at partybombe.de Tue Sep 16 14:55:41 2008 From: weddingmusic at partybombe.de (weddingmusic at partybombe.de) Date: Tue, 16 Sep 2008 14:55:41 +0200 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? Message-ID: <20080916125541.203780@gmx.net> thanks Joe, i modified setup.py to: #!/usr/bin/env python from setuptools import setup import py2app setup( app=['myApp.py'], options=dict( py2app=dict( packages=['mechanize'], site_packages=True, ), ), ) running: /usr/local/bin/python setup.py py2app gets me the following output: running py2app Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 548, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 600, in run_normal mf = self.get_modulefinder() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", line 508, in get_modulefinder debug=debug, File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 243, in find_modules find_needed_modules(mf, scripts, includes, packages) File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 179, in find_needed_modules path = m.packagepath[0] TypeError: 'NoneType' object is unsubscriptable > /Users/me/python_test/build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py(179)find_needed_modules() (Pdb) please allow some more questions: 1) is it correct that there is a directory "build/bdist.macosx-10.3-i386"? (I'm running macosx 10.4.11) 2) i want to use python 2.5.2 which i installed in "/Library/Frameworks/Python.framework/Versions/2.5" i do not want to use the system installed python 2.3.5 in "/System/Library/Frameworks/Python.framework/Versions/2.3" is it correct to set PYTHONPATH to "/Library/Frameworks/Python.framework/Versions/2.5" in ~/.MacOSX/environment.plist ? does the first line in my setup.py probably refere to a wrong python2.3? 3) did i install the mechanize package correct, when i find the file "mechanize-0.1.8-py2.5.egg" in "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages"? hope to get some more help greets axel -------- Original-Nachricht -------- > Datum: Mon, 15 Sep 2008 11:36:45 -0400 > Von: Joe Losco > An: weddingmusic at partybombe.de > CC: pythonmac-sig at python.org > Betreff: Re: [Pythonmac-SIG] py2app: how to force packages into application bundle? > On Sep 15, 2008, at 10:36 AM, weddingmusic at partybombe.de wrote: > > > > setup.py looks like this: > > [code] > > from setuptools import setup > > > > APP = ['myApp.py'] > > DATA_FILES = [] > > OPTIONS = {'argv_emulation': True} > > > > setup( > > app=APP, > > data_files=DATA_FILES, > > options={'py2app': OPTIONS}, > > setup_requires=['py2app'], > > ) > > [/code] > > > > I had an app that I needed to include other modules. I think you need > to add some lines to your options area of your setup.py. > You have the argv_emulation but not site_packages which allows your > Pythonpath to be explored or the specific packages that you wish to > include specifically. > > My Setup.py file is included below for reference. I made mine a kind > of default that I include in my packages that I only really need to > modify a couple of variable for my builds. > Hope this helps some. > > Joe Losco > > > > #!/usr/bin/env python > """ > setup.py - script for building MyApplication > > Usage: > % python setup.py py2app > """ > from distutils.core import setup > import py2app > from plistlib import Plist > import os > > name = 'CalendarSync' > version = '1.0.0' > Icon = name+".icns" > > # Build the .app file > setup( > app=[ name + '.py' ], > options=dict( > py2app=dict( > iconfile=Icon, > packages=['wx','appscript'], > site_packages=True, > resources=['resources/COPYING',Icon], > plist=dict( > CFBundleName = name, > CFBundleShortVersionString = version, # must be > in X.X.X format > CFBundleGetInfoString = name+" "+ version, > CFBundleExecutable = name, > ), > ), > ), > > ) From joelosco at frontiernet.net Tue Sep 16 15:18:03 2008 From: joelosco at frontiernet.net (Joe Losco) Date: Tue, 16 Sep 2008 09:18:03 -0400 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? In-Reply-To: <20080916125541.203780@gmx.net> References: <20080916125541.203780@gmx.net> Message-ID: <5D30D021-11EC-489C-8F5B-F3904722ABBC@frontiernet.net> > thanks Joe, no problem.. glad I could help.. > gets me the following output: > running py2app > Traceback (most recent call last): > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > line 548, in _run > self.run_normal() > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > line 600, in run_normal > mf = self.get_modulefinder() > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > line 508, in get_modulefinder > debug=debug, > File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", > line 243, in find_modules > find_needed_modules(mf, scripts, includes, packages) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", > line 179, in find_needed_modules > path = m.packagepath[0] > TypeError: 'NoneType' object is unsubscriptable >> /Users/me/python_test/build/bdist.macosx-10.3-i386/egg/modulegraph/ >> find_modules.py(179)find_needed_modules() > (Pdb) ok.. next I think you have run into an issues with the versions of modulegraph and py2app. I ran into the same issue. I had to easy_install -U modulegraph==dev and easy_install -U py2app==dev to fix it. oh and I also had to easy_install -U macholib==dev since thats a dependancy.\ However I should note that there are risks using the development versions of the packages because there are going to be bugs and they are updated nightly I believe. So there may be bugs that weren't there when I downloaded it and there may be bugs I have that are fixed now. Hopefully they get pushed up to the stable soon so that people don't have to use the development versions. > please allow some more questions: > 1) is it correct that there is a directory "build/bdist.macosx-10.3- > i386"? (I'm running macosx 10.4.11) > 2) i want to use python 2.5.2 which i installed in "/Library/ > Frameworks/Python.framework/Versions/2.5" > i do not want to use the system installed python 2.3.5 in "/System/ > Library/Frameworks/Python.framework/Versions/2.3" > is it correct to set PYTHONPATH to "/Library/Frameworks/ > Python.framework/Versions/2.5" in ~/.MacOSX/environment.plist ? > does the first line in my setup.py probably refere to a wrong > python2.3? > 3) did i install the mechanize package correct, when i find the file > "mechanize-0.1.8-py2.5.egg" in "/Library/Frameworks/Python.framework/ > Versions/2.5/lib/python2.5/site-packages"? > > hope to get some more help > greets > axel > I'll do my best here however I'm not extremely experienced, I just happened to run into the same issues you did. 1) I believe thats ok, because I think its just been hard coded into py2app by its developer as to how the build directory gets made. 2) from the terminal do a 'which python' and make sure that the desired python is displayed. I believe the python used to run py2app is the selected one that shows in the which. I don't think its necessary to set pythonpath in that plist. In my .bash_profile file in my home directory I set up my $PATH so that the desired python is found first.. therefore shown in which. I think thats all thats needed. 3) Yes thats the systemwide location for the mechanize package. You could have also put it in ~/Library/Python/2.5/site-packages/. best of luck joe ps you should keep posting to the group as well so that others can benefit from our discussion or contribute ideas / corrections where I may be wrong or not know. From weddingmusic at partybombe.de Tue Sep 16 17:15:45 2008 From: weddingmusic at partybombe.de (weddingmusic at partybombe.de) Date: Tue, 16 Sep 2008 17:15:45 +0200 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? In-Reply-To: <5D30D021-11EC-489C-8F5B-F3904722ABBC@frontiernet.net> References: <20080916125541.203780@gmx.net> <5D30D021-11EC-489C-8F5B-F3904722ABBC@frontiernet.net> Message-ID: <20080916151545.169170@gmx.net> hi Joe and Pythonmac-SIG-Community still that does not work for me. what i have done: 1) easy_install -U somemodule==dev run into NameError: global name 'log' is not defined searching the web i figured out that this is a problem of subversion 1.5 and setuptools. at least i could fix this by checkout current setuptools-dev manually: svn checkout http://svn.python.org/projects/sandbox/trunk/setuptools and installing by python setup.py install 2) now i could install current development version of py2app, modulegraph and macholib as you suggested. my third party dictionary (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages ) looks like this now: ClientForm-0.2.9-py2.5.egg altgraph-0.6.7-py2.5.egg bdist_mpkg-0.4.3-py2.5.egg easy-install.pth macholib-1.1-py2.5.egg macholib-1.2.1.dev_r23-py2.5.egg mechanize-0.1.8-py2.5.egg modulegraph-0.7-py2.5.egg modulegraph-0.7.2.dev_r21-py2.5.egg py2app-0.3.6-py2.5.egg py2app-0.4.2-py2.5.egg setuptools-0.6c8-py2.5.egg setuptools-0.7a1dev_r66388-py2.5.egg setuptools.pth I'm not quite sure whether i should remove the old packages when installing new ones? 3) running python setup.py py2app returns some new error now: running py2app Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 579, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 631, in run_normal mf = self.get_modulefinder() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 539, in get_modulefinder debug=debug, File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 255, in find_modules find_needed_modules(mf, scripts, includes, packages) File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", line 176, in find_needed_modules mf.run_script(path) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 369, in run_script self.scan_code(co, m) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 638, in scan_code self.scan_code(c, m) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 610, in scan_code self._safe_import_hook(name, m, fromlist) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 540, in _safe_import_hook mods = self.import_hook(name, caller) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 380, in import_hook q, tail = self.find_head_package(parent, name) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 419, in find_head_package q = self.import_module(head, qname, parent) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 493, in import_module parent and parent.packagepath, parent) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 680, in find_module fp, buf, stuff = find_module(name, path) File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", line 114, in find_module if isinstance(importer, pkg_resources.ImpWrapper): AttributeError: 'module' object has no attribute 'ImpWrapper' > /Users/me/python_test/build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py(114)find_module() (Pdb) Anyone has got ideas? thank you axel PS: my setup.py still is: #!/usr/bin/env python from setuptools import setup import py2app setup( app=['test.py'], options=dict( py2app=dict( packages=['mechanize'], site_packages=True, ), ), ) and my source code test.py: import mechanize -------- Original-Nachricht -------- > Datum: Tue, 16 Sep 2008 09:18:03 -0400 > Von: Joe Losco > An: weddingmusic at partybombe.de > CC: pythonmac-sig at python.org > Betreff: Re: [Pythonmac-SIG] py2app: how to force packages into application bundle? > > > > thanks Joe, > > no problem.. glad I could help.. > > > gets me the following output: > > running py2app > > Traceback (most recent call last): > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > > python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > > line 548, in _run > > self.run_normal() > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > > python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > > line 600, in run_normal > > mf = self.get_modulefinder() > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > > python2.5/site-packages/py2app-0.3.6-py2.5.egg/py2app/build_app.py", > > line 508, in get_modulefinder > > debug=debug, > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", > > line 243, in find_modules > > find_needed_modules(mf, scripts, includes, packages) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/find_modules.py", > > line 179, in find_needed_modules > > path = m.packagepath[0] > > TypeError: 'NoneType' object is unsubscriptable > > /Users/me/python_test/build/bdist.macosx-10.3-i386/egg/modulegraph/ > >> find_modules.py(179)find_needed_modules() > > (Pdb) > > ok.. next I think you have run into an issues with the versions of > modulegraph and py2app. > I ran into the same issue. I had to easy_install -U modulegraph==dev > and easy_install -U py2app==dev to fix it. oh and I also had to > easy_install -U macholib==dev since thats a dependancy.\ > However I should note that there are risks using the development > versions of the packages because there are going to be bugs and they > are updated nightly I believe. So there may be bugs that weren't > there when I downloaded it and there may be bugs I have that are fixed > now. Hopefully they get pushed up to the stable soon so that people > don't have to use the development versions. > > > > please allow some more questions: > > 1) is it correct that there is a directory "build/bdist.macosx-10.3- > > i386"? (I'm running macosx 10.4.11) > > 2) i want to use python 2.5.2 which i installed in "/Library/ > > Frameworks/Python.framework/Versions/2.5" > > i do not want to use the system installed python 2.3.5 in "/System/ > > Library/Frameworks/Python.framework/Versions/2.3" > > is it correct to set PYTHONPATH to "/Library/Frameworks/ > > Python.framework/Versions/2.5" in ~/.MacOSX/environment.plist ? > > does the first line in my setup.py probably refere to a wrong > > python2.3? > > 3) did i install the mechanize package correct, when i find the file > > "mechanize-0.1.8-py2.5.egg" in "/Library/Frameworks/Python.framework/ > > Versions/2.5/lib/python2.5/site-packages"? > > > > hope to get some more help > > greets > > axel > > > > I'll do my best here however I'm not extremely experienced, I just > happened to run into the same issues you did. > 1) I believe thats ok, because I think its just been hard coded into > py2app by its developer as to how the build directory gets made. > 2) from the terminal do a 'which python' and make sure that the > desired python is displayed. I believe the python used to run py2app > is the selected one that shows in the which. > I don't think its necessary to set pythonpath in that plist. In > my .bash_profile file in my home directory I set up my $PATH so that > the desired python is found first.. therefore shown in which. I think > thats all thats needed. > 3) Yes thats the systemwide location for the mechanize package. You > could have also put it in ~/Library/Python/2.5/site-packages/. > > best of luck > joe > > ps you should keep posting to the group as well so that others can > benefit from our discussion or contribute ideas / corrections where I > may be wrong or not know. > > -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf at gmx From joelosco at frontiernet.net Tue Sep 16 17:53:56 2008 From: joelosco at frontiernet.net (Joe Losco) Date: Tue, 16 Sep 2008 11:53:56 -0400 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? In-Reply-To: <20080916151545.169170@gmx.net> References: <20080916125541.203780@gmx.net> <5D30D021-11EC-489C-8F5B-F3904722ABBC@frontiernet.net> <20080916151545.169170@gmx.net> Message-ID: <0D1E4D10-C06B-4498-961D-DFB35E2E6C55@frontiernet.net> On Sep 16, 2008, at 11:15 AM, weddingmusic at partybombe.de wrote: > > 1) > easy_install -U somemodule==dev > run into > NameError: global name 'log' is not defined > > searching the web i figured out that this is a problem of subversion > 1.5 and setuptools. > > at least i could fix this by checkout current setuptools-dev manually: > svn checkout http://svn.python.org/projects/sandbox/trunk/setuptools > and installing by > python setup.py install Hmm.. thats strange. I wonder why I did not run into the bug. I have setuptools-0.6c8-py2.5.egg installed only. I do not have setuptools-0.7 installed. I have subversion installed through Macports.. ahh.. I have version 1.4.6 of subversion installed. That must be why. > 2) > now i could install current development version of py2app, > modulegraph and macholib as you suggested. > my third party dictionary (/Library/Frameworks/Python.framework/ > Versions/2.5/lib/python2.5/site-packages ) looks like this now: > > ClientForm-0.2.9-py2.5.egg > altgraph-0.6.7-py2.5.egg > bdist_mpkg-0.4.3-py2.5.egg > easy-install.pth > macholib-1.1-py2.5.egg > macholib-1.2.1.dev_r23-py2.5.egg > mechanize-0.1.8-py2.5.egg > modulegraph-0.7-py2.5.egg > modulegraph-0.7.2.dev_r21-py2.5.egg > py2app-0.3.6-py2.5.egg > py2app-0.4.2-py2.5.egg > setuptools-0.6c8-py2.5.egg > setuptools-0.7a1dev_r66388-py2.5.egg > setuptools.pth > > I'm not quite sure whether i should remove the old packages when > installing new ones? It won't hurt taking the old ones out, but most likely you will need to check the contents of the easy-install.pth so that it does not reference old files that no longer exist. > 3) > running python setup.py py2app returns some new error now: > > running py2app > Traceback (most recent call last): > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", > line 579, in _run > self.run_normal() > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", > line 631, in run_normal > mf = self.get_modulefinder() > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", > line 539, in get_modulefinder > debug=debug, > File "build/bdist.macosx-10.3-i386/egg/modulegraph/ > find_modules.py", line 255, in find_modules > find_needed_modules(mf, scripts, includes, packages) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/ > find_modules.py", line 176, in find_needed_modules > mf.run_script(path) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 369, in run_script > self.scan_code(co, m) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 638, in scan_code > self.scan_code(c, m) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 610, in scan_code > self._safe_import_hook(name, m, fromlist) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 540, in _safe_import_hook > mods = self.import_hook(name, caller) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 380, in import_hook > q, tail = self.find_head_package(parent, name) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 419, in find_head_package > q = self.import_module(head, qname, parent) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 493, in import_module > parent and parent.packagepath, parent) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 680, in find_module > fp, buf, stuff = find_module(name, path) > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > line 114, in find_module > if isinstance(importer, pkg_resources.ImpWrapper): > AttributeError: 'module' object has no attribute 'ImpWrapper' >> /Users/me/python_test/build/bdist.macosx-10.3-i386/egg/modulegraph/ >> modulegraph.py(114)find_module() > (Pdb) > > Anyone has got ideas? > thank you > axel > well.. I checked your versions of macholib, modulegraph, and py2app and I have the same.. the only item I do not have is the newer version of setuptools. Unfortunately I'm stumped now without looking into it farther. The only other difference I see is my setup.py from my old program has from distutils.core import setup not from setuptools import setup other than that I'm not sure why its not working as your program is not complicated in any means. Best of luck and if you find out any other information, let me know. Joe From weddingmusic at partybombe.de Wed Sep 17 00:27:53 2008 From: weddingmusic at partybombe.de (weddingmusic at partybombe.de) Date: Wed, 17 Sep 2008 00:27:53 +0200 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? In-Reply-To: <0D1E4D10-C06B-4498-961D-DFB35E2E6C55@frontiernet.net> References: <20080916125541.203780@gmx.net> <5D30D021-11EC-489C-8F5B-F3904722ABBC@frontiernet.net> <20080916151545.169170@gmx.net> <0D1E4D10-C06B-4498-961D-DFB35E2E6C55@frontiernet.net> Message-ID: <20080916222753.18280@gmx.net> Hi Joe, i got it now! thank's alot for your help!!! since my python installation is still quite fresh, i removed it completely and installed again. this time using Martin Ott's Subversion package 1.4.4 for checking out development versions of modules. so i have the packages as you advised to me. and i had to remove packages=['mechanize'] from setup.py because it causes the error: ImportError: No module named mechanize! Strange, but that does not bother me in the moment. without this line building the application bundle works great! so, i'm happy now and can start writing some lines of code... greetings axel -------- Original-Nachricht -------- > Datum: Tue, 16 Sep 2008 11:53:56 -0400 > Von: Joe Losco > An: weddingmusic at partybombe.de > CC: pythonmac-sig at python.org > Betreff: Re: [Pythonmac-SIG] py2app: how to force packages into application bundle? > > On Sep 16, 2008, at 11:15 AM, weddingmusic at partybombe.de wrote: > > > > 1) > > easy_install -U somemodule==dev > > run into > > NameError: global name 'log' is not defined > > > > searching the web i figured out that this is a problem of subversion > > 1.5 and setuptools. > > > > at least i could fix this by checkout current setuptools-dev manually: > > svn checkout http://svn.python.org/projects/sandbox/trunk/setuptools > > and installing by > > python setup.py install > > Hmm.. thats strange. I wonder why I did not run into the bug. I have > setuptools-0.6c8-py2.5.egg installed only. I do not have > setuptools-0.7 installed. I have subversion installed through > Macports.. ahh.. I have version 1.4.6 of subversion installed. That > must be why. > > > 2) > > now i could install current development version of py2app, > > modulegraph and macholib as you suggested. > > my third party dictionary (/Library/Frameworks/Python.framework/ > > Versions/2.5/lib/python2.5/site-packages ) looks like this now: > > > > ClientForm-0.2.9-py2.5.egg > > altgraph-0.6.7-py2.5.egg > > bdist_mpkg-0.4.3-py2.5.egg > > easy-install.pth > > macholib-1.1-py2.5.egg > > macholib-1.2.1.dev_r23-py2.5.egg > > mechanize-0.1.8-py2.5.egg > > modulegraph-0.7-py2.5.egg > > modulegraph-0.7.2.dev_r21-py2.5.egg > > py2app-0.3.6-py2.5.egg > > py2app-0.4.2-py2.5.egg > > setuptools-0.6c8-py2.5.egg > > setuptools-0.7a1dev_r66388-py2.5.egg > > setuptools.pth > > > > I'm not quite sure whether i should remove the old packages when > > installing new ones? > > It won't hurt taking the old ones out, but most likely you will need > to check the contents of the easy-install.pth so that it does not > reference old files that no longer exist. > > > > 3) > > running python setup.py py2app returns some new error now: > > > > running py2app > > Traceback (most recent call last): > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > > python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", > > line 579, in _run > > self.run_normal() > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > > python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", > > line 631, in run_normal > > mf = self.get_modulefinder() > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > > python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", > > line 539, in get_modulefinder > > debug=debug, > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/ > > find_modules.py", line 255, in find_modules > > find_needed_modules(mf, scripts, includes, packages) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/ > > find_modules.py", line 176, in find_needed_modules > > mf.run_script(path) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 369, in run_script > > self.scan_code(co, m) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 638, in scan_code > > self.scan_code(c, m) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 610, in scan_code > > self._safe_import_hook(name, m, fromlist) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 540, in _safe_import_hook > > mods = self.import_hook(name, caller) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 380, in import_hook > > q, tail = self.find_head_package(parent, name) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 419, in find_head_package > > q = self.import_module(head, qname, parent) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 493, in import_module > > parent and parent.packagepath, parent) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 680, in find_module > > fp, buf, stuff = find_module(name, path) > > File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", > > line 114, in find_module > > if isinstance(importer, pkg_resources.ImpWrapper): > > AttributeError: 'module' object has no attribute 'ImpWrapper' > >> /Users/me/python_test/build/bdist.macosx-10.3-i386/egg/modulegraph/ > >> modulegraph.py(114)find_module() > > (Pdb) > > > > Anyone has got ideas? > > thank you > > axel > > > > well.. I checked your versions of macholib, modulegraph, and py2app > and I have the same.. the only item I do not have is the newer version > of setuptools. Unfortunately I'm stumped now without looking into it > farther. > The only other difference I see is my setup.py from my old program has > > from distutils.core import setup not from setuptools import setup > > other than that I'm not sure why its not working as your program is > not complicated in any means. > > Best of luck and if you find out any other information, let me know. > Joe -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf at gmx From joelosco at frontiernet.net Wed Sep 17 00:33:32 2008 From: joelosco at frontiernet.net (Joe Losco) Date: Tue, 16 Sep 2008 18:33:32 -0400 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? In-Reply-To: <20080916222753.18280@gmx.net> References: <20080916125541.203780@gmx.net> <5D30D021-11EC-489C-8F5B-F3904722ABBC@frontiernet.net> <20080916151545.169170@gmx.net> <0D1E4D10-C06B-4498-961D-DFB35E2E6C55@frontiernet.net> <20080916222753.18280@gmx.net> Message-ID: <51627CE1-6382-4072-92FA-2A43B33D12AB@frontiernet.net> Hey thats great. Glad I could be of service. Odd that the packages line broke it in the end. Joe On Sep 16, 2008, at 6:27 PM, weddingmusic at partybombe.de wrote: > Hi Joe, > > i got it now! > thank's alot for your help!!! > > since my python installation is still quite fresh, i removed it > completely and installed again. > this time using Martin Ott's Subversion package 1.4.4 for checking > out development versions of modules. > so i have the packages as you advised to me. > and i had to remove packages=['mechanize'] from setup.py because it > causes the error: ImportError: No module named mechanize! Strange, > but that does not bother me in the moment. > without this line building the application bundle works great! > > so, i'm happy now and can start writing some lines of code... > > greetings > axel > > -------- Original-Nachricht -------- >> Datum: Tue, 16 Sep 2008 11:53:56 -0400 >> Von: Joe Losco >> An: weddingmusic at partybombe.de >> CC: pythonmac-sig at python.org >> Betreff: Re: [Pythonmac-SIG] py2app: how to force packages into >> application bundle? > >> >> On Sep 16, 2008, at 11:15 AM, weddingmusic at partybombe.de wrote: >>> >>> 1) >>> easy_install -U somemodule==dev >>> run into >>> NameError: global name 'log' is not defined >>> >>> searching the web i figured out that this is a problem of subversion >>> 1.5 and setuptools. >>> >>> at least i could fix this by checkout current setuptools-dev >>> manually: >>> svn checkout http://svn.python.org/projects/sandbox/trunk/setuptools >>> and installing by >>> python setup.py install >> >> Hmm.. thats strange. I wonder why I did not run into the bug. I >> have >> setuptools-0.6c8-py2.5.egg installed only. I do not have >> setuptools-0.7 installed. I have subversion installed through >> Macports.. ahh.. I have version 1.4.6 of subversion installed. That >> must be why. >> >>> 2) >>> now i could install current development version of py2app, >>> modulegraph and macholib as you suggested. >>> my third party dictionary (/Library/Frameworks/Python.framework/ >>> Versions/2.5/lib/python2.5/site-packages ) looks like this now: >>> >>> ClientForm-0.2.9-py2.5.egg >>> altgraph-0.6.7-py2.5.egg >>> bdist_mpkg-0.4.3-py2.5.egg >>> easy-install.pth >>> macholib-1.1-py2.5.egg >>> macholib-1.2.1.dev_r23-py2.5.egg >>> mechanize-0.1.8-py2.5.egg >>> modulegraph-0.7-py2.5.egg >>> modulegraph-0.7.2.dev_r21-py2.5.egg >>> py2app-0.3.6-py2.5.egg >>> py2app-0.4.2-py2.5.egg >>> setuptools-0.6c8-py2.5.egg >>> setuptools-0.7a1dev_r66388-py2.5.egg >>> setuptools.pth >>> >>> I'm not quite sure whether i should remove the old packages when >>> installing new ones? >> >> It won't hurt taking the old ones out, but most likely you will need >> to check the contents of the easy-install.pth so that it does not >> reference old files that no longer exist. >> >> >>> 3) >>> running python setup.py py2app returns some new error now: >>> >>> running py2app >>> Traceback (most recent call last): >>> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", >>> line 579, in _run >>> self.run_normal() >>> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", >>> line 631, in run_normal >>> mf = self.get_modulefinder() >>> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ >>> python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py", >>> line 539, in get_modulefinder >>> debug=debug, >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/ >>> find_modules.py", line 255, in find_modules >>> find_needed_modules(mf, scripts, includes, packages) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/ >>> find_modules.py", line 176, in find_needed_modules >>> mf.run_script(path) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 369, in run_script >>> self.scan_code(co, m) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 638, in scan_code >>> self.scan_code(c, m) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 610, in scan_code >>> self._safe_import_hook(name, m, fromlist) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 540, in _safe_import_hook >>> mods = self.import_hook(name, caller) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 380, in import_hook >>> q, tail = self.find_head_package(parent, name) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 419, in find_head_package >>> q = self.import_module(head, qname, parent) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 493, in import_module >>> parent and parent.packagepath, parent) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 680, in find_module >>> fp, buf, stuff = find_module(name, path) >>> File "build/bdist.macosx-10.3-i386/egg/modulegraph/modulegraph.py", >>> line 114, in find_module >>> if isinstance(importer, pkg_resources.ImpWrapper): >>> AttributeError: 'module' object has no attribute 'ImpWrapper' >>>> /Users/me/python_test/build/bdist.macosx-10.3-i386/egg/modulegraph/ >>>> modulegraph.py(114)find_module() >>> (Pdb) >>> >>> Anyone has got ideas? >>> thank you >>> axel >>> >> >> well.. I checked your versions of macholib, modulegraph, and py2app >> and I have the same.. the only item I do not have is the newer >> version >> of setuptools. Unfortunately I'm stumped now without looking into it >> farther. >> The only other difference I see is my setup.py from my old program >> has >> >> from distutils.core import setup not from setuptools import setup >> >> other than that I'm not sure why its not working as your program is >> not complicated in any means. >> >> Best of luck and if you find out any other information, let me know. >> Joe > > -- > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! > Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf at gmx > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From Chris.Barker at noaa.gov Wed Sep 17 07:56:09 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 16 Sep 2008 22:56:09 -0700 Subject: [Pythonmac-SIG] py2app: how to force packages into application bundle? In-Reply-To: <20080916151545.169170@gmx.net> References: <20080916125541.203780@gmx.net> <5D30D021-11EC-489C-8F5B-F3904722ABBC@frontiernet.net> <20080916151545.169170@gmx.net> Message-ID: <48D09BF9.7000501@noaa.gov> weddingmusic at partybombe.de wrote: > searching the web i figured out that this is a problem of subversion 1.5 and setuptools. > > at least i could fix this by checkout current setuptools-dev manually: AARRGG! I really wish they would hurry up and get a release out with that fix!! Joe Losco wrote: > However I should note that there are risks using the development > versions of the packages because there are going to be bugs well, yes, but there are bugs in the release version too. None of these modules are under heavy development, so the "dev" version is really the bug-fixed version. >> is it correct to set PYTHONPATH to >> "/Library/Frameworks/Python.framework/Versions/2.5" in >> ~/.MacOSX/environment.plist ? no -- it's not! PYTHONPATH is for telling python where to look for packages -- not telling the system where to look for python. > I'm not quite sure whether i should remove the old packages when installing new ones? you don't need to -- and you can access the old eggs if you want -- though I'm having trouble figuring out how! > running python setup.py py2app returns some new error now: > setup( > app=['test.py'], > options=dict( > py2app=dict( > packages=['mechanize'], > site_packages=True, > ), > ), > ) > > and my source code test.py: > > import mechanize with that import statement, you shouldn't need to specify the mechanize package -- that's what modulegraph and all that is for! I don't think that's you problem though... One thing to do is test your py2app setup with a simple program that doesn't use mechanize, to see if that package is the problem. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception From work at zguy.com Wed Sep 17 10:52:03 2008 From: work at zguy.com (Andrew Zahra) Date: Wed, 17 Sep 2008 18:52:03 +1000 Subject: [Pythonmac-SIG] Open source Python Mac Apps Message-ID: I am just investigating python mac development for a database app I would like to write. I was wondering if there are any open source python apps for the mac that are good examples to have a look at? thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From rgacote at AppropriateSolutions.com Wed Sep 17 18:30:42 2008 From: rgacote at AppropriateSolutions.com (Raymond Cote) Date: Wed, 17 Sep 2008 12:30:42 -0400 Subject: [Pythonmac-SIG] Open source Python Mac Apps In-Reply-To: References: Message-ID: <48D130B2.2070007@AppropriateSolutions.com> Andrew Zahra wrote: > I am just investigating python mac development for a database app I > would like to write. I was wondering if there are any open source > python apps for the mac that are good examples to have a look at? > > thanks, > Andrew Hi Andrew: Many Python applications are now cross-platform and support Mac OS X quite well. Popular database tools: --Ray From kw at codebykevin.com Thu Sep 18 05:20:02 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 17 Sep 2008 23:20:02 -0400 Subject: [Pythonmac-SIG] Open source Python Mac Apps In-Reply-To: References: Message-ID: <48D1C8E2.50706@codebykevin.com> Andrew Zahra wrote: > I am just investigating python mac development for a database app I would > like to write. I was wondering if there are any open source python apps for > the mac that are good examples to have a look at? > thanks, > Andrew > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig A partial list can be found here: http://wiki.python.org/moin/MacPython/MacSoftwareUsingPython -- Kevin Walzer Code by Kevin http://www.codebykevin.com From mail at chrisadams.me.uk Sun Sep 21 22:20:22 2008 From: mail at chrisadams.me.uk (Chris Adams) Date: Sun, 21 Sep 2008 21:20:22 +0100 Subject: [Pythonmac-SIG] PYTHON PATH woes, with a twist - could a good samaritan help out? Message-ID: <58c32de20809211320r64b95579ha0a7aa496945b50c@mail.gmail.com> Hi guys, I've been looking around in the archives of this mailing list, and I've seen other users having a problem with PYTHONPATH, but it seems that followiing the usual instructions isn't helping me out here; I'm using bash as my shell, on Leopard 10.5.5, and in my .profile config file, I have export PYTHONPATH which should give me a list of the packages inside. This is what I get back: chris-adamss-macbook:~ chrisadams$ echo $PYTHONPATH chris-adamss-macbook:~ chrisadams$ When I fire up a python shell, I get the following back: chris-adamss-macbook:~ chrisadams$ python Python 2.5.1 (r251:54863, Feb 4 2008, 21:48:13) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print sys.path ['', '/Library/Python/2.5/site-packages/Fabric-0.0.8-py2.5.egg', '/Library/Python/2.5/site-packages/paramiko-1.7.4-py2.5.egg', '/Library/Python/2.5/site-packages/Sphinx-0.4.2-py2.5.egg', '/Library/Python/2.5/site-packages/docutils-0.5-py2.5.egg', '/Library/Python/2.5/site-packages/Jinja2-2.0-py2.5-macosx-10.5-i386.egg', '/Library/Python/2.5/site-packages/Jinja-1.2-py2.5-macosx-10.5-i386.egg', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/Library/Python/2.5/site-packages/PIL', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC'] >>> I'm trying to install Sphinx, which has Jinja as a prerequisite, and I'm having absolutely no luck here, and the link to pythonmac.org/wiki/FAQ seems to be down. Could someone here shed some light on what I'm doing wrong? Thanks in advance, C -- Chris Adams mob: 07974 368 229 tel: 0207 558 8971 skype: chris.d.adams twitter: chris_d_adams From anjiro at cc.gatech.edu Sun Sep 21 23:39:31 2008 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Sun, 21 Sep 2008 17:39:31 -0400 Subject: [Pythonmac-SIG] PYTHON PATH woes, with a twist - could a good samaritan help out? In-Reply-To: <58c32de20809211320r64b95579ha0a7aa496945b50c@mail.gmail.com> References: <58c32de20809211320r64b95579ha0a7aa496945b50c@mail.gmail.com> Message-ID: <48D6BF13.6000201@cc.gatech.edu> Chris Adams wrote: > I'm using bash as my shell, on Leopard 10.5.5, and in my .profile > config file, I have > > export PYTHONPATH That line does nothing, unless you have a prior line that looks like: PYTHONPATH=/Library/Python/...:etc So what you probably want to do is: export PYTHONPATH=$PYTHONPATH:path_to_jinja:path_to_sphinx Although it does look in your sys.path like Jinja is already in your path. What are the symptoms of things not working? dan From mail at chrisadams.me.uk Mon Sep 22 01:42:17 2008 From: mail at chrisadams.me.uk (Chris Adams) Date: Mon, 22 Sep 2008 00:42:17 +0100 Subject: [Pythonmac-SIG] PYTHON PATH woes, with a twist - could a good samaritan help out? In-Reply-To: <48D6BF13.6000201@cc.gatech.edu> References: <58c32de20809211320r64b95579ha0a7aa496945b50c@mail.gmail.com> <48D6BF13.6000201@cc.gatech.edu> Message-ID: <58c32de20809211642g7b4b77s6b20d8b92bc489a0@mail.gmail.com> Hi Dan, thanks for the quick response. The main thing that made me think Jinja wasn't installing was the messages I had when I ran an easy_install of Sphinx: chris-adamss-macbook:~ chrisadams$ easy_install Sphinx chris-adamss-macbook:~ chrisadams$ sudo easy_install Sphinx Password: Searching for Sphinx Best match: Sphinx 0.4.2 Processing Sphinx-0.4.2-py2.5.egg Sphinx 0.4.2 is already the active version in easy-install.pth Installing sphinx-build script to /usr/local/bin Installing sphinx-quickstart script to /usr/local/bin Using /Library/Python/2.5/site-packages/Sphinx-0.4.2-py2.5.egg Processing dependencies for Sphinx Searching for Jinja>=1.1 Reading http://pypi.python.org/simple/Jinja/ Reading http://wsgiarea.pocoo.org/jinja/ Reading http://jinja.pocoo.org/ Best match: Jinja 1.2 Downloading http://pypi.python.org/packages/source/J/Jinja/Jinja-1.2.tar.gz#md5=1235a005ade00b213800ff1e798c0241 Processing Jinja-1.2.tar.gz Running Jinja-1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-QMJSbR/Jinja-1.2/egg-dist-tmp--FRFEX No eggs found in /tmp/easy_install-QMJSbR/Jinja-1.2/egg-dist-tmp--FRFEX (setup script problem?) error: Could not find required distribution Jinja>=1.1 >From reading this it now looks like I've managed to install Sphinx, but I'm still missing the pre-requisites (jinja, pygment) before I can use Sphinx. I tried repeating these steps on an Ubuntu VM, to try an eliminate the mac as the problem, and after installing the devtools on ubuntu, all downloaded and installed fine, including the dependencies: sudo apt-get install python-setuptools python-dev build-essential (instructions from - http://www.saltycrane.com/blog/2007/01/how-to-install-easy-install-for-python/) I'm assuming that downloading a similar python-dev bundle for the Mac would help me run a successful easy install, but I'm very new to python development, so any clarification on this (or advice how to recreate the same conditions on os x that were on ubuntu for installation) would be very welcome. If there are any manpages or links to explain the finer points of how pythonpath and os x leopard work together, I'd be very grateful too or any pointers to them, Thanks again, C -- Chris Adams mob: 07974 368 229 tel: 0207 558 8971 skype: chris.d.adams twitter: chris_d_adams From anjiro at cc.gatech.edu Mon Sep 22 01:47:43 2008 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Sun, 21 Sep 2008 19:47:43 -0400 Subject: [Pythonmac-SIG] PYTHON PATH woes, with a twist - could a good samaritan help out? In-Reply-To: <58c32de20809211642g7b4b77s6b20d8b92bc489a0@mail.gmail.com> References: <58c32de20809211320r64b95579ha0a7aa496945b50c@mail.gmail.com> <48D6BF13.6000201@cc.gatech.edu> <58c32de20809211642g7b4b77s6b20d8b92bc489a0@mail.gmail.com> Message-ID: <48D6DD1F.5010700@cc.gatech.edu> Hmm, strange. One thing you could try is to just download the tar.gz and install it manually - usually with "python setup.py install". I don't know how to keep easy_install from passing -q (quiet) to setup.py so you can see what's going on. dan Chris Adams wrote: > Hi Dan, thanks for the quick response. > > The main thing that made me think Jinja wasn't installing was the > messages I had when I ran an easy_install of Sphinx: > > chris-adamss-macbook:~ chrisadams$ easy_install Sphinx > > chris-adamss-macbook:~ chrisadams$ sudo easy_install Sphinx > Password: > Searching for Sphinx > Best match: Sphinx 0.4.2 > Processing Sphinx-0.4.2-py2.5.egg > Sphinx 0.4.2 is already the active version in easy-install.pth > Installing sphinx-build script to /usr/local/bin > Installing sphinx-quickstart script to /usr/local/bin > > Using /Library/Python/2.5/site-packages/Sphinx-0.4.2-py2.5.egg > Processing dependencies for Sphinx > Searching for Jinja>=1.1 > Reading http://pypi.python.org/simple/Jinja/ > Reading http://wsgiarea.pocoo.org/jinja/ > Reading http://jinja.pocoo.org/ > Best match: Jinja 1.2 > Downloading http://pypi.python.org/packages/source/J/Jinja/Jinja-1.2.tar.gz#md5=1235a005ade00b213800ff1e798c0241 > Processing Jinja-1.2.tar.gz > Running Jinja-1.2/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-QMJSbR/Jinja-1.2/egg-dist-tmp--FRFEX > No eggs found in > /tmp/easy_install-QMJSbR/Jinja-1.2/egg-dist-tmp--FRFEX (setup script > problem?) > error: Could not find required distribution Jinja>=1.1 > > From reading this it now looks like I've managed to install Sphinx, > but I'm still missing the pre-requisites (jinja, pygment) before I can > use Sphinx. > > I tried repeating these steps on an Ubuntu VM, to try an eliminate the > mac as the problem, and after installing the devtools on ubuntu, all > downloaded and installed fine, including the dependencies: > > sudo apt-get install python-setuptools python-dev build-essential > > (instructions from - > http://www.saltycrane.com/blog/2007/01/how-to-install-easy-install-for-python/) > > I'm assuming that downloading a similar python-dev bundle for the Mac > would help me run a successful easy install, but I'm very new to > python development, so any clarification on this (or advice how to > recreate the same conditions on os x that were on ubuntu for > installation) would be very welcome. > > If there are any manpages or links to explain the finer points of how > pythonpath and os x leopard work together, I'd be very grateful too or > any pointers to them, > > Thanks again, > > C > > From christopher.e.kees at usace.army.mil Wed Sep 24 21:45:40 2008 From: christopher.e.kees at usace.army.mil (Chris Kees) Date: Wed, 24 Sep 2008 14:45:40 -0500 Subject: [Pythonmac-SIG] 64-bit single arch framework build Message-ID: Hi, Our group ended up needing a non-universal x86_64 framework build because we had trouble building some modules with the non-framework build. We had to modify the makefile in two places to get it to work. First we fixed a place where configure generates '-arch_only i386'. That fixes the the build phase. Then we got rid of some install targets that were trying to pull in Carbon code. The first problem seems like it could easily be fixed by somebody who understands the configure script. I'm not sure what's going on with the second problem. Is --disable-toolbox-glue not being handled correctly when the install target is generated? It seems like the build phase is skipping the Carbon dependent extension modules correctly but install is trying to pull in modules that depend on those disabled modules. FYI, here's what were doing: ./configure --prefix=${HOME} --with-cxx-main='/usr/bin/mpicxx -arch x86_64'\ --enable-framework=${HOME} --disable-toolbox-glue CC='/usr/bin/mpicc -arch \ x86_64' CXX='/usr/bin/mpicxx -arch x86_64' LDFLAGS='-framework Accelerate \ -arch x86_64' Edit Makefile to replace -arch_only i386 with -arch_only x86_64 and remove frameworkinstallmaclib and frameworkinstallapps from the altinstall: target. diff Makefile Makefile~ 457c457 < -lSystem -lSystemStubs -arch_only x86_64 -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) -compatibility_version $(VERSION) -current_version $(VERSION) ;\ --- > -lSystem -lSystemStubs -arch_only i386 -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) -compatibility_version $(VERSION) -current_version $(VERSION) ;\ 741c741 < sharedinstall oldsharedinstall frameworkaltinstallunixtools --- > sharedinstall oldsharedinstall frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools From janssen at parc.com Wed Sep 24 22:10:45 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 24 Sep 2008 13:10:45 PDT Subject: [Pythonmac-SIG] Making setuptools compile for x86_64 In-Reply-To: References: Message-ID: <8857.1222287045@parc.com> > To build 64-bit py-appscript you'll need to use the current trunk from > svn. (I really should push out a proper file release sometime.) Yes, I'd certainly appreciate it if you'd do this. Bill From ronaldoussoren at mac.com Thu Sep 25 09:56:41 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 25 Sep 2008 09:56:41 +0200 Subject: [Pythonmac-SIG] 64-bit single arch framework build In-Reply-To: References: Message-ID: Please file a bug on the python bugtracker, otherwise your patch might get lost. Ronald On 24 Sep, 2008, at 21:45, Chris Kees wrote: > Hi, > > Our group ended up needing a non-universal x86_64 framework build > because > we had trouble building some modules with the non-framework build. > We had > to modify the makefile in two places to get it to work. First we > fixed a > place where configure generates '-arch_only i386'. That fixes the > the build > phase. Then we got rid of some install targets that were trying to > pull in > Carbon code. > > The first problem seems like it could easily be fixed by somebody who > understands the configure script. > > I'm not sure what's going on with the second problem. Is > --disable-toolbox-glue not being handled correctly when the install > target > is generated? It seems like the build phase is skipping the Carbon > dependent > extension modules correctly but install is trying to pull in modules > that > depend on those disabled modules. FYI, here's what were doing: > > ./configure --prefix=${HOME} --with-cxx-main='/usr/bin/mpicxx -arch > x86_64'\ > --enable-framework=${HOME} --disable-toolbox-glue CC='/usr/bin/mpicc > -arch \ > x86_64' CXX='/usr/bin/mpicxx -arch x86_64' LDFLAGS='-framework > Accelerate \ > -arch x86_64' > > Edit Makefile to replace -arch_only i386 with -arch_only x86_64 and > remove > frameworkinstallmaclib and frameworkinstallapps from the altinstall: > target. > > diff Makefile Makefile~ > 457c457 > < -lSystem -lSystemStubs -arch_only x86_64 -install_name > $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) > -compatibility_version $(VERSION) -current_version $(VERSION) ;\ > --- >> -lSystem -lSystemStubs -arch_only i386 -install_name > $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) > -compatibility_version $(VERSION) -current_version $(VERSION) ;\ > 741c741 > < sharedinstall oldsharedinstall > frameworkaltinstallunixtools > --- >> sharedinstall oldsharedinstall frameworkinstallmaclib > frameworkinstallapps frameworkaltinstallunixtools > From ronaldoussoren at mac.com Thu Sep 25 09:50:02 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 25 Sep 2008 09:50:02 +0200 Subject: [Pythonmac-SIG] 64-bit single arch framework build In-Reply-To: References: Message-ID: Please file a bug on the python bugtracker, otherwise your patch might get lost. Ronald On 24 Sep, 2008, at 21:45, Chris Kees wrote: > Hi, > > Our group ended up needing a non-universal x86_64 framework build > because > we had trouble building some modules with the non-framework build. > We had > to modify the makefile in two places to get it to work. First we > fixed a > place where configure generates '-arch_only i386'. That fixes the > the build > phase. Then we got rid of some install targets that were trying to > pull in > Carbon code. > > The first problem seems like it could easily be fixed by somebody who > understands the configure script. > > I'm not sure what's going on with the second problem. Is > --disable-toolbox-glue not being handled correctly when the install > target > is generated? It seems like the build phase is skipping the Carbon > dependent > extension modules correctly but install is trying to pull in modules > that > depend on those disabled modules. FYI, here's what were doing: > > ./configure --prefix=${HOME} --with-cxx-main='/usr/bin/mpicxx -arch > x86_64'\ > --enable-framework=${HOME} --disable-toolbox-glue CC='/usr/bin/mpicc > -arch \ > x86_64' CXX='/usr/bin/mpicxx -arch x86_64' LDFLAGS='-framework > Accelerate \ > -arch x86_64' > > Edit Makefile to replace -arch_only i386 with -arch_only x86_64 and > remove > frameworkinstallmaclib and frameworkinstallapps from the altinstall: > target. > > diff Makefile Makefile~ > 457c457 > < -lSystem -lSystemStubs -arch_only x86_64 -install_name > $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) > -compatibility_version $(VERSION) -current_version $(VERSION) ;\ > --- >> -lSystem -lSystemStubs -arch_only i386 -install_name > $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) > -compatibility_version $(VERSION) -current_version $(VERSION) ;\ > 741c741 > < sharedinstall oldsharedinstall > frameworkaltinstallunixtools > --- >> sharedinstall oldsharedinstall frameworkinstallmaclib > frameworkinstallapps frameworkaltinstallunixtools > From hengist.podd at virgin.net Sat Sep 27 20:51:44 2008 From: hengist.podd at virgin.net (has) Date: Sat, 27 Sep 2008 19:51:44 +0100 Subject: [Pythonmac-SIG] prepping Python appscript 0.19.0 for release Message-ID: Hi all, I'm currently working my way through a list of remaining TODOs with a view to kicking py-appscript 0.19.0 out the door within the next fortnight. I've just committed a bunch of changes to svn; there's still a few items on the TODO list, but I may just (indefinitely?) postpone some or all of those as not being sufficiently important to bother with. Barring any last minute crises of confidence, I'm planning to make this the beta release, which means the API will be frozen and there shouldn't be any more changes barring bug fixes. Appscript is coming up on its fifth birthday now, and I would really like to have a 1.0.0 release out before the end of this year. For one thing, Python 3.0's release is imminent, so I need to fork the codebase soon so I can begin work on supporting that. For another, I have several other projects, embarrassingly overdue commitments, etc. also demanding attention, so the sooner this beast is nailed the sooner I can get on with those. Finally, as a full-time professional AppleScript/Python/Cocoa developer myself now, and currently working on a rather large and really cool Illustrator-based automation project, I would really like to get on with just _using_ the damn thing for a change. ;) So... if anyone wants to look it over to see if it all looks kosher (modules, examples, documentation, etc.), send us any last bug reports, application compatibility problems, feature requests, etc. then this is the time to do it[1]. To check it out from appscript's Subversion repository [2]: svn checkout http://appscript.svn.sourceforge.net/svnroot/appscript/py-appscript/trunk py-appscript-0.19.0-prerelease Many thanks, has [1] IOW, if you have any interest in appscript, please go right now and beat on it like a pi?ata, because this is pretty much your last chance. [2] Or, if anyone needs a prebuilt copy, email me and I'll see what I can do. -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net