From zachary.pincus at yale.edu Tue Jul 1 03:50:15 2008 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Mon, 30 Jun 2008 21:50:15 -0400 Subject: [Pythonmac-SIG] Distribute command-line tools with py2app or similar? In-Reply-To: <48692908.7050007@noaa.gov> References: <48692908.7050007@noaa.gov> Message-ID: Hi Chris, Thanks for your suggestions and help here! I really appreciate it. I wound up building my own installer packages mush as you suggest below, which turned out to be pretty simple to do -- good idea! > I haven't tried this, but can you build python from source, > specifying an alternate install directory? This could give you a > custom build that you could make a mpkg out of. > > you might try: > > ./configure --enable-framework=/Library/Frameworks/MyPython --enable- > universalsdk > > Then make sure that your scripts have your python in their #!lines. > You could probably just built it as a regular old *nix build, too, > rather than a Framework, if all you want to do is run command line > tools. note that you'll probably need to build all the third party > packages you need too. > > I've just tried this, and it seems to work, but I haven't tried > moving it to another machine or anything. It does try to overwrite > the stuff in Applications/MacPython 2.5 Zach From elescargot at hotmail.com Tue Jul 1 11:23:43 2008 From: elescargot at hotmail.com (El Duvelle) Date: Tue, 1 Jul 2008 09:23:43 +0000 Subject: [Pythonmac-SIG] [py2app] how to make a .app running on mac intel 10.5 In-Reply-To: <486911ED.8070408@noaa.gov> References: <4857F006.3040403@noaa.gov> <486911ED.8070408@noaa.gov> Message-ID: First, thanks for the answer! A question : my version of py2app is 0.3.6. Is that the latest ? > Date: Mon, 30 Jun 2008 10:03:41 -0700 > From: Chris.Barker at noaa.gov > CC: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] [py2app] how to make a .app running on mac intel 10.5 > > Wow! lot's of py2app questions lately! > > I'll do my best, but I'm not expert. Unfortunately, the real expert is > Bob Ippolito, whom I have not seen on this list in a good while, and > Ronald Oussoren has been very helpful, but I haven't seen him for a bit > either (not as long, though). > > Anyway, here's my little bit of help: > > El Duvelle wrote: > > > It does works, but the problem is that the launching of my .app on the > > mac with Intel is veeery slow compared to launching on the mac with a > > ppc. And I guess it is so because the computer has to convert the .app > > or something like that... > > nope -- py2app should have built a true Universal package -- it should > launch the same way on Intel and PPC systems. Is there any other > difference that might mater between the two? (disk speed, networked > drives, ...) Well, the most recent and powerful mac is the one with Intel and it's on this mac that my application is very slow. > > It's possible that you got a PPC build, and it's running under Rosetta > (or whatever they call the PPC emulation) on your Intel box -- does it > run slow too, or just launch slow? > Yes, it is running under Rosetta. My program isn't a big one, but what is sure is that it launches very slowly. Concerning the running speed, I see no real difference. > You might try running "file" on the executable in the bundle. It's > inside the .app bundle, in the MacOS dir. This is what I get in one > example of mine: > > ... Converter.app/Contents/MacOS cbarker$ file Converter > > Converter: Mach-O universal binary with 2 architectures > Converter (for architecture i386): Mach-O executable i386 > Converter (for architecture ppc): Mach-O executable ppc well, I don't find this file. I can't even go into MyApp.app on the mac. On windows that's possible but in MacOS I just have two files : python and MyApp; > > Are you building on the PPC machine? Yes I am! And in my 'built' folder, I've got a 'bdist.macosx-10.3-ppc' folder, that's what makes me guess that it's not a universal built. > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig _________________________________________________________________ Caroline vient de mettre ? jour son profil Messenger ! Connectez-vous ! http://login.live.com/login.srf?wa=wsignin1.0&rpsnv=10&ct=1198837564&rver=4.0.1534.0&wp=MBI&wreply=http:%2F%2Fhome.services.spaces.live.com%2F&lc=1036&id=73625 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Tue Jul 1 13:03:41 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 1 Jul 2008 13:03:41 +0200 Subject: [Pythonmac-SIG] semi_standalone option broken in py2app + Leopard Python? In-Reply-To: <4869135F.8080909@noaa.gov> References: <1924073730.84691214582975005.JavaMail.mail@webmail11> <4869135F.8080909@noaa.gov> Message-ID: <7BCDAC83-53C9-415D-93F1-115A68093EE0@mac.com> On 30 Jun, 2008, at 19:09, Christopher Barker wrote: > Hengist Podd wrote: >> I'm trying to build semi-standalone applications against Leopard's >> stock Python 2.5 with an appscript 0.19.0 .egg installed, > > well, py2aqpp is known to have problems with eggs. is that a zipped > egg? If so, it may work better with an unzipped one: > > $ easy_install -Z TheNameOfTheEgg Leopard's stock install of py2app should be able to deal with zipped eggs as wel. Note that py2app needs a considerable amount of attention though: * need enhancements to properly support eggs: - copy entire eggs into the .app bundle, instead of just bits and pieces - support the "entry-point" feature for eggs - an option to specify required eggs in setup.py (like setup_requires, but for a specific app) * support for the ".xib" files as introduced by Xcode 3 * nice to have: support for including a complete python stdlib * nice to have: support for including (and possibly building as well) plugins into the .app bundle (that is, some way to specify that a Quicklook/spotlight/ systemprefs/.... plugin should be copied into the .app bundle) * py2app really needs a testing framework, or at the bare minimum a set of example projects that properly exercise py2app: - PyObjC apps - wxPython apps - PyQT apps - apps using commonly used extentions that give/have given problems (such as matplotlib) - ... There's little chance that I'll be able to actually implement all of this in a reasonably timeframe though. Ronald > > > -Chris > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From pdorange at mac.com Tue Jul 1 13:43:57 2008 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Tue, 1 Jul 2008 13:43:57 +0200 Subject: [Pythonmac-SIG] [py2app] how to make a .app running on mac intel 10.5 In-Reply-To: References: <4857F006.3040403@noaa.gov> <486911ED.8070408@noaa.gov> Message-ID: <80DC913A-2BEC-4A67-9C6A-2F92A2B57302@mac.com> Le 1 juil. 08 ? 11:23, El Duvelle a ?crit : > > > > It's possible that you got a PPC build, and it's running under > Rosetta > > (or whatever they call the PPC emulation) on your Intel box -- > does it > > run slow too, or just launch slow? > > > > Yes, it is running under Rosetta. My program isn't a big one, but > what is sure is that it launches very slowly. Concerning the > running speed, I see no real difference. Rosetta is slow to launch the first time. The second launch must be faster, but not as fast as native application. > > You might try running "file" on the executable in the bundle. It's > > inside the .app bundle, in the MacOS dir. This is what I get in one > > example of mine: > > > > ... Converter.app/Contents/MacOS cbarker$ file Converter > > > > Converter: Mach-O universal binary with 2 architectures > > Converter (for architecture i386): Mach-O executable i386 > > Converter (for architecture ppc): Mach-O executable ppc > > well, I don't find this file. I can't even go into MyApp.app on the > mac. On windows that's possible but in MacOS I just have two > files : python and MyApp; On Mac, to open the bundle, just right-click on the App and select (i literally translate from my french version) : "display package content", for my (MacOS X 10.4) it's the third option in the local menu. Also from the finder, the information box (AppleKey+I) the kinf of app is displayed on the first line : universal, intel or powerpc. Finally the activity monitor (application>utilities show process and also the kind of architecture of the application running). I'm new with python, but on my iMac Intel i install python 2.5 and last py2app and it build Universal application (both PPC and Intel). I got trouble getting things works with py2app and pygame lib but finally, with the help of this group, it works. -- Pierre-Alain Dorange Blog Citoyen de Cognac Le Retour de l'Autruche -------------- next part -------------- An HTML attachment was scrubbed... URL: From hendricks52 at gmail.com Tue Jul 1 17:19:40 2008 From: hendricks52 at gmail.com (Derrick Hendricks) Date: Tue, 1 Jul 2008 11:19:40 -0400 Subject: [Pythonmac-SIG] py2app doesn't include QtOpenGL.so Message-ID: I'm trying to build an app on my 10.5 iMac. This app uses PyQt4 and OpenGL. I'm also cross compiling down to 10.3 universal and using the python 2.4.4 which I got from python.org so I can build the app as "standalone". When I run py2app, it does not copy QtOpenGL.so into the Contents/Resources/lib/python2.4/lib-dynload/PyQt4 directory in the app. The app does import modules from the QtOpenGL module (specifically QGLFormat and others). I'm currently using: Qt 4.3.5 PyQt-mac-gpl-4.3.3 sip 4.7.4 Any help on this is appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robin at alldunn.com Tue Jul 1 17:45:36 2008 From: robin at alldunn.com (Robin Dunn) Date: Tue, 01 Jul 2008 08:45:36 -0700 Subject: [Pythonmac-SIG] semi_standalone option broken in py2app + Leopard Python? In-Reply-To: <7BCDAC83-53C9-415D-93F1-115A68093EE0@mac.com> References: <1924073730.84691214582975005.JavaMail.mail@webmail11> <4869135F.8080909@noaa.gov> <7BCDAC83-53C9-415D-93F1-115A68093EE0@mac.com> Message-ID: <486A5120.9020800@alldunn.com> Ronald Oussoren wrote: > Note that py2app needs a considerable amount of attention though: > > * need enhancements to properly support eggs: > - copy entire eggs into the .app bundle, instead of just bits and pieces > - support the "entry-point" feature for eggs > - an option to specify required eggs in setup.py (like setup_requires, > but for a specific app) Just yesterday I implemented a bit of post setup() code that allows me to inject some eggs into my app bundle after it has been created. First I specify the egg's package name in the packages option so py2app will include the package and do dependency checks on it, but not put it in the zip file. Then after setup() has run I remove these package folders, copy in the egg folders (none of mine are zipped but that should probably work too) and then create a sitecustomize.py in the app to add the eggs to the sys.path. This last step is needed because it looks like the normal .pth file processing is not included in the site.py used in the app bundle. Here is a bit of the code from my setup.py, the two names used in the for loop items are because some eggs use a different egg name than the package name. makingAlias = '-A' in sys.argv or '--alias' in sys.argv if not makingAlias: base = 'dist/%s.app/Contents/Resources/lib/python%s' % (NAME, sys.version[:3]) sc = file(os.path.join(base, 'sitecustomize.py'), 'w') sc.write("import sys, os\nbase = os.path.dirname(__file__)\n") for distname, pkgname in [('Foo', 'foo'), ('Bar', 'bar'), ('xyz', 'xyz')]: dist = pkg_resources.get_distribution(distname) distbase = os.path.basename(dist.location) remove_tree(os.path.join(base, pkgname)) copy_tree(dist.location, os.path.join(base, distbase), update=1, verbose=1) sc.write("sys.path.append(os.path.join(base, '%s'))\n" % distbase) This probably isn't enough to use as a base for general purpose egg support in py2app, but it can at least be used as a stopgap measure until somebody who knows what they are doing can add support for it in the right way. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From vivacarlie at gmail.com Tue Jul 1 18:54:56 2008 From: vivacarlie at gmail.com (Nehemiah Dacres) Date: Tue, 1 Jul 2008 11:54:56 -0500 Subject: [Pythonmac-SIG] easy_install problems in some 10.5.3? In-Reply-To: <792FFE0E-39BC-4165-AC42-943DF7283556@mac.com> References: <792FFE0E-39BC-4165-AC42-943DF7283556@mac.com> Message-ID: <65fadfc30807010954n607f25e1sdc5ee837ac0aeee5@mail.gmail.com> whats that -U option u used for mercurial?, perhaps you can do that to simplejason On Tue, Jun 24, 2008 at 4:19 AM, Oscar Sanchez Casamitjana < oscar.lists at mac.com> wrote: > hi, > > I've recently installed 10.5.3 in a new machine (iMac), and I'm finding > problems with some eggs. some will install and some will not. easy_install > works perfectly in my previous machine (MBP), wich was upgraded > 10.5.0/1/2/3, so i thought it might be related to this, somehow. shell > output follows (sorry, with 3 examples it got a bit long): > > > +++ > # Mercurial (fail!) > > ## iMac > > sudo easy_install mercurial > Searching for mercurial > Reading http://pypi.python.org/simple/mercurial/ > Couldn't retrieve index page for 'mercurial' > Scanning index of all packages (this may take a while) > Reading http://pypi.python.org/simple/ > Reading http://pypi.python.org/simple/Mercurial/ > Reading http://www.selenic.com/mercurial > Best match: mercurial 1.0.1 > Downloading > http://www.selenic.com/mercurial/release/mercurial-1.0.1.tar.gz > Processing mercurial-1.0.1.tar.gz > Running mercurial-1.0.1/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-2jC-l2/mercurial-1.0.1/egg-dist-tmp-roHrOT > zip_safe flag not set; analyzing archive contents... > mercurial.lsprof: module references __file__ > mercurial.templater: module references __file__ > mercurial.version: module references __file__ > No eggs found in > /tmp/easy_install-2jC-l2/mercurial-1.0.1/egg-dist-tmp-roHrOT (setup script > problem?) > > ## MBP > > sudo easy_install -U mercurial > Searching for mercurial > Reading http://pypi.python.org/simple/mercurial/ > Couldn't retrieve index page for 'mercurial' > Scanning index of all packages (this may take a while) > Reading http://pypi.python.org/simple/ > Reading http://pypi.python.org/simple/Mercurial/ > Reading http://www.selenic.com/mercurial > Best match: mercurial 1.0.1 > Downloading > http://www.selenic.com/mercurial/release/mercurial-1.0.1.tar.gz > Processing mercurial-1.0.1.tar.gz > Running mercurial-1.0.1/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-j0zQwd/mercurial-1.0.1/egg-dist-tmp-LPRpFY > zip_safe flag not set; analyzing archive contents... > mercurial.lsprof: module references __file__ > mercurial.templater: module references __file__ > mercurial.version: module references __file__ > Removing mercurial 1.0 from easy-install.pth file > Adding mercurial 1.0.1 to easy-install.pth file > Installing hg script to /usr/local/bin > > Installed > /Library/Python/2.5/site-packages/mercurial-1.0.1-py2.5-macosx-10.5-i386.egg > Processing dependencies for mercurial > Finished processing dependencies for mercurial > > > # simplejson (fail!) > > ## iMac > > sudo easy_install simplejson > Searching for simplejson > Reading http://pypi.python.org/simple/simplejson/ > Reading http://undefined.org/python/#simplejson > Best match: simplejson 1.9.1 > Downloading > http://pypi.python.org/packages/source/s/simplejson/simplejson-1.9.1.tar.gz#md5 > =d2ee608bdf6397b82a7cd53c8602b29e > Processing simplejson-1.9.1.tar.gz > Running simplejson-1.9.1/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-u3TGVn/simplejson-1.9.1/egg-dist-tmp-OeLe4c > No eggs found in > /tmp/easy_install-u3TGVn/simplejson-1.9.1/egg-dist-tmp-OeLe4c (setup script > problem?) > > ## MBP > > sudo easy_install simplejson > Searching for simplejson > Reading http://pypi.python.org/simple/simplejson/ > Reading http://undefined.org/python/#simplejson > Best match: simplejson 1.9.1 > Downloading > http://pypi.python.org/packages/source/s/simplejson/simplejson-1.9.1.tar.gz#md5 > =d2ee608bdf6397b82a7cd53c8602b29e > Processing simplejson-1.9.1.tar.gz > Running simplejson-1.9.1/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-Rudv0U/simplejson-1.9.1/egg-dist-tmp-9XAUrS > Adding simplejson 1.9.1 to easy-install.pth file > > Installed > /Library/Python/2.5/site-packages/simplejson-1.9.1-py2.5-macosx-10.5-i386.egg > Processing dependencies for simplejson > Finished processing dependencies for simplejson > > > # SQLObject (success!) > > ## iMac > > Wintermute:~ oscar$ sudo easy_install SQLObject > Searching for SQLObject > Best match: SQLObject 0.10.2 > Processing SQLObject-0.10.2-py2.5.egg > SQLObject 0.10.2 is already the active version in easy-install.pth > Installing sqlobject-admin script to /usr/local/bin > > Using /Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg > Processing dependencies for SQLObject > Searching for FormEncode>=0.2.2 > Reading http://pypi.python.org/simple/FormEncode/ > Reading http://formencode.org > Reading http://formencode.sf.net > Best match: FormEncode 1.0.1 > Downloading > http://pypi.python.org/packages/2.5/F/FormEncode/FormEncode-1.0.1-py2.5.egg#md5 > =f9bee5c918efc078b8b5ad38f92b1138 > Processing FormEncode-1.0.1-py2.5.egg > creating /Library/Python/2.5/site-packages/FormEncode-1.0.1-py2.5.egg > Extracting FormEncode-1.0.1-py2.5.egg to /Library/Python/2.5/site-packages > Adding FormEncode 1.0.1 to easy-install.pth file > > Installed /Library/Python/2.5/site-packages/FormEncode-1.0.1-py2.5.egg > Finished processing dependencies for SQLObject > > ## MBP > > sudo easy_install SQLObject > Searching for SQLObject > Best match: SQLObject 0.10.2 > Processing SQLObject-0.10.2-py2.5.egg > SQLObject 0.10.2 is already the active version in easy-install.pth > Installing sqlobject-admin script to /usr/local/bin > > Using /Library/Python/2.5/site-packages/SQLObject-0.10.2-py2.5.egg > Processing dependencies for SQLObject > Searching for FormEncode>=0.2.2 > Reading http://pypi.python.org/simple/FormEncode/ > Reading http://formencode.org > Reading http://formencode.sf.net > Best match: FormEncode 1.0.1 > Downloading > http://pypi.python.org/packages/2.5/F/FormEncode/FormEncode-1.0.1-py2.5.egg#md5 > =f9bee5c918efc078b8b5ad38f92b1138 > Processing FormEncode-1.0.1-py2.5.egg > creating /Library/Python/2.5/site-packages/FormEncode-1.0.1-py2.5.egg > Extracting FormEncode-1.0.1-py2.5.egg to /Library/Python/2.5/site-packages > Adding FormEncode 1.0.1 to easy-install.pth file > > Installed /Library/Python/2.5/site-packages/FormEncode-1.0.1-py2.5.egg > Finished processing dependencies for SQLObject > +++ > > > Python version is 2.5.1 (factory) on both machines, and .bash_profile is > mirrored. should I ask on the failing egg lists? any help appreciated. > > > > > regards, > oscar. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- "lalalalala! it's not broken because I can use it" http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kw at codebykevin.com Tue Jul 1 20:18:32 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 01 Jul 2008 14:18:32 -0400 Subject: [Pythonmac-SIG] Code signature/py2app Message-ID: <486A74F8.7060409@codebykevin.com> I'm running into a strange error with py2app on 10.5.3: usr/bin/strip: changes being made to the file will invalidate the code signature in: /Users/kevin/Programming/phynchronicity/dist/Phynchronicity.app/Contents/MacOS/python (for architecture ppc7400) /usr/bin/strip: changes being made to the file will invalidate the code signature in: /Users/kevin/Programming/phynchronicity/dist/Phynchronicity.app/Contents/MacOS/python (for architecture i386) /usr/bin/strip: changes being made to the file will invalidate the code signature in: /Users/kevin/Programming/phynchronicity/dist/Phynchronicity.app/Contents/MacOS/Phynchronicity (for architecture ppc7400) /usr/bin/strip: changes being made to the file will invalidate the code signature in: /Users/kevin/Programming/phynchronicity/dist/Phynchronicity.app/Contents/MacOS/Phynchronicity (for architecture i386) /usr/bin/strip: for architecture ppc64 object: /Users/kevin/Programming/phynchronicity/dist/Phynchronicity.app/Contents/Frameworks/Python.framework/Versions/2.5/Python malformed object (load command 3 cmdsize not a multiple of 8) I'm using a custom universal build of Python 2.5.2 that links to Tk 8.5. Python was built against Tk 8.5.2 and I just updated Tk to 8.5.3. My installation of py2app is a mix of the latest version from PyPi (easy_install py2app) and an SVN version of macholib or modulegraph--can't remember which--that fixed some obscure bugs. This application built without problem when I was using Tk 8.5.2; the only change in my setup is the minor version update of Tk to 8.5.3. I admit I'm not up-to-date on the whole "code-signing" thing--is this something that needs to be taken into account with py2app? In any event, I'm stumped, and would be grateful for any advice. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From kw at codebykevin.com Tue Jul 1 23:01:04 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 01 Jul 2008 17:01:04 -0400 Subject: [Pythonmac-SIG] Code signature/py2app In-Reply-To: <486A74F8.7060409@codebykevin.com> References: <486A74F8.7060409@codebykevin.com> Message-ID: <486A9B10.5040204@codebykevin.com> Kevin Walzer wrote: > This application built without problem when I was using Tk 8.5.2; the > only change in my setup is the minor version update of Tk to 8.5.3. > > I admit I'm not up-to-date on the whole "code-signing" thing--is this > something that needs to be taken into account with py2app? > > In any event, I'm stumped, and would be grateful for any advice. Hmmm....rerunning py2app again solved the problem. App builds fine. Never mind. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From Chris.Barker at noaa.gov Tue Jul 1 23:39:54 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 01 Jul 2008 14:39:54 -0700 Subject: [Pythonmac-SIG] [py2app] how to make a .app running on mac intel 10.5 In-Reply-To: References: <4857F006.3040403@noaa.gov> <486911ED.8070408@noaa.gov> Message-ID: <486AA42A.5050407@noaa.gov> El Duvelle wrote: > A question : my version of py2app is 0.3.6. Is that the latest ? yes, thought there may be something newer in SVN -- Ronald? > > You might try running "file" on the executable in the bundle. It's > > inside the .app bundle, in the MacOS dir. This is what I get in one > > example of mine: > > > > ... Converter.app/Contents/MacOS cbarker$ file Converter > > > > Converter: Mach-O universal binary with 2 architectures > > Converter (for architecture i386): Mach-O executable i386 > > Converter (for architecture ppc): Mach-O executable ppc > > well, I don't find this file. I can't even go into MyApp.app on the mac. you can get there with the command line, or by right clicking and selecting "Show Package Contents" > Yes I am! And in my 'built' folder, I've got a 'bdist.macosx-10.3-ppc' > folder, that's what makes me guess that it's not a universal built. well, I think that's all I get too -- because you are building on ppc, but the enclosed binaries should be universal. I suspect you are running pyapp with a PPC-only python. Are you sure you're using the Universal build? type: $ which python to see what gets run when you type python. Then see what it there. I get: $ which python /Library/Frameworks/Python.framework/Versions/Current/bin/python then: $ file /Library/Frameworks/Python.framework/Versions/Current/bin/python/Library/Frameworks/Python.framework/Versions/Current/bin/python: symbolic link to `python2.5' so I try: $ file /Library/Frameworks/Python.framework/Versions/Current/bin/python/Library/Frameworks/Python.framework/Versions/Current/bin/python2.5 and I get: /Library/Frameworks/Python.framework/Versions/Current/bin/python2.5: Mach-O universal binary with 2 architectures /Library/Frameworks/Python.framework/Versions/Current/bin/python2.5 (for architecture i386): Mach-O executable i386 /Library/Frameworks/Python.framework/Versions/Current/bin/python2.5 (for architecture ppc): Mach-O executable ppc indicating that I'm running a Universal python. -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 blair at orcaware.com Tue Jul 1 16:29:16 2008 From: blair at orcaware.com (Blair Zajac) Date: Tue, 1 Jul 2008 07:29:16 -0700 Subject: [Pythonmac-SIG] 64-bit Python? In-Reply-To: References: <302611.62100.qm@web52111.mail.re2.yahoo.com> Message-ID: <013D636B-AE5E-4AF7-AC00-52E74A7B863E@orcaware.com> On May 29, 2008, at 3:13 PM, Boyd Waters wrote: > > On May 29, 2008, at 2:53 PM, Frank Schima wrote: > >> I have the latest Mac Pro with 10.5.3. I ran the sys.maxint test >> and got the 32-bit result. I tried both the Apple python and the >> MacPorts python 2.5.2. > > > The MacPorts 2.5.2 doesn't have my 64-bit hacks in it. I'm not sure > what the consequences of 64-bit Python will be with respect to other > Python packages, so I haven't committed the changes. And I ran into > a problem compiling this on Tiger with GNU (non-Apple-patched) GCC > 4.2.1. > > But it's really 64-bit Python here, I think: > > $ /usr/bin/python -c 'import sys; print sys.maxint' > 2147483647 > > $ /opt/casa/core2-apple-darwin9/3rd-party/bin/python -c 'import sys; > print sys.maxint' > 9223372036854775807 > > > Here's the MacPorts port: > > > > > > You might unpack this thing into your MacPorts tree like this: > > tar xjvf ~/Downloads/python25.tbz -C $(port dir python25)/.. > > and then do a port update python25 > > ... but I haven't tested that path. > > I can post a binary on a web site if anyone is interested in testing > this; it's a quad-architecture Framework build. > > Be careful out there... How would a quad-architecture build work with other C/C++ modules? Having a 64-bit itself would be nice, but that would require all Python modules also be compiled in 64-bit, such as Qt, Subversion, anything that is a C/C++ package on its own that has a Python module. So I think the ramifications of going to a pure 64-bit Python would be large and would have to be decided by MacPorts group as a whole if we want to move in that direction. Regards, Blair -- Blair Zajac, Ph.D. CTO, OrcaWare Technologies Subversion training, consulting and support http://www.orcaware.com/svn/ From bwaters at nrao.edu Wed Jul 2 04:17:08 2008 From: bwaters at nrao.edu (Boyd Waters) Date: Tue, 1 Jul 2008 20:17:08 -0600 Subject: [Pythonmac-SIG] 64-bit Python? In-Reply-To: <013D636B-AE5E-4AF7-AC00-52E74A7B863E@orcaware.com> References: <302611.62100.qm@web52111.mail.re2.yahoo.com> <013D636B-AE5E-4AF7-AC00-52E74A7B863E@orcaware.com> Message-ID: <970BFEE1-53DE-4B39-80AB-6971D3F1EDD6@nrao.edu> On Jul 1, 2008, at 8:29 AM, Blair Zajac wrote: > How would a quad-architecture build work with other C/C++ modules? I haven't tested other modules yet; I'm still building quad- architecture GCC 4.2.4 with AT&T and Apple patches. Got that MacPorted yesterday after two weeks' work... now we have a gfortran that plays nice with Apple-patched GCC, I think. > Having a 64-bit itself would be nice, but that would require all > Python modules also be compiled in 64-bit, such as Qt, Subversion, > anything that is a C/C++ package on its own that has a Python > module. So I think the ramifications of going to a pure 64-bit > Python would be large and would have to be decided by MacPorts group > as a whole if we want to move in that direction. Yes, I am hoping to build up our local NRAO/CASA package toolchain quad-architecture. I don't know how far I can get. I already have an Intel 32/64-bit Qt; that's TrollTech's Cocoa version (expected to release as Qt 4.5). I would need to build all of SciPy quad-arch to make this fly... - boyd Boyd Waters Scientific Programmer National Radio Astronomy Observatory Socorro, New Mexico From elescargot at hotmail.com Wed Jul 2 10:59:10 2008 From: elescargot at hotmail.com (El Duvelle) Date: Wed, 2 Jul 2008 08:59:10 +0000 Subject: [Pythonmac-SIG] [py2app] how to make a .app running on mac intel 10.5 In-Reply-To: <80DC913A-2BEC-4A67-9C6A-2F92A2B57302@mac.com> References: <4857F006.3040403@noaa.gov> <486911ED.8070408@noaa.gov> <80DC913A-2BEC-4A67-9C6A-2F92A2B57302@mac.com> Message-ID: Well, today I tried again to launch my app on the mac with Intel, first by launching the file in 'MyApp.app/Contents/MacOS', and the speed was OK. Then I launched the MyApp.app just to try, and the speed was ok too! Whereas before it took at least 10 secondes, this time it was instantaneous. I don't understand why, I don't think I changed anything... So I thank you all because my problem is solved. By the way, with your indications I managed to see that my python and my app were universal. So it is normal that the speed is ok. I just don't undersand why it was so slow before. Thanks a lot to everybody! Eleonore Le 1 juil. 08 ? 11:23, El Duvelle a ?crit :> It's possible that you got a PPC build, and it's running under Rosetta > (or whatever they call the PPC emulation) on your Intel box -- does it > run slow too, or just launch slow? > Yes, it is running under Rosetta. My program isn't a big one, but what is sure is that it launches very slowly. Concerning the running speed, I see no real difference. Rosetta is slow to launch the first time.The second launch must be faster, but not as fast as native application. > You might try running "file" on the executable in the bundle. It's > inside the .app bundle, in the MacOS dir. This is what I get in one > example of mine: > > ... Converter.app/Contents/MacOS cbarker$ file Converter > > Converter: Mach-O universal binary with 2 architectures > Converter (for architecture i386): Mach-O executable i386 > Converter (for architecture ppc): Mach-O executable ppc well, I don't find this file. I can't even go into MyApp.app on the mac. On windows that's possible but in MacOS I just have two files : python and MyApp;On Mac, to open the bundle, just right-click on the App and select (i literally translate from my french version) : "display package content", for my (MacOS X 10.4) it's the third option in the local menu. Also from the finder, the information box (AppleKey+I) the kinf of app is displayed on the first line : universal, intel or powerpc.Finally the activity monitor (application>utilities show process and also the kind of architecture of the application running). I'm new with python, but on my iMac Intel i install python 2.5 and last py2app and it build Universal application (both PPC and Intel).I got trouble getting things works with py2app and pygame lib but finally, with the help of this group, it works. _________________________________________________________________ Pendant tout l'?t?, consultez vos emails Hotmail sur votre mobile ! http://www.messengersurvotremobile.com/?d=hotmail -------------- next part -------------- An HTML attachment was scrubbed... URL: From hengist.podd at virgin.net Wed Jul 2 18:27:21 2008 From: hengist.podd at virgin.net (Hengist Podd) Date: Wed, 2 Jul 2008 16:27:21 +0000 (GMT) Subject: [Pythonmac-SIG] semi_standalone option broken in py2app + Leopard Python? Message-ID: <75083314.715361215016041844.JavaMail.mail@webmail08> An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Wed Jul 2 20:46:50 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 02 Jul 2008 11:46:50 -0700 Subject: [Pythonmac-SIG] [py2app] how to make a .app running on mac intel 10.5 In-Reply-To: References: <4857F006.3040403@noaa.gov> <486911ED.8070408@noaa.gov> <80DC913A-2BEC-4A67-9C6A-2F92A2B57302@mac.com> Message-ID: <486BCD1A.7070904@noaa.gov> El Duvelle wrote: > I just don't undersand why it was so slow before. Well, it's the mysteries that make life interesting! One thought, though. Apple's Finder seems to cache info about applications, so it's possible that it thought it was a PPC-only app from some earlier version, and had not updated its cache yet. I'm run into this with icons - if you build a .app bundle with one icon (or none), then re-build it with a new icon, the Finder often doesn't show the new icon, reverting to the one it had cached. Just a wild guess! -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 ed at leafe.com Wed Jul 2 21:42:58 2008 From: ed at leafe.com (Ed Leafe) Date: Wed, 2 Jul 2008 14:42:58 -0500 Subject: [Pythonmac-SIG] Py2app - problem building with a localized package In-Reply-To: <486925C4.9070008@noaa.gov> References: <20C302AD-C5CA-4419-BC4B-E9100163B857@leafe.com> <486925C4.9070008@noaa.gov> Message-ID: <1B8D282A-36AF-4E16-B808-526E9C9E4453@leafe.com> On Jun 30, 2008, at 1:28 PM, Christopher Barker wrote: > The solution is to force include these. It looks like a dabo recipe > is in order. Take a look at the matplotlib recipe -- it needs to > include a bunch of data files also. > > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- > packages/py2app-0.4.2-py2.5.egg/py2app/recipes > > Actually, looking there, it looks like it's as simple as explicitly > include the dabo package. OK, not exactly sure how these recipes work, but here's what I did: - copied matplotlib.py to dabo.py - added 'import dabo' to __init__.py in recipes - changed dabo.py to read: def check(cmd, mf): m = mf.findNode('dabo') if m is None or m.filename is None: return None return dict( packages = ['dabo'] ) - compiled dabo.py to dabo.pyc - re-ran the build scripts I do see all the Dabo localization files being copied over in the build process, as well as the 'using recipe' message for dabo. But now when I run the generated app, I get the error message: ImportError: no module named dabo. If I view the Contents of the generated app, I see the full dabo directory and subdirectories, located in Resources/lib/python2.5/. So it seems like I'm getting closer, but don't understand enough to figure out why the main script of the app can't find the dabo module. Any insights? -- Ed Leafe From cliff at cliffandkim.org Fri Jul 4 18:02:16 2008 From: cliff at cliffandkim.org (Clifford Meece) Date: Fri, 4 Jul 2008 11:02:16 -0500 Subject: [Pythonmac-SIG] py2app and svn Message-ID: <0C3CF416-908A-4D83-B642-C9B1A4A23A83@cliffandkim.org> Hi, This isn't a question about py2app per se, but more around development practices. I have a small app written in python and wxpython. I have successfully used py2app to make re-distributable packages for my code. Now I have decided to commit my work to svn to track my changes and protect my time investment. My question is: how do people generally handle commits of the build and dist directory? Initially I just committed my working directory so I have my source and my build/* and dist/* in svn, which is probably not necessary. What kind of build and release process is 'typical' with a py2app-based project? should I keep my source in a seperate directory and just commit it? After I build, should I then commit the resulting packaged .app? Any experiences, practices or opinions would help. thanks, Cliff From afraud at gmail.com Sat Jul 5 15:49:17 2008 From: afraud at gmail.com (Nate) Date: Sat, 5 Jul 2008 09:49:17 -0400 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) Message-ID: I've been trying to increase the font size inside IDLE. The documentation refers to an "Options menu" that seems to be eluding me in the Mac flavor of IDLE. Could someone please help me? -------------- next part -------------- An HTML attachment was scrubbed... URL: From oscar.lists at mac.com Sun Jul 6 09:54:57 2008 From: oscar.lists at mac.com (Oscar Sanchez Casamitjana) Date: Sun, 06 Jul 2008 09:54:57 +0200 Subject: [Pythonmac-SIG] easy_install problems in some 10.5.3? In-Reply-To: <65fadfc30807010954n607f25e1sdc5ee837ac0aeee5@mail.gmail.com> References: <792FFE0E-39BC-4165-AC42-943DF7283556@mac.com> <65fadfc30807010954n607f25e1sdc5ee837ac0aeee5@mail.gmail.com> Message-ID: <2A5E5056-A40B-49B2-B393-7DC4B15F36DD@mac.com> sorry, been on vacations... thanks for answering Nehemiah. On Jul 1, 2008, at 6:54 PM, Nehemiah Dacres wrote: > whats that -U option u used for mercurial? I was upgrading the MBP from older versions, and slipped it in via copypaste. anyways something strange happened, since now I could install Mercurial on the iMac, where it failed before: sudo easy_install mercurial Searching for mercurial Best match: mercurial 1.0.1 Adding mercurial 1.0.1 to easy-install.pth file Using /Library/Python/2.5/site-packages Processing dependencies for mercurial Finished processing dependencies for mercurial the log is quite different than it was the previous times on the iMac, and than those on the MBP. > perhaps you can do that to simplejason still no dice: sudo easy_install -U simplejson Searching for simplejson Reading http://pypi.python.org/simple/simplejson/ Reading http://undefined.org/python/#simplejson Best match: simplejson 1.9.1 Downloading http://pypi.python.org/packages/source/s/simplejson/simplejson-1.9.1.tar.gz#md5 =d2ee608bdf6397b82a7cd53c8602b29e Processing simplejson-1.9.1.tar.gz Running simplejson-1.9.1/setup.py -q bdist_egg --dist-dir /tmp/ easy_install-yY3N3D/simplejson-1.9.1/egg-dist-tmp-AB3qlf No eggs found in /tmp/easy_install-yY3N3D/simplejson-1.9.1/egg-dist- tmp-AB3qlf (setup script problem?) this one does not bother me, since I was only trying to make the point that I may have a problem with my easy_install... From pdorange at mac.com Sat Jul 5 13:34:32 2008 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Sat, 5 Jul 2008 13:34:32 +0200 Subject: [Pythonmac-SIG] [pygame][py2app] strange behaviour with mixer.music Message-ID: <1ijlxoz.1ebthz2d9ubggN%pdorange@mac.com> note : fu2 gmane.comp.python.pygame I currently develop my first small game with python on MacOS X. i add a background music and it works fine with python interpreted. Bu now when a build my bundle (with py2app), it bundle broke when loading the music with a strange error message. The source code : import os, pygame from pygame.locals import * pygame.init() [...] pygame.mixer.music.load(fname) pygame.mixer.music.set_volume(pref.musicvolume) pygame.mixer.music.play(-1) Works interpreted. Broke when bundled with py2app : File "/Volumes/Documents/PAD/Dev/PyGame/MicroWar/Source/dist/MicroWar.app/Con tents/Resources/microwar.py", line 1721, in main pygame.mixer.music.load(fname) AttributeError: 'module' object has no attribute 'music' 2008-07-05 13:30:40.741 MicroWar[918] MicroWar Error 2008-07-05 13:30:40.741 MicroWar[918] MicroWar Error An unexpected error has occurred during execution of the main script AttributeError: 'module' object has no attribute 'music' From hraban at fiee.net Sun Jul 6 11:08:36 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sun, 6 Jul 2008 11:08:36 +0200 Subject: [Pythonmac-SIG] [pygame][py2app] strange behaviour with mixer.music In-Reply-To: <1ijlxoz.1ebthz2d9ubggN%pdorange@mac.com> References: <1ijlxoz.1ebthz2d9ubggN%pdorange@mac.com> Message-ID: <6F2EFB63-BA66-47E9-B0A6-7C45A9B8BFA0@fiee.net> Am 2008-07-05 um 13:34 schrieb Pierre-Alain Dorange: > The source code : > import os, pygame > from pygame.locals import * > > File > "/Volumes/Documents/PAD/Dev/PyGame/MicroWar/Source/dist/MicroWar.app/ > Con > tents/Resources/microwar.py", line 1721, in main > pygame.mixer.music.load(fname) > AttributeError: 'module' object has no attribute 'music' > 2008-07-05 13:30:40.741 MicroWar[918] MicroWar Error > 2008-07-05 13:30:40.741 MicroWar[918] MicroWar Error > An unexpected error has occurred during execution of the main script > > AttributeError: 'module' object has no attribute 'music' Try importing pygame.mixer.music or add that dependency in your setup.y, maybe the dependency tree is not traversable for setuptools. Did you include your data files (esp. the music) in setup.py? Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From pdorange at mac.com Sun Jul 6 22:38:27 2008 From: pdorange at mac.com (Pierre-Alain Dorange) Date: Sun, 6 Jul 2008 22:38:27 +0200 Subject: [Pythonmac-SIG] [pygame][py2app] strange behaviour with mixer.music References: <1ijlxoz.1ebthz2d9ubggN%pdorange@mac.com> <6F2EFB63-BA66-47E9-B0A6-7C45A9B8BFA0@fiee.net> Message-ID: <1ijohcl.17kmkyjma8wjqN%pdorange@mac.com> Henning Hraban Ramm wrote: > Try importing pygame.mixer.music or add that dependency in your > setup.y, maybe the dependency tree is not traversable for setuptools. import pygame.mixer.music make an error : ImportError: No module named music > Did you include your data files (esp. the music) in setup.py? Yes the music is in the bundle From hraban at fiee.net Sun Jul 6 23:25:23 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sun, 6 Jul 2008 23:25:23 +0200 Subject: [Pythonmac-SIG] [pygame][py2app] strange behaviour with mixer.music In-Reply-To: <1ijohcl.17kmkyjma8wjqN%pdorange@mac.com> References: <1ijlxoz.1ebthz2d9ubggN%pdorange@mac.com> <6F2EFB63-BA66-47E9-B0A6-7C45A9B8BFA0@fiee.net> <1ijohcl.17kmkyjma8wjqN%pdorange@mac.com> Message-ID: <646AAA91-5905-4BFE-86A3-855D922D5186@fiee.net> Am 2008-07-06 um 22:38 schrieb Pierre-Alain Dorange: > Henning Hraban Ramm wrote: > >> Try importing pygame.mixer.music or add that dependency in your >> setup.y, maybe the dependency tree is not traversable for setuptools. > > import pygame.mixer.music > make an error : ImportError: No module named music > >> Did you include your data files (esp. the music) in setup.py? > > Yes the music is in the bundle mixer and mixer.music are compiled modules (.so), maybe there's the problem. Can't help you further, sorry. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From Chris.Barker at noaa.gov Mon Jul 7 20:29:12 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 07 Jul 2008 11:29:12 -0700 Subject: [Pythonmac-SIG] py2app and svn In-Reply-To: <0C3CF416-908A-4D83-B642-C9B1A4A23A83@cliffandkim.org> References: <0C3CF416-908A-4D83-B642-C9B1A4A23A83@cliffandkim.org> Message-ID: <48726078.5020809@noaa.gov> Clifford Meece wrote: > My question is: how do people generally handle commits of the build and > dist directory? Initially I just committed my working directory so I > have my source and my build/* and dist/* in svn, which is probably not > necessary. nope. In general, the rule with SVN (and other version control) is that you don't put generated files into the repository, so I'd leave out build and dist. Make sure you do have everything you need to build your app in there though -- setup.py, etc. > After I build, should I then commit the resulting > packaged .app? nope. Usually, binaries are distributed in a different way than SVN. *.app bundles are pretty big, and everything in them may get flagged as changed by SVN each time you re-build. I'm not sure on that point, but if so, you'll have a LOT of data to store and transfer each time. > Any experiences, practices or opinions would help. Check out Alias mode of py2app too -- it's a great way to have a points-and-clickable, drag-and-dropable, etc. app to work with while you are developing. Once it's setup, you can change code, "svn update", etc, and get the new version clickable. I even have the Alias Bundles for a couple apps under development in my Dock for easy access. -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 kevinwatters at gmail.com Wed Jul 9 15:47:41 2008 From: kevinwatters at gmail.com (Kevin Watters) Date: Wed, 9 Jul 2008 13:47:41 +0000 (UTC) Subject: [Pythonmac-SIG] =?utf-8?q?py2app=2C_optimize=3D2=2C_and_=5F=5Fdeb?= =?utf-8?q?ug=5F=5F?= Message-ID: When I enable optimize=2 for our app, py2app successfully compiles all the Python to .PYO files, but the .app it creates fails at the very first import in __boot__.py. With some log statements, I see that __debug__ is still True when I run the .app -- which explains why Python will not find the standard library. __debug__ has to be off for Python to read PYOs. Do I need to inject -OO into the execution of the Python process manually, somehow? I didn't see the right place to do it in main.c, but I'm sure there's a way. Has anyone else tried py2app's optimize flag? From gherman at darwin.in-berlin.de Sun Jul 13 00:47:18 2008 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Sun, 13 Jul 2008 00:47:18 +0200 Subject: [Pythonmac-SIG] Using NSViewAnimation Message-ID: <570C855C-D0C6-4194-8DE7-F187247D0491@darwin.in-berlin.de> Hi, I'm trying for the first time to use NSViewAnimation in an NSView.mouseDown_() method like in this code below: def mouseDown_(self, event): "Animate frame expansion." viewFrame = self.frame() newFrame = ( (viewFrame[0][0]-5, viewFrame[0][1]-5), (viewFrame[1][0]+10, viewFrame[1][1]+10) ) viewDict = { NSViewAnimationTargetKey: self, NSViewAnimationStartFrameKey: viewFrame, NSViewAnimationEndFrameKey: newFrame, } anim = NSViewAnimation.alloc().initWithViewAnimations_([viewDict]) anim.setDuration_(1.0) anim.setAnimationCurve_(NSAnimationEaseIn) anim.startAnimation() # anim.release() But when klicking an item I get an exception like this: Traceback (most recent call last): File "simpleedit0.py", line 225, in main() File "simpleedit0.py", line 221, in main AppHelper.runEventLoop() File "/usr/local/lib/python2.5/site-packages/PyObjC/PyObjCTools/ AppHelper.py", line 237, in runEventLoop NSApp().run() ValueError: NSInvalidArgumentException - Class OC_PythonObject: no such selector: rectValue Has anybody else used NSViewAnimation successfully? Or could a reason for this be the fact that I'm using a single Python script without any Xcode or NIB files? Thanks, Dinu From honeym00n at gmx.net Sun Jul 13 22:54:23 2008 From: honeym00n at gmx.net (Markus) Date: Sun, 13 Jul 2008 22:54:23 +0200 Subject: [Pythonmac-SIG] py2app creates 90 MB .app Message-ID: <9712D64F-0EB2-4959-81C2-AA54D6F68741@gmx.net> Hi, My application depends on Python and wxPython. I am creating a .app- file with py2app under Leopard. Python 2.5.2 and wxPython 2.8.8.0. The file size of the app is 90 MB for "python setup.py py2app": Frameworks/libwx_macud-2.8.0.dylib is 21 MB Frameworks/Python.framework is 5 MB Resources/lib/python2.5/lib-dynload/wx is 61 MB If I remember correctly that the file size used to be around 15-30 MB when I used the prepackaged Python, wxPython and py2app. Which would match the size with the listed frameworks but without the wx folder within "Resources". Seems to me like it is packaged twice. The file size of the app is 75 MB for "python setup.py py2app -s": Frameworks/libwx_macud-2.8.0.dylib is 21 MB Frameworks/Python.framework is NOT present Resources/lib/python2.5/ is 53 MB Excluding wx with "python setup.py py2app -e wx" results in a file 15 MB in size (which does not work). When I use py2exe the resulting file is 10 MB in size. I found a similar discussion but was not able to extract any solution: http://lists.wxwidgets.org/pipermail/wxpython-users/2007-March/062320.html Any help appreciated. Regards, Markus From pascal.bompard at gmail.com Mon Jul 14 03:23:15 2008 From: pascal.bompard at gmail.com (Pascal Bompard) Date: Mon, 14 Jul 2008 09:23:15 +0800 Subject: [Pythonmac-SIG] Yet another problem with path Message-ID: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> The problem I am experiencing is that I can run a Python script successfully if I use the full path to the script, but I can't run it otherwise. I have checked and set my $PATH as well as $PYTHONPATH to be correct. Also, the sys.path has a correct reference. I have also confirmed that permissions are correct for the script file and it's directory. So basically, everything seems correct but clearly isn't. I'm at my wits end, so any help would be much appreciated. I perhaps should add that while I am a long time Mac user, I am a not very familiar with the Terminal, so perhaps am missing something obvious to everyone else. I will include some terminal output below to help with diagnostics: Successful attempt: ---------------------------------------- pascal$ python /Users/pascal/Documents/Python/Dev/myapps/test.py Unsuccessful attempt: ---------------------------------------- pascal$ python test.py /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/ Python.app/Contents/MacOS/Python: can't open file 'test.py': [Errno 2] No such file or directory $PATH output: ---------------------------------------- pascal$ $PATH -bash: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/pascal/ Documents/Python/Dev/myapps:/usr/X11/bin: No such file or directory $PYTHONPATH output: ---------------------------------------- pascal$ $PYTHONPATH -bash: /Users/pascal/Documents/Python/Dev:/Users/pascal/Documents/ Python/Dev/myapps:/Users/pascal/Documents/Python/Dev/mylib:: No such file or directory And lastly, sys.path output: ---------------------------------------- >>> import sys >>> print sys.path ['', '/Users/pascal/Documents/Python/Dev', '/Users/pascal/Documents/ Python/Dev/myapps', '/Users/pascal/Documents/Python/Dev/mylib', '/ Users/pascal', '/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', '/System/Library/ Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC'] From kw at codebykevin.com Mon Jul 14 03:30:24 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Sun, 13 Jul 2008 21:30:24 -0400 Subject: [Pythonmac-SIG] Yet another problem with path In-Reply-To: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> References: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> Message-ID: <487AAC30.2080808@codebykevin.com> Pascal Bompard wrote: > > I will include some terminal output below to help with diagnostics: > > Successful attempt: > ---------------------------------------- > pascal$ python /Users/pascal/Documents/Python/Dev/myapps/test.py > > Unsuccessful attempt: > ---------------------------------------- > pascal$ python test.py > /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python: > can't open file 'test.py': [Errno 2] No such file or directory If you are not including the full path to your Python script, then you need to change the working directory in Terminal to be the same as the script. Try this command: cd /Users/pascal/Documents/Python/Dev/myapps python test.py -- Kevin Walzer Code by Kevin http://www.codebykevin.com From pascal.bompard at gmail.com Mon Jul 14 03:41:35 2008 From: pascal.bompard at gmail.com (Pascal Bompard) Date: Mon, 14 Jul 2008 09:41:35 +0800 Subject: [Pythonmac-SIG] Yet another problem with path In-Reply-To: <487AAC30.2080808@codebykevin.com> References: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> <487AAC30.2080808@codebykevin.com> Message-ID: <6FFC88EC-39E1-4A18-8D71-5ED6206094B6@gmail.com> Yes, I am aware that I could do that. I chose to only demonstrate the full path method rather than both ways to access the file in my example. The problem remains though, that every time I want to run a script in that directory, I'd have to type out the entire path, which is not ideal. Surely there must be a work around to allow me to only type in the script name, at least I assume there must be? > If you are not including the full path to your Python script, then > you need to change the working directory in Terminal to be the same > as the script. > > Try this command: > > cd /Users/pascal/Documents/Python/Dev/myapps > python test.py >> I will include some terminal output below to help with diagnostics: >> Successful attempt: >> ---------------------------------------- >> pascal$ python /Users/pascal/Documents/Python/Dev/myapps/test.py >> Unsuccessful attempt: >> ---------------------------------------- >> pascal$ python test.py >> /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/ >> Python.app/Contents/MacOS/Python: can't open file 'test.py': [Errno >> 2] No such file or directory > From kw at codebykevin.com Mon Jul 14 03:50:12 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Sun, 13 Jul 2008 21:50:12 -0400 Subject: [Pythonmac-SIG] Yet another problem with path In-Reply-To: <6FFC88EC-39E1-4A18-8D71-5ED6206094B6@gmail.com> References: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> <487AAC30.2080808@codebykevin.com> <6FFC88EC-39E1-4A18-8D71-5ED6206094B6@gmail.com> Message-ID: <487AB0D4.6080607@codebykevin.com> Pascal Bompard wrote: > Yes, I am aware that I could do that. I chose to only demonstrate the > full path method rather than both ways to access the file in my example. > > The problem remains though, that every time I want to run a script in > that directory, I'd have to type out the entire path, which is not ideal. > > Surely there must be a work around to allow me to only type in the > script name, at least I assume there must be? I guess I'm confused. There are only two ways to run a script: with the absolute path to the script, or with a relative path (from the same directory as the script, or with the path to the script in another directory in the same path hierarchy, i.e. "python foo/myscript.py," in a subdirectory called foo). All the variables you have set--$PATH, etc.-- help Terminal know where Python is. They do not help Python know where your script is. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From pascal.bompard at gmail.com Mon Jul 14 04:07:36 2008 From: pascal.bompard at gmail.com (Pascal Bompard) Date: Mon, 14 Jul 2008 10:07:36 +0800 Subject: [Pythonmac-SIG] Yet another problem with path In-Reply-To: <487AB0D4.6080607@codebykevin.com> References: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> <487AAC30.2080808@codebykevin.com> <6FFC88EC-39E1-4A18-8D71-5ED6206094B6@gmail.com> <487AB0D4.6080607@codebykevin.com> Message-ID: <0EFC7A38-5599-460C-99F9-2A0FD59C59BA@gmail.com> I see what you are saying. It didn't occur to me that Python would not use any of those variables, not even $PYTHONPATH. Thank you for pointing that out. I suppose the next best strategy should be to look into using a terminal shortcut to at least make the "cd" to the directory a bit less painful. > I guess I'm confused. There are only two ways to run a script: with > the absolute path to the script, or with a relative path (from the > same directory as the script, or with the path to the script in > another directory in the same path hierarchy, i.e. "python foo/ > myscript.py," in a subdirectory called foo). > > All the variables you have set--$PATH, etc.-- help Terminal know > where Python is. They do not help Python know where your script is. >> Yes, I am aware that I could do that. I chose to only demonstrate >> the full path method rather than both ways to access the file in my >> example. >> The problem remains though, that every time I want to run a script >> in that directory, I'd have to type out the entire path, which is >> not ideal. >> Surely there must be a work around to allow me to only type in the >> script name, at least I assume there must be? From pascal.bompard at gmail.com Mon Jul 14 06:29:03 2008 From: pascal.bompard at gmail.com (Pascal Bompard) Date: Mon, 14 Jul 2008 12:29:03 +0800 Subject: [Pythonmac-SIG] Yet another problem with path In-Reply-To: <0EFC7A38-5599-460C-99F9-2A0FD59C59BA@gmail.com> References: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> <487AAC30.2080808@codebykevin.com> <6FFC88EC-39E1-4A18-8D71-5ED6206094B6@gmail.com> <487AB0D4.6080607@codebykevin.com> <0EFC7A38-5599-460C-99F9-2A0FD59C59BA@gmail.com> Message-ID: <8994BD10-E0FD-444F-A075-FE2574634F97@gmail.com> The fix I have working for this now is to use a symbolic link to the directory where I keep my scripts. Not quite as clean as just using the script name, but certainly better than typing out a long direct path. > I see what you are saying. It didn't occur to me that Python would > not use any of those variables, not even $PYTHONPATH. Thank you for > pointing that out. > > I suppose the next best strategy should be to look into using a > terminal shortcut to at least make the "cd" to the directory a bit > less painful. > >> I guess I'm confused. There are only two ways to run a script: with >> the absolute path to the script, or with a relative path (from the >> same directory as the script, or with the path to the script in >> another directory in the same path hierarchy, i.e. "python foo/ >> myscript.py," in a subdirectory called foo). >> >> All the variables you have set--$PATH, etc.-- help Terminal know >> where Python is. They do not help Python know where your script is. > >>> Yes, I am aware that I could do that. I chose to only demonstrate >>> the full path method rather than both ways to access the file in >>> my example. >>> The problem remains though, that every time I want to run a script >>> in that directory, I'd have to type out the entire path, which is >>> not ideal. >>> Surely there must be a work around to allow me to only type in the >>> script name, at least I assume there must be? From mariano.difelice at gmail.com Mon Jul 14 15:18:02 2008 From: mariano.difelice at gmail.com (Mariano Di Felice) Date: Mon, 14 Jul 2008 15:18:02 +0200 Subject: [Pythonmac-SIG] py2app & PIL Message-ID: <487B520A.9000102@gmail.com> Hi, I have a simple app called test.py as follow: import Image import traceback try: print "IMAGE: %s" % Image print "DIR: %s" % dir(Image) pil = Image.new("RGB", (300,300)) pil.save("test.jpg") except: traceback.print_exc() and I've created a setup.py for py2app creation app: import os from setuptools import setup packageroot = "/Users/rikorda/Desktop/test" APP = ['test.py'] DATA_FILES = [] packages = [] includes = [] py2app_options = dict( site_packages=True, includes=includes, packages=packages, optimize=1, compressed=True, ) setup( app=APP, options=dict( py2app=py2app_options, ), setup_requires=['py2app'], ) well, compilation and app creation works fine, but when I run the app, I have this error: ImportError: The imaging C module is not installed (during execution of Image.new ) I've tried to include package PIL, adding it to packages viriable: packages = ['PIL'] but I obtain: No module named Image I compile this app in my minimac with Lepard 10.5.4 OS, and I use python2.5 and PIL 1.1.6 compiled from source ( because I need an UniversalBinary app, then I've downloaded freetype2.3.5 and jpeg6b source and I've compiled it with CFLAG -arch ppc -arch i386 ). This problem is revelead when I run my app in another Mac ( where there's no library installed ). I've tried install ready dmg PIL from here ( http://pythonmac.org/packages/py25-fat/dmg/PIL-1.1.6-py2.5-macosx10.4-2007-05-18.dmg ), but I obtain a strange error FT_Load_Glyph.... Please help me, I have no more ideas about.... thx From bwinton at latte.ca Mon Jul 14 16:31:57 2008 From: bwinton at latte.ca (Blake Winton) Date: Mon, 14 Jul 2008 10:31:57 -0400 Subject: [Pythonmac-SIG] Yet another problem with path In-Reply-To: <8994BD10-E0FD-444F-A075-FE2574634F97@gmail.com> References: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> <487AAC30.2080808@codebykevin.com> <6FFC88EC-39E1-4A18-8D71-5ED6206094B6@gmail.com> <487AB0D4.6080607@codebykevin.com> <0EFC7A38-5599-460C-99F9-2A0FD59C59BA@gmail.com> <8994BD10-E0FD-444F-A075-FE2574634F97@gmail.com> Message-ID: <487B635D.6020406@latte.ca> Pascal Bompard wrote: > The fix I have working for this now is to use a symbolic link to the > directory where I keep my scripts. If you make the first line of /Users/pascal/Documents/Python/Dev/myapps/test.py read like so: #!/usr/bin/env python and if your path contains /Users/pascal/Documents/Python/Dev/myapps/ (which I believe it does), then you should be able to just type: test.py and it'll run the script for you... Later, Blake. From Chris.Barker at noaa.gov Mon Jul 14 21:10:22 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 14 Jul 2008 12:10:22 -0700 Subject: [Pythonmac-SIG] Yet another problem with path In-Reply-To: <0EFC7A38-5599-460C-99F9-2A0FD59C59BA@gmail.com> References: <7FCB2300-D7D7-4205-87CB-62014F590F85@gmail.com> <487AAC30.2080808@codebykevin.com> <6FFC88EC-39E1-4A18-8D71-5ED6206094B6@gmail.com> <487AB0D4.6080607@codebykevin.com> <0EFC7A38-5599-460C-99F9-2A0FD59C59BA@gmail.com> Message-ID: <487BA49E.4000206@noaa.gov> Pascal Bompard wrote: > I suppose the next best strategy should be to look into using a terminal > shortcut to at least make the "cd" to the directory a bit less painful. If you drag and drop a folder from the Finder to the terminal, its path will get pasted in. I also really like the "Open Terminal here" applet, so you can easily open a terminal already cd'd to the folder you're looking at in the finder. >>> The problem remains though, that every time I want to run a script in >>> that directory, I'd have to type out the entire path, which is not >>> ideal. >>> Surely there must be a work around to allow me to only type in the >>> script name, at least I assume there must be? If you have scripts you want to run from anywhere, make them executable: chmod a+x MyScript.py and put: #!usr/bin/env python at the top. Then either: put them in a standard place that should be on your PATH, like: /usr/local/bin or put the path to your scripts in your PATH -- often people use: ~/bin Another trick is to put a symbolic link to your script in /usr/local/bin: sudo ls -s /Users/pascal/Documents/Python/Dev/myapps/test.py \ /usr/local/bin/test.py That will make it look to the system like it's in /usr/local/bin, but it points to the original, so if you edit that, the edited version will be run in the future. do buy a book or surf the web for info about using the terminal on OS-X -- it's a great skill to have. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Mon Jul 14 21:27:13 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 14 Jul 2008 12:27:13 -0700 Subject: [Pythonmac-SIG] py2app & PIL In-Reply-To: <487B520A.9000102@gmail.com> References: <487B520A.9000102@gmail.com> Message-ID: <487BA891.6030708@noaa.gov> Mariano Di Felice wrote: > I compile this app in my minimac with Lepard 10.5.4 OS, and I use > python2.5 and PIL 1.1.6 compiled from source this can be tricky to get right, on both counts. I'd try using the Python.org binary and... > I've tried install ready dmg PIL from here ( > http://pythonmac.org/packages/py25-fat/dmg/PIL-1.1.6-py2.5-macosx10.4-2007-05-18.dmg > ), but I obtain a strange error FT_Load_Glyph.... well, yes, that one. That error sounds a bit familiar -- try deleting "build" and "dist", and making sure all traces of your hand-build PIL are gone, and try again. Also make sure you're using the latest Py2app and modulegraph For the record, with: OS-X 10.4.11 PPC python.org python2.5.2 PIL-1.1.6 from pythonmacorg/packages Py2app '0.3.6' modulegraph '0.7.1' this simple script: import sys from PIL import Image, ImageFont, ImageDraw for filename in sys.argv[1:]: print "Processing:", filename im = Image.open(filename) print "It is a %s, %s, %s image"%(im.format, im.size, im.mode) print "writing out a version with some text on it:" draw = ImageDraw.Draw(im) font = ImageFont.truetype("veraBd.ttf", 15) draw.text((10, 20), "WaterMark", font=font) outfilename = filename[:-3] + "watermarked.jpg" im.save(outfilename) and this setup.py: from setuptools import setup APP = ['SimplePILTest.py'] DATA_FILES = ["VeraBd.ttf"] OPTIONS = {'argv_emulation': True} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) py2app works fine for me. -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 python at dakrauth.com Mon Jul 14 21:58:33 2008 From: python at dakrauth.com (David A Krauth) Date: Mon, 14 Jul 2008 15:58:33 -0400 Subject: [Pythonmac-SIG] py2app, svn 1.5 and macholib Message-ID: Upon a recent upgrade to Leopard, I was having significant difficulties in producing a .app from py2app (wxPython-based), where I had had no trouble previously. In the interim, I had upgraded from Tiger, and from the default Apple build of 2.5.1 to MacPython 2.5.2. One of my stumbling blocks was when I received the following error: global name 'log' is not define in setuputils/command/sdist.py:98 (setuptools-0.6c8-py2.5.egg), in function entries_finder: log.warn("unrecognized .svn/entries format in %s", dirname) It appears that: a) logging hasn't been properly imported b) that due to the recent changes in Subversion 1.5 metadata schema, the "entries_find" can no longer yield a correct result I'm really not sure who I should report this to or where to submit the bug. Instead, I reverted back to svn client 1.4.4 (which I wanted to do anyways, since 1.5 also broke on of my favorite TextMate plugins, SVNMate). Another stumbling block was an exception I receive from the MachO lib: ValueError: Unknown load command: 27 I decided to upgrade py2app and it's dependencies all to trunk versions to see if I fared any better: svn co http://svn.pythonmac.org/macholib/macholib/trunk macho cd macho easy_install -Z . cd .. svn co http://svn.pythonmac.org/altgraph/altgraph/trunk/ altgraph cd altgraph/ easy_install -Z . cd .. svn co http://svn.pythonmac.org/modulegraph/modulegraph/trunk/ modulegraph cd modulegraph/ easy_install -Z . cd .. svn co http://svn.pythonmac.org/py2app/py2app/trunk py2app cd py2app/ easy_install -Z . cd .. This seemed to hit the sweet stop - my build worked and executed as desired. -David David A. Krauth http://dakrauth.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Tue Jul 15 11:06:03 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 15 Jul 2008 11:06:03 +0200 Subject: [Pythonmac-SIG] py2app, svn 1.5 and macholib In-Reply-To: References: Message-ID: <1C35C630-744F-4746-816A-7CFD5236F348@mac.com> On 14 Jul, 2008, at 21:58, David A Krauth wrote: > Upon a recent upgrade to Leopard, I was having significant > difficulties in producing a .app from py2app (wxPython-based), where > I had had no trouble previously. > > In the interim, I had upgraded from Tiger, and from the default > Apple build of 2.5.1 to MacPython 2.5.2. > > One of my stumbling blocks was when I received the following error: > > global name 'log' is not define > > in setuputils/command/sdist.py:98 (setuptools-0.6c8-py2.5.egg), in > function entries_finder: > > log.warn("unrecognized .svn/entries format in %s", dirname) > > It appears that: > > a) logging hasn't been properly imported > b) that due to the recent changes in Subversion 1.5 metadata schema, > the "entries_find" can no longer yield a correct result These are know issues in setuptools, both result from setuptools not supporting subversion 1.5 at all. They might be fixed in the trunk (that is 'easy_install setuptools==0.6dev'). For the record: the best list to discuss setuptools issues is the distutils-sig (distutils-sig at python.org). Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From Chris.Barker at noaa.gov Tue Jul 15 18:37:39 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 15 Jul 2008 09:37:39 -0700 Subject: [Pythonmac-SIG] py2app creates 90 MB .app In-Reply-To: References: <9712D64F-0EB2-4959-81C2-AA54D6F68741@gmx.net> <487BA6E2.4070506@noaa.gov> Message-ID: <487CD253.9050704@noaa.gov> Markus wrote: > I resolved this issue but my mail with the solution was not posted to > the list I expect. (Still wondering why.) Is it correct that you replied > to me privately and not using the list? That was an accident -- this list is set to default reply to the sender only, and I neglected to hit "reply all". > Here is the solution: > The command line tool "strip" was missing on my machine. After > installing strip (Apple Development Tools), py2app stripped the size to > 47 MB which is half the original size! Zipped it is about 16 MB. Ah -- that does seem to do the trick! Impressive reduction! > According to several reports (including your report) this size seems > perfectly OK now. yup, it's big, but expected for a large Universal lib. > PS: Although it might be unusual not to have these tools installed, a > hint somewhere in the documentation -- if there is not one already -- > could be helpful for newbies like me. Yes, it would. Just in case, I've posted this to the list, so it will be in the archives. -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 janssen at parc.com Wed Jul 16 18:10:04 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 16 Jul 2008 09:10:04 PDT Subject: [Pythonmac-SIG] getting beta 2 out the door on Apple systems Message-ID: <08Jul16.091005pdt."58698"@synergy1.parc.xerox.com> I'd urge everyone interested in newer versions of Python on Apple hardware to read and help with Barry's message, which I reproduce liberally below. A total of about 6 "deferred blockers". Specifically, there's an OS X issue: http://bugs.python.org/issue3226 ``Mac/Makefile.in uses the arch command which doesn't have the ability to run a given architecture in 10.4 like it does in 10.5. Hence, the install fails.'' Bill > On Jul 15, 2008, at 8:32 AM, Barry Warsaw wrote: > > > If there is anything you need a decision on, please follow up to > > this thread. I'm inundated with email so I can't watch every thread > > on the mailing lists. Or ping me on #python-dev. > > I'm not currently optimistic that we can release today. > > As I see it we have several problems serious enough to delay a > release. First, we have no green 2.6 or 3.0 buildbots > > http://www.python.org/dev/buildbot/stable/ > > It looks like few of the buildbots for 2.6 are actually online, but > still, the 3.0 buildbots are all failing. > > We still have, and have had for a long time now, serious problems with > the multiprocessing module: > > http://bugs.python.org/issue?@columns=title,id,activity,versions,status&@sort=activity&@filter=priority,status&@pagesize=50&@startwith=0&priority=1&status=1&@dispname=Showstoppers > > I noticed today that _multiprocessing.so has build problems on OS X > 10.5 and Ubuntu 8.04. I opened a separate issue about that so as not > to get lost in the other bug about test_multiprocessing hanging. As > evidenced by the thread for issue 3088, lots of people have put a lot > of work into this module, but unfortunately we're still not there. > These seem serious enough to me to hold up the release, especially > since we have only one more beta left. > > Speaking of which, we have a number of deferred blockers: > > http://bugs.python.org/issue?@columns=title,id,activity,status&@sort=activity&@group=priority&@filter=priority,status&@pagesize=50&@startwith=0&priority=6&status=1&@dispname=Deferred%20Blockers > > These will not block beta 2, but they /will/ block beta 3, so they > really need some attention. > > Please everyone, if you have only a little bit of time to work on > Python, I hope you will attack the release critical and deferred > blocker issues, and work on turning the buildbots green. These are > the top priorities in order to get 2.6 and 3.0 out on time. And just > as added incentive, our October 1st goal is being noted by downstream > vendors. I've been told that "Apple is willing to take the new Python > if it is GM on schedule by Oct 1st, but may not if it is delayed" > though you should not infer anything about Apple's schedule from this. > > Still, we won't sacrifice quality in order to hit the October 1st > goal. After beta 2, I start getting mean. :) > From ronaldoussoren at mac.com Wed Jul 16 22:01:33 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 16 Jul 2008 22:01:33 +0200 Subject: [Pythonmac-SIG] getting beta 2 out the door on Apple systems In-Reply-To: <08Jul16.091005pdt.58698@synergy1.parc.xerox.com> References: <08Jul16.091005pdt.58698@synergy1.parc.xerox.com> Message-ID: <5C0D542B-24E8-40F7-90E1-D588AB9E1A0B@mac.com> I've attached patches to both issue 3226 and issue 3381, both of which are related to building Python 2.6 on Tiger. I cannot test on Tiger though, could someone please test and review these patches? Ronald On 16 Jul, 2008, at 18:10, Bill Janssen wrote: > I'd urge everyone interested in newer versions of Python on Apple > hardware to read and help with Barry's message, which I reproduce > liberally below. > > A total of about 6 "deferred blockers". > > Specifically, there's an OS X issue: > > http://bugs.python.org/issue3226 > > ``Mac/Makefile.in uses the arch command which doesn't have the > ability to run a given architecture in 10.4 like it does in > 10.5. Hence, the install fails.'' > > Bill > >> On Jul 15, 2008, at 8:32 AM, Barry Warsaw wrote: >> >>> If there is anything you need a decision on, please follow up to >>> this thread. I'm inundated with email so I can't watch every thread >>> on the mailing lists. Or ping me on #python-dev. >> >> I'm not currently optimistic that we can release today. >> >> As I see it we have several problems serious enough to delay a >> release. First, we have no green 2.6 or 3.0 buildbots >> >> http://www.python.org/dev/buildbot/stable/ >> >> It looks like few of the buildbots for 2.6 are actually online, but >> still, the 3.0 buildbots are all failing. >> >> We still have, and have had for a long time now, serious problems >> with >> the multiprocessing module: >> >> http://bugs.python.org/issue?@columns=title,id,activity,versions,status&@sort=activity&@filter=priority,status&@pagesize=50&@startwith=0&priority=1&status=1&@dispname=Showstoppers >> >> I noticed today that _multiprocessing.so has build problems on OS X >> 10.5 and Ubuntu 8.04. I opened a separate issue about that so as not >> to get lost in the other bug about test_multiprocessing hanging. As >> evidenced by the thread for issue 3088, lots of people have put a lot >> of work into this module, but unfortunately we're still not there. >> These seem serious enough to me to hold up the release, especially >> since we have only one more beta left. >> >> Speaking of which, we have a number of deferred blockers: >> >> http://bugs.python.org/issue?@columns=title,id,activity,status&@sort=activity&@group=priority&@filter=priority,status&@pagesize=50&@startwith=0&priority=6&status=1&@dispname=Deferred%20Blockers >> >> These will not block beta 2, but they /will/ block beta 3, so they >> really need some attention. >> >> Please everyone, if you have only a little bit of time to work on >> Python, I hope you will attack the release critical and deferred >> blocker issues, and work on turning the buildbots green. These are >> the top priorities in order to get 2.6 and 3.0 out on time. And just >> as added incentive, our October 1st goal is being noted by downstream >> vendors. I've been told that "Apple is willing to take the new >> Python >> if it is GM on schedule by Oct 1st, but may not if it is delayed" >> though you should not infer anything about Apple's schedule from >> this. >> >> Still, we won't sacrifice quality in order to hit the October 1st >> goal. After beta 2, I start getting mean. :) >> > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From rowen at cesmail.net Thu Jul 17 18:49:33 2008 From: rowen at cesmail.net (Russell E. Owen) Date: Thu, 17 Jul 2008 09:49:33 -0700 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) References: Message-ID: In article , Nate wrote: > I've been trying to increase the font size inside IDLE. The documentation > refers to an "Options menu" that seems to be eluding me in the Mac flavor of > IDLE. Could someone please help me? When I run IDLE it has Preferences... under the IDLE menu. That's the standard location and name for Mac prefs. The Fonts/Tabs panel has what you're looking for. -- Russell From rowen at cesmail.net Thu Jul 17 22:06:03 2008 From: rowen at cesmail.net (Russell E. Owen) Date: Thu, 17 Jul 2008 13:06:03 -0700 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) References: Message-ID: In article , "Russell E. Owen" wrote: > In article > , > Nate wrote: > > > I've been trying to increase the font size inside IDLE. The documentation > > refers to an "Options menu" that seems to be eluding me in the Mac flavor of > > IDLE. Could someone please help me? > > When I run IDLE it has Preferences... under the IDLE menu. That's the > standard location and name for Mac prefs. The Fonts/Tabs panel has what > you're looking for. That said, it doesn't actually seem to work for me (I should have tried it before posting). I can set the font size, but I can't seem to make it stick. Clicking OK or Apply after making the change has no obvious effect; in fact OK doesn't even close the Preferences dialog box, which is not a good sign. That's with IDLE 2.5.2 on MacOS X 10.4.11. I also looked at ~/Library/Preferences/idle.plist (the only obvious prefs file I could find) but it only had a few entries and none were relevant to the font. Finally, I found the directory ~/.idlerc/ but none of the files in there look relevant. Maybe somebody knows where the prefs are stored or how to get them to work. I'm afraid I don't use IDLE myself. Another option is to use a normal text editor* You lose some interactivity but the powerful editing features may compensate by increasing productivity in other ways. Other IDEs that work on Mac include Eclipse (free but cluttered) and WingIDE (powerful but X11-based). -- Russell *I don't want to start an editor war, but commonly used options include: - TextWrangler: free, mature, robust, but clumsy find/replace - TextMate: powerful but has char-at-a-time undo - SubEthaEdit: nice but regex find is somewhat broken and no rectangular selection - Smultron: free, less powerful than TextWrangler but better find/replace - AquaEmacs: great for power users who aren't afraid of key stroke combinations I personally use Pepper, but it's no longer supported. I'm still looking for a modern replacement that I like as well. From Chris.Barker at noaa.gov Fri Jul 18 01:32:25 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 17 Jul 2008 16:32:25 -0700 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) In-Reply-To: References: Message-ID: <487FD689.1080001@noaa.gov> Russell E. Owen wrote: > Another option is to use a normal text editor* You lose some > interactivity but the powerful editing features may compensate by > increasing productivity in other ways. Absolutely -- a good editor is worth a lot! Besides, most of us edit a bunch of other kinds of text files, so getting to know a good editor is very useful. > - TextWrangler: free, mature, robust, but clumsy find/replace It's Python mode isn't great either -- Barebones simply doesn't want to believe that indenting is a key feature! That being said, I use it a lot, it's really pretty nice and full featured. > I personally use Pepper, but it's no longer supported. I know. bummer. It had such promise. > I'm still looking for a modern replacement that I like as well. Check out Peppy: http://peppy.flipturn.org/ It's not totally mature yet, but it's under active development: http://groups.google.com/group/peppy-dev?hl=en and definitely headed in the right direction. It'd be great to get some more Mac users on board... -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 cesmail.net Fri Jul 18 02:02:25 2008 From: rowen at cesmail.net (Russell E Owen) Date: Thu, 17 Jul 2008 17:02:25 -0700 Subject: [Pythonmac-SIG] Editors (was Mac IDLE Fonts?...) In-Reply-To: <487FD689.1080001@noaa.gov> References: <487FD689.1080001@noaa.gov> Message-ID: At 4:32 PM -0700 2008-07-17, Christopher Barker wrote: >Russell E. Owen wrote: >>Another option is to use a normal text editor* You lose some >>interactivity but the powerful editing features may compensate by >>increasing productivity in other ways. >... >>I'm still looking for a modern replacement that I like as well. > >Check out Peppy: > >http://peppy.flipturn.org/ > >It's not totally mature yet, but it's under active development: > >http://groups.google.com/group/peppy-dev?hl=en > >and definitely headed in the right direction. > >It'd be great to get some more Mac users on board... I just gave it a quick try. It's a nice start. It certainly shows off wxPython nicely. Two things I noticed right off (which I'll report if you think they aren't known already): - If a command key is not recognized then the corresponding letter is entered. That is bad. (For instance cmd-w enters a w!). - Lots of these message when I did some selecting: CGContextRestoreGState: invalid context this may be due to using too old of wx, I suppose. Also the Find is fine for simple finding, but what do you do for more serious work? I am pretty sure I'd want a real dialog box, or at least visible easily-modified controls, for options such as: "in selection", "whole word", "case sensitive". Unfortunately the lack of that seems to be a conscious design decision, so I have no idea if that's negotiable, much less fixable. In the long run I'd want find/replace in multiple files, but presumably it's too alpha for that. Another editor to look at is Eddie. It is lean and fast and gets a lot of the basics right. Unfortunately: - No tabbed windows - No user macros - It has a bug highlighting triple-quoted strings. - Some of its tools are only for C/C++ So far SubEthaEdit is the most well-rounded alternative to Pepper I've found, but I finally gave up on it and went back to Pepper. I'm hoping that a version of TextMate will eventually come out with more usable undo. If not I may have to learn emacs. -- Russell From afraud at gmail.com Fri Jul 18 04:28:19 2008 From: afraud at gmail.com (Nate) Date: Thu, 17 Jul 2008 22:28:19 -0400 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) In-Reply-To: References: Message-ID: I don't even have the "Preferences" item in my IDLE menu. I'm running IDLE 1.2.2 on Leopard (10.5.4). Maybe I should submit a bug-report? On Thu, Jul 17, 2008 at 4:06 PM, Russell E. Owen wrote: > In article , > "Russell E. Owen" wrote: > > > In article > > , > > Nate wrote: > > > > > I've been trying to increase the font size inside IDLE. The > documentation > > > refers to an "Options menu" that seems to be eluding me in the Mac > flavor of > > > IDLE. Could someone please help me? > > > > When I run IDLE it has Preferences... under the IDLE menu. That's the > > standard location and name for Mac prefs. The Fonts/Tabs panel has what > > you're looking for. > > That said, it doesn't actually seem to work for me (I should have tried > it before posting). I can set the font size, but I can't seem to make it > stick. Clicking OK or Apply after making the change has no obvious > effect; in fact OK doesn't even close the Preferences dialog box, which > is not a good sign. That's with IDLE 2.5.2 on MacOS X 10.4.11. > > I also looked at ~/Library/Preferences/idle.plist (the only obvious > prefs file I could find) but it only had a few entries and none were > relevant to the font. > > Finally, I found the directory ~/.idlerc/ but none of the files in there > look relevant. > > Maybe somebody knows where the prefs are stored or how to get them to > work. I'm afraid I don't use IDLE myself. > > Another option is to use a normal text editor* You lose some > interactivity but the powerful editing features may compensate by > increasing productivity in other ways. > > Other IDEs that work on Mac include Eclipse (free but cluttered) and > WingIDE (powerful but X11-based). > > -- Russell > > *I don't want to start an editor war, but commonly used options include: > - TextWrangler: free, mature, robust, but clumsy find/replace > - TextMate: powerful but has char-at-a-time undo > - SubEthaEdit: nice but regex find is somewhat broken and no rectangular > selection > - Smultron: free, less powerful than TextWrangler but better find/replace > - AquaEmacs: great for power users who aren't afraid of key stroke > combinations > > I personally use Pepper, but it's no longer supported. I'm still looking > for a modern replacement that I like as well. > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kw at codebykevin.com Fri Jul 18 05:15:32 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 17 Jul 2008 23:15:32 -0400 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) In-Reply-To: References: Message-ID: <48800AD4.4000204@codebykevin.com> Nate wrote: > I don't even have the "Preferences" item in my IDLE menu. I'm running IDLE > 1.2.2 on Leopard (10.5.4). > > Maybe I should submit a bug-report? > > Hmmm. Are you using the system installation of Tk (8.4.7)? I'd install a later version of Tcl/Tk from here: http://www.categorifiedcoder.info/tcltk/. Try 8.4.19. There was some weirdness with the Preferences menu before--with certain versions of Tk the menu item appeared twice--so I wrote a patch that set it to appear only once, which Ronald committed. I think the bug doesn't exist with Tk 8.4.7. However, that version is so old that I'm disinclined to offer another patch. --Kevin ------ Kevin Walzer Code by Kevin http://www.codebykevin.com From afraud at gmail.com Fri Jul 18 13:28:42 2008 From: afraud at gmail.com (Nate) Date: Fri, 18 Jul 2008 07:28:42 -0400 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) In-Reply-To: <48800AD4.4000204@codebykevin.com> References: <48800AD4.4000204@codebykevin.com> Message-ID: How can I identify the version of Tk that I'm running? I installed IDLE using the download of Python 2.5.2 from Python.org. On Thu, Jul 17, 2008 at 11:15 PM, Kevin Walzer wrote: > Nate wrote: > >> I don't even have the "Preferences" item in my IDLE menu. I'm running >> IDLE >> 1.2.2 on Leopard (10.5.4). >> >> Maybe I should submit a bug-report? >> >> >> > Hmmm. Are you using the system installation of Tk (8.4.7)? > > I'd install a later version of Tcl/Tk from here: > http://www.categorifiedcoder.info/tcltk/. Try 8.4.19. > > There was some weirdness with the Preferences menu before--with certain > versions of Tk the menu item appeared twice--so I wrote a patch that set it > to appear only once, which Ronald committed. I think the bug doesn't exist > with Tk 8.4.7. However, that version is so old that I'm disinclined to > offer another patch. > > --Kevin > > ------ > > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kw at codebykevin.com Fri Jul 18 14:20:56 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 18 Jul 2008 08:20:56 -0400 Subject: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need glasses.) In-Reply-To: References: <48800AD4.4000204@codebykevin.com> Message-ID: <48808AA8.8@codebykevin.com> Nate wrote: > How can I identify the version of Tk that I'm running? I installed IDLE > using the download of Python 2.5.2 from Python.org. > Look in /Library/Frameworks. If you don't see Tcl.framework and Tk.framework, then you are most likely running the Apple-installed version (8.4.7) installed in /System/Library/Frameworks. As I said, this version is very old (c. 2005?). 8.4.19 from the link I gave you before will work with Python. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From craig9 at gmail.com Fri Jul 18 20:25:36 2008 From: craig9 at gmail.com (Craig Marshall) Date: Fri, 18 Jul 2008 19:25:36 +0100 Subject: [Pythonmac-SIG] PyObjC tutorial without Xcode Message-ID: Hi, I am familiar with python already, and I am familiar with the mac as a user, but otherwise have no mac development experience. I'm keen to learn pyobjc and write native mac/python GUI apps. I'm currently having problems with outdated-ness and inaccuracies with both tutorials* I can find on PyObjC, and I think it could be simpler if I could find a tutorial that didn't involve Xcode (and the xcode python support seems spotty). Can anyone point me in the right direction please? I'm happy to use a plain old text editor and run/debug from the command line, and also I'd rather leave obj-C alone if possible. I accept that I'll need to use interface builder (which seems like a great app, anyway). Is this possible? If so - pointers would be gratefully received. Thanks, Craig Marshall * (http://pyobjc.sourceforge.net/documentation/pyobjc-core/tutorial/index.html and http://developer.apple.com/cocoa/pyobjc.html) From dav at alum.mit.edu Sat Jul 19 01:35:41 2008 From: dav at alum.mit.edu (Dav Clark) Date: Fri, 18 Jul 2008 19:35:41 -0400 Subject: [Pythonmac-SIG] PyObjC tutorial without Xcode In-Reply-To: References: Message-ID: <8081D2C6-3DCF-480F-8722-A42888901BC2@alum.mit.edu> I sent this just to Craig, but figured I should probably send to the group in retrospect - at least this way something'll be online in the pythonmac-sig archives... Below my signature is a sample script demonstrating a really minimal use of pyobjc. This is meant to be run from the command line, and uses the BTop2 framework from Perfectly Scientific. You can download that framework for free, but it won't do much if you don't have the hardware! Not exactly a tutorial, but darned simple for sure... I can't remember if that __getattr__ thing ever worked... I don't think it did. The Exception thing is _way_ useful (as indicated in the comments there). The standard exception messages you'll get while using pyobjc are close to useless. I'll add also that I'd not be averse to chipping in to a non-Xcode pyobjc tutorial online somewhere. I'm not terribly self-motivated on that, but would do if someone asked for more. Cheers, Dav -- Statistical Motion R&D http://socrates.berkeley.edu/~ivrylab/ import objc # # Way useful for debugging # import PyObjCTools.Debugging as Debugging # Debugging.installVerboseExceptionHandler() btop_path = objc.pathForFramework('/Users/dav/Code/bTop.framework') objc.loadBundle('btop', globals(), bundle_path=btop_path) # Not sure why I need to do this... I shouldn't! BTopBoard.setBTopFirmwareDirectory_(btop_path + '/Versions/A/Resources') class BoardContainer(NSObject): """BoardContainer should be initialized by BoardControl below""" board = None def bTopAddBoard_(self, board): self.board = board self.board.setPortBit_direction_('B', 255) self.board.refreshDigitalPortValues() def send(self, val): self.board.setPortBit_value_('B', 255-val) self.board.refreshDigitalPortValues() class BoardControl: """Instantiate the BoardContainer and provide a more pythonic interface Ultimately, this should implement a standard Parallel Port API""" board = None def __init__(self): # Cocoa objects are constructed differently... self.board = BoardContainer.alloc().init() BTopBoard.setBTopPrimaryObserver_(self.board) BTopBoard.allocBTopObserver() # # try writing a function dispatch to catch undeclared funcs... see # # what's going on! # def __getattr__(self, name): # def handler(*args, **kwargs): # print '*name*', name # print '*args*', args # print '*kwargs*', kwargs # return handler def send(self, val): self.board.send(val) From craig9 at gmail.com Sat Jul 19 10:16:53 2008 From: craig9 at gmail.com (Craig Marshall) Date: Sat, 19 Jul 2008 09:16:53 +0100 Subject: [Pythonmac-SIG] PyObjC tutorial without Xcode In-Reply-To: <8081D2C6-3DCF-480F-8722-A42888901BC2@alum.mit.edu> References: <8081D2C6-3DCF-480F-8722-A42888901BC2@alum.mit.edu> Message-ID: Hi all again, > Below my signature is a sample script demonstrating a really minimal use of > pyobjc. This is meant to be run from the command line, and uses the BTop2 > framework from Perfectly Scientific. You can download that framework for > free, but it won't do much if you don't have the hardware! Thanks for sending the above dav, I think I'm more interested in trying to get a very basic GUI up and running, which from the look of it your script doesn't handle.. I tried another tactic. I went through all the example folders that the xcode 3.1 installation put on my hard drive (/Developer/Documentation/Python/PyObjC/tutorial/ specifically) and found again the official pyobjc tutorial. My new tactic is to start with the final piece of code there (step 12), build and run it and then play with it until I know how it works. The problem is, when I build it and run it (out of the box!), it doesn't work (cue hair-pulling sounds). I open a terminal, tell it to build (python setup.py py2app), then tell it to run (open dist/CurrencyConverter.app), and it gives me a dialog box with an error inside: CurrencyConverter Error An unexpected error has occured during excution of the main script ImportError: No module named Foundation Open Console or Terminate So - I'm beginning to think either these are the useless errors that dav talked about and that I need to somehow shoe-horn the useful exception code into the py2app build instructions, or that it really can't find the Foundation module. I would have thought py2app could find and insert the bits and pieces it needs just from the import statements, or do I have to declare that I want to use Foundation in the setup.py somehow? A third possibility is that I've somehow broken my setup - how else could a tutorial that came with the latest xcode not work out of the box? I'd be very grateful if someone can point me in the direction of at least a very small working pyobjc GUI app that works out of the box with modern software .... Craig From orestis at orestis.gr Sat Jul 19 15:17:17 2008 From: orestis at orestis.gr (Orestis Markou) Date: Sat, 19 Jul 2008 14:17:17 +0100 Subject: [Pythonmac-SIG] PyObjC tutorial without Xcode In-Reply-To: References: Message-ID: <8C7E9800-1341-4AF7-B4B6-DE9F80E9EF63@orestis.gr> I don't see why you don't want to use XCode. You can use an external editor for python files (I use MacVim), and let XCode manage the building and packaging. You don't have to use Obj-C (although you can't really use PyObjC without understanding Obj-C). The bundled examples should work out of the box, if you open the project with Xcode. You can find them in /Developer/Examples/Python/ PyObjC Anyway, I have a little "Hello world" PyObjC project here: http://orestis.gr/en/blog/2008/05/17/pyobjc-hello-world/ It has some of the common gotchas annotated, but it's not a tutorial. BTW, everything I say applies to Leopard, using the stock version of Python and PyObjC. Hope I helped, -- Orestis Markou orestis at orestis.gr http://orestis.gr/ On 19 ???? 2008, at 11:00 ??, pythonmac-sig-request at python.org 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: Mac IDLE Fonts? (-or- I guess I need glasses.) (Nate) > 2. Re: Mac IDLE Fonts? (-or- I guess I need glasses.) (Kevin Walzer) > 3. PyObjC tutorial without Xcode (Craig Marshall) > 4. Re: PyObjC tutorial without Xcode (Dav Clark) > 5. Re: PyObjC tutorial without Xcode (Craig Marshall) > > From: Nate > Date: 18 ??????? 2008 12:28:42 ?? GMT+01:00 > To: kw at codebykevin.com > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need > glasses.) > > > How can I identify the version of Tk that I'm running? I installed > IDLE using the download of Python 2.5.2 from Python.org. > > > > On Thu, Jul 17, 2008 at 11:15 PM, Kevin Walzer > wrote: > Nate wrote: > I don't even have the "Preferences" item in my IDLE menu. I'm > running IDLE > 1.2.2 on Leopard (10.5.4). > > Maybe I should submit a bug-report? > > > > Hmmm. Are you using the system installation of Tk (8.4.7)? > > I'd install a later version of Tcl/Tk from here: http://www.categorifiedcoder.info/tcltk/ > . Try 8.4.19. > > There was some weirdness with the Preferences menu before--with > certain versions of Tk the menu item appeared twice--so I wrote a > patch that set it to appear only once, which Ronald committed. I > think the bug doesn't exist with Tk 8.4.7. However, that version is > so old that I'm disinclined to offer another patch. > > --Kevin > > ------ > > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > > > > > From: Kevin Walzer > Date: 18 ??????? 2008 1:20:56 ?? GMT+01:00 > To: Nate > Cc: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] Mac IDLE Fonts? (-or- I guess I need > glasses.) > Reply-To: kw at codebykevin.com > > > Nate wrote: >> How can I identify the version of Tk that I'm running? I installed >> IDLE >> using the download of Python 2.5.2 from Python.org. > > Look in /Library/Frameworks. If you don't see Tcl.framework and > Tk.framework, then you are most likely running the Apple-installed > version (8.4.7) installed in /System/Library/Frameworks. > > As I said, this version is very old (c. 2005?). 8.4.19 from the link > I gave you before will work with Python. > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > > > > > From: "Craig Marshall" > Date: 18 ??????? 2008 7:25:36 ?? GMT+01:00 > To: pythonmac-sig at python.org > Subject: [Pythonmac-SIG] PyObjC tutorial without Xcode > > > Hi, > > I am familiar with python already, and I am familiar with the mac as a > user, but otherwise have no mac development experience. I'm keen to > learn pyobjc and write native mac/python GUI apps. > > I'm currently having problems with outdated-ness and inaccuracies with > both tutorials* I can find on PyObjC, and I think it could be simpler > if I could find a tutorial that didn't involve Xcode (and the xcode > python support seems spotty). Can anyone point me in the right > direction please? I'm happy to use a plain old text editor and > run/debug from the command line, and also I'd rather leave obj-C alone > if possible. I accept that I'll need to use interface builder (which > seems like a great app, anyway). > > Is this possible? If so - pointers would be gratefully received. > > Thanks, > Craig Marshall > > * (http://pyobjc.sourceforge.net/documentation/pyobjc-core/tutorial/index.html > and http://developer.apple.com/cocoa/pyobjc.html) > > > > > From: Dav Clark > Date: 19 ??????? 2008 12:35:41 ?? GMT+01:00 > To: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] PyObjC tutorial without Xcode > > > I sent this just to Craig, but figured I should probably send to the > group in retrospect - at least this way something'll be online in > the pythonmac-sig archives... > > > Below my signature is a sample script demonstrating a really minimal > use of pyobjc. This is meant to be run from the command line, and > uses the BTop2 framework from Perfectly Scientific. You can > download that framework for free, but it won't do much if you don't > have the hardware! > > Not exactly a tutorial, but darned simple for sure... I can't > remember if that __getattr__ thing ever worked... I don't think it > did. The Exception thing is _way_ useful (as indicated in the > comments there). The standard exception messages you'll get while > using pyobjc are close to useless. > > I'll add also that I'd not be averse to chipping in to a non-Xcode > pyobjc tutorial online somewhere. I'm not terribly self-motivated > on that, but would do if someone asked for more. > > Cheers, > Dav > -- > Statistical Motion R&D > http://socrates.berkeley.edu/~ivrylab/ > > import objc > > # # Way useful for debugging > # import PyObjCTools.Debugging as Debugging > # Debugging.installVerboseExceptionHandler() > > btop_path = objc.pathForFramework('/Users/dav/Code/bTop.framework') > objc.loadBundle('btop', globals(), bundle_path=btop_path) > # Not sure why I need to do this... I shouldn't! > BTopBoard.setBTopFirmwareDirectory_(btop_path + '/Versions/A/ > Resources') > > class BoardContainer(NSObject): > """BoardContainer should be initialized by BoardControl below""" > board = None > > def bTopAddBoard_(self, board): > self.board = board > self.board.setPortBit_direction_('B', 255) > self.board.refreshDigitalPortValues() > > def send(self, val): > self.board.setPortBit_value_('B', 255-val) > self.board.refreshDigitalPortValues() > > class BoardControl: > """Instantiate the BoardContainer and provide a more pythonic > interface > > Ultimately, this should implement a standard Parallel Port API""" > board = None > > def __init__(self): > # Cocoa objects are constructed differently... > self.board = BoardContainer.alloc().init() > BTopBoard.setBTopPrimaryObserver_(self.board) > BTopBoard.allocBTopObserver() > > # # try writing a function dispatch to catch undeclared funcs... > see > # # what's going on! > # def __getattr__(self, name): > # def handler(*args, **kwargs): > # print '*name*', name > # print '*args*', args > # print '*kwargs*', kwargs > # return handler > > def send(self, val): > self.board.send(val) > > > > > > > > From: "Craig Marshall" > Date: 19 ??????? 2008 9:16:53 ?? GMT+01:00 > To: pythonmac-sig at python.org > Subject: Re: [Pythonmac-SIG] PyObjC tutorial without Xcode > > > Hi all again, > >> Below my signature is a sample script demonstrating a really >> minimal use of >> pyobjc. This is meant to be run from the command line, and uses >> the BTop2 >> framework from Perfectly Scientific. You can download that >> framework for >> free, but it won't do much if you don't have the hardware! > > Thanks for sending the above dav, I think I'm more interested in > trying to get a very basic GUI up and running, which from the look of > it your script doesn't handle.. > > I tried another tactic. I went through all the example folders that > the xcode 3.1 installation put on my hard drive > (/Developer/Documentation/Python/PyObjC/tutorial/ specifically) and > found again the official pyobjc tutorial. My new tactic is to start > with the final piece of code there (step 12), build and run it and > then play with it until I know how it works. > > The problem is, when I build it and run it (out of the box!), it > doesn't work (cue hair-pulling sounds). I open a terminal, tell it to > build (python setup.py py2app), then tell it to run (open > dist/CurrencyConverter.app), and it gives me a dialog box with an > error inside: > > CurrencyConverter Error > An unexpected error has occured during excution of the main script > ImportError: No module named Foundation > > Open Console or Terminate > > So - I'm beginning to think either these are the useless errors that > dav talked about and that I need to somehow shoe-horn the useful > exception code into the py2app build instructions, or that it really > can't find the Foundation module. I would have thought py2app could > find and insert the bits and pieces it needs just from the import > statements, or do I have to declare that I want to use Foundation in > the setup.py somehow? > > A third possibility is that I've somehow broken my setup - how else > could a tutorial that came with the latest xcode not work out of the > box? > > I'd be very grateful if someone can point me in the direction of at > least a very small working pyobjc GUI app that works out of the box > with modern software .... > > Craig > > > From mcovill at mac.com Sat Jul 19 20:16:59 2008 From: mcovill at mac.com (Mike Covill) Date: Sat, 19 Jul 2008 14:16:59 -0400 Subject: [Pythonmac-SIG] Trouble installing PyObjC 2.0 from source Message-ID: <223C2F72-6A9F-49B6-A425-642147339E39@mac.com> Can anyone give me some pointers on installing PyObjC 2.0 from source? I have a fresh installation on my MacBookPro with Leopard 10.5.4 of Python 2.5.2 in /Library/... , and nothing else. I checked out the PyObjC source at "http://svn.red-bean.com/pyobjc/trunk" and ran the "02-develop-all.sh" shell program in pyobjc/. I got lots of errors, some of which were fixed by reverting back to svn 1.4.4. But I am still getting errors like those shown below (first and last error). My litmus test to see if installation was successful is to run python and try to import Foundation or objc in a new shell. First error: > gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - > fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd > -fno-common -dynamic -DNDEBUG -g -O3 -I/Library/Frameworks/ > Python.framework/Versions/2.5/include/python2.5 -c Modules/objc/ > bundle-variables.m -o build/temp.macosx-10.3-i386-2.5/Modules/objc/ > bundle-variables.o -DPyObjC_STRICT_DEBUGGING -DMACOSX -no-cpp- > precomp -Wno-long-double -g -fexceptions -O1 -Wall -Wstrict- > prototypes -Wmissing-prototypes -Wformat=2 -W -Wshadow -Wpointer- > arith -Wmissing-declarations -Wnested-externs -Wno-long-long -Wno- > import -I/usr/include/libxml2 -Ibuild/codegen/ -Ilibffi-src/include - > Ilibffi-src/powerpc > Modules/objc/bundle-variables.m: In function > ?PyObjC_loadBundleFunctions?: > Modules/objc/bundle-variables.m:221: error: ?_localHandler? > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > Modules/objc/bundle-variables.m: In function > ?PyObjC_loadBundleFunctions?: > Modules/objc/bundle-variables.m:221: error: ?_localHandler? > undeclared (first use in this function) > Modules/objc/bundle-variables.m:221: error: (Each undeclared > identifier is reported only once > Modules/objc/bundle-variables.m:221: error: for each function it > appears in.) > lipo: can't figure out the architecture type of: /var/tmp// > ccehSa3x.out > error: command 'gcc' failed with exit status 1 ... 24000 lines ... Last error: > running develop > running egg_info > creating Lib/pyobjc_framework_XgridFoundation.egg-info > writing requirements to Lib/pyobjc_framework_XgridFoundation.egg- > info/requires.txt > writing Lib/pyobjc_framework_XgridFoundation.egg-info/PKG-INFO > writing top-level names to Lib/pyobjc_framework_XgridFoundation.egg- > info/top_level.txt > writing dependency_links to Lib/pyobjc_framework_XgridFoundation.egg- > info/dependency_links.txt > writing manifest file 'Lib/pyobjc_framework_XgridFoundation.egg-info/ > SOURCES.txt' > writing manifest file 'Lib/pyobjc_framework_XgridFoundation.egg-info/ > SOURCES.txt' > running build_ext > Creating /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/pyobjc-framework-XgridFoundation.egg-link > (link to Lib) > Adding pyobjc-framework-XgridFoundation 2.0 to easy-install.pth file > > Installed /Users/mcovill/projects/pyobjc/pyobjc/pyobjc-framework- > XgridFoundation/Lib > Processing dependencies for pyobjc-framework-XgridFoundation==2.0 > Searching for pyobjc-framework-Cocoa>=2.0 > Reading http://pypi.python.org/simple/pyobjc-framework-Cocoa/ > Couldn't find index page for 'pyobjc-framework-Cocoa' (maybe > misspelled?) > Scanning index of all packages (this may take a while) > Reading http://pypi.python.org/simple/ > No local packages or download links found for pyobjc-framework- > Cocoa>=2.0 > error: Could not find suitable distribution for > Requirement.parse('pyobjc-framework-Cocoa>=2.0') Thanks, Mike Covill From jeremiah.Kelly at postgrad.manchester.ac.uk Fri Jul 18 18:03:46 2008 From: jeremiah.Kelly at postgrad.manchester.ac.uk (Jeremiah Kelly) Date: Fri, 18 Jul 2008 17:03:46 +0100 Subject: [Pythonmac-SIG] Duff installation Message-ID: <1D50287A-625E-4C0F-876D-0924E1ED1688@postgrad.manchester.ac.uk> Dear List I'm new (very new ) to Python and whilst exploring the help on python 2.5.2 i get the following error message, I've tried a fresh install of pythonMac and a restart, I would be glad of some help Best wishes Jeremiah help> modules Please wait a moment while I gather a list of all available modules... Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site.py", line 346, in __call__ return pydoc.help(*args, **kwds) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1648, in __call__ self.interact() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1666, in interact self.help(request) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1682, in help elif request == 'modules': self.listmodules() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1803, in listmodules ModuleScanner().run(callback) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pydoc.py", line 1854, in run for importer, modname, ispkg in pkgutil.walk_packages(): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pkgutil.py", line 125, in walk_packages for item in walk_packages(path, name+'.', onerror): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/pkgutil.py", line 110, in walk_packages __import__(name) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/Tk/ __init__.py", line 87, in _default_root.tk.call('package', 'require', 'Togl') _tkinter.TclError: can't find package Togl From kw at codebykevin.com Mon Jul 21 04:08:01 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Sun, 20 Jul 2008 22:08:01 -0400 Subject: [Pythonmac-SIG] Duff installation In-Reply-To: <1D50287A-625E-4C0F-876D-0924E1ED1688@postgrad.manchester.ac.uk> References: <1D50287A-625E-4C0F-876D-0924E1ED1688@postgrad.manchester.ac.uk> Message-ID: <4883EF81.1050706@codebykevin.com> Jeremiah Kelly wrote: > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg/OpenGL/Tk/__init__.py", > line 87, in > _default_root.tk.call('package', 'require', 'Togl') > _tkinter.TclError: can't find package Togl > Looks like you need to install Togl. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From jf at ai.univ-paris8.fr Mon Jul 21 10:45:19 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 21 Jul 2008 10:45:19 +0200 Subject: [Pythonmac-SIG] mv In-Reply-To: <1D50287A-625E-4C0F-876D-0924E1ED1688@postgrad.manchester.ac.uk> References: <1D50287A-625E-4C0F-876D-0924E1ED1688@postgrad.manchester.ac.uk> Message-ID: Does anybody know which function, from which module, does what the mv command would do in a shell script? -- Jym Feat ~ Paris FR 75018 From ronaldoussoren at mac.com Mon Jul 21 12:20:12 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 21 Jul 2008 12:20:12 +0200 Subject: [Pythonmac-SIG] mv In-Reply-To: References: <1D50287A-625E-4C0F-876D-0924E1ED1688@postgrad.manchester.ac.uk> Message-ID: <163026558049303579036959755805480031949-Webmail2@me.com> On Monday, July 21, 2008, at 10:46AM, "Feat" wrote: >Does anybody know which function, from which module, does what the mv command would do in a shell script? Either os.rename or shutil.move. The latter can also move files to a different filesystem. Ronald > >-- >Jym Feat ~ Paris FR 75018 > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG at python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig > > From jf at ai.univ-paris8.fr Mon Jul 21 18:12:50 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Mon, 21 Jul 2008 18:12:50 +0200 Subject: [Pythonmac-SIG] mv In-Reply-To: <163026558049303579036959755805480031949-Webmail2@me.com> References: <1D50287A-625E-4C0F-876D-0924E1ED1688@postgrad.manchester.ac.uk> <163026558049303579036959755805480031949-Webmail2@me.com> Message-ID: At 12:20 +0200 21/07/08, Ronald Oussoren wrote: > >On Monday, July 21, 2008, at 10:46AM, "Feat" wrote: >>Does anybody know which function, from which module, does what the mv command would do in a shell script? > >Either os.rename or shutil.move. The latter can also move files to a different filesystem. Oooops! I had browsed an obsolete Bealey's handbook and overlooked the official documentation at [http://docs.python.org/lib] where this is mentioned, of course... Thanks, Ronald, thanks Markus, for replying! -- Jym Feat ~ Paris FR 75018 From mdcrawford at gmail.com Tue Jul 22 14:13:57 2008 From: mdcrawford at gmail.com (Michael Crawford) Date: Tue, 22 Jul 2008 05:13:57 -0700 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting Message-ID: Hi, I'm new to the list, and new to Tkinter. I'm working my way through the Tkinter tutorial, but every time I try to quit a Tkinter program, it hangs with the spinning cursor, and won't completely quit. This happens with even very simple programs, and doesn't seem to have anything to do with my own source code. I would be surprised if this wasn't already a well-known problem, as it's 100% repeatible for me, but Google yields no insight. I'm using the MacPython 2.5.2 from python.org, running my programs from IDLE, on a Core Duo (not Core 2 Duo) MacBook Pro running Mac OS X 10.4.11. Thanks for your advice. -- Michael David Crawford mdcrawford at gmail dot com Enjoy my art, photography, music and writing at http://www.geometricvisions.com/ --- Free Compact Disc --- From kw at codebykevin.com Tue Jul 22 15:22:09 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 22 Jul 2008 09:22:09 -0400 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: References: Message-ID: <4885DF01.5090403@codebykevin.com> Michael Crawford wrote: > Hi, > > I'm new to the list, and new to Tkinter. > > I'm working my way through the Tkinter tutorial, but every time I try > to quit a Tkinter program, it hangs with the spinning cursor, and > won't completely quit. > > This happens with even very simple programs, and doesn't seem to have > anything to do with my own source code. > > I would be surprised if this wasn't already a well-known problem, as > it's 100% repeatible for me, but Google yields no insight. > > I'm using the MacPython 2.5.2 from python.org, running my programs > from IDLE, on a Core Duo (not Core 2 Duo) MacBook Pro running Mac OS X > 10.4.11. > > Thanks for your advice. What version of Tcl/Tk do you have installed? Can you post some sample code for me to play with? -- Kevin Walzer Code by Kevin http://www.codebykevin.com From mdcrawford at gmail.com Tue Jul 22 17:16:23 2008 From: mdcrawford at gmail.com (Michael Crawford) Date: Tue, 22 Jul 2008 08:16:23 -0700 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: <4885DF01.5090403@codebykevin.com> References: <4885DF01.5090403@codebykevin.com> Message-ID: On Tue, Jul 22, 2008 at 6:22 AM, Kevin Walzer wrote: > What version of Tcl/Tk do you have installed? Actually, I'm not real sure. I assumed that they were bundled with the MacPython 2.5.2 download, but a long time ago I built Tcl and Tk 8.4.11 from source. Do I need to build and install a later release? That could be my problem > Can you post some sample code for me to play with? the short program on this page is a good example: http://www.pythonware.com/library/tkinter/introduction/hello-again.htm So far I've just been trying out the examples given in that tutorial - I have yet to write my own code. If it does turn out that I need to build Tcl/Tk from source, I won't have a problem - I'm experienced with other aspects of programming. 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 kw at codebykevin.com Tue Jul 22 17:28:30 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 22 Jul 2008 11:28:30 -0400 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: References: <4885DF01.5090403@codebykevin.com> Message-ID: <4885FC9E.5070108@codebykevin.com> Michael Crawford wrote: > On Tue, Jul 22, 2008 at 6:22 AM, Kevin Walzer wrote: >> What version of Tcl/Tk do you have installed? > > Actually, I'm not real sure. I assumed that they were bundled with > the MacPython 2.5.2 download, but a long time ago I built Tcl and Tk > 8.4.11 from source. > > Do I need to build and install a later release? That could be my problem > >> Can you post some sample code for me to play with? > > the short program on this page is a good example: > > http://www.pythonware.com/library/tkinter/introduction/hello-again.htm > > So far I've just been trying out the examples given in that tutorial - > I have yet to write my own code. > > If it does turn out that I need to build Tcl/Tk from source, I won't > have a problem - I'm experienced with other aspects of programming. > I have no problems with the code at the page you referenced. I'm using a custom build of Python 2.5.2 with Tk 8.5.3 on OS X 10.5.4. It launches, runs, and exits cleanly. You mentioned installing Tcl/Tk 8.4.11. That's a pretty old version. Is it a PPC-only build, or a universal binary? If you are running a PPC build of Tcl/Tk on an Intel box, sometimes conflicts and hang-ups occur. If you have any console/error messages when your Python program exists, that might help diagnose it. You might want to clean out the 8.4.11 build of Tcl/Tk and install 8.4.19 from this site: http://www.categorifiedcoder.info/tcltk/. It should play nicer with the stock build of Python from python.org, which links to Tk 8.4.x. One caveat: that's the end of the line for Tk 8.4. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From santagada at gmail.com Wed Jul 23 00:11:44 2008 From: santagada at gmail.com (Leonardo Santagada) Date: Tue, 22 Jul 2008 19:11:44 -0300 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: <4885FC9E.5070108@codebykevin.com> References: <4885DF01.5090403@codebykevin.com> <4885FC9E.5070108@codebykevin.com> Message-ID: On 22/07/2008, at 12:28, Kevin Walzer wrote: > I have no problems with the code at the page you referenced. I'm > using a custom build of Python 2.5.2 with Tk 8.5.3 on OS X 10.5.4. > It launches, runs, and exits cleanly. Someone should do a table with the best version of tk for each version of python... Tk 8.5 works with the python that comes with leopard? -- Leonardo Santagada From kw at codebykevin.com Wed Jul 23 00:24:37 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 22 Jul 2008 18:24:37 -0400 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: References: <4885DF01.5090403@codebykevin.com> <4885FC9E.5070108@codebykevin.com> Message-ID: <48865E25.3080305@codebykevin.com> Leonardo Santagada wrote: > > > Someone should do a table with the best version of tk for each version > of python... Tk 8.5 works with the python that comes with leopard? No. The problem here is that Tk and Python don't move in sync. At the time of Python 2.5's release, the main line of Tk development was still 8.4.x, so the binary distributions of Python link against Tk 8.4.x. Tk 8.5 was released last December, and is a big improvement over Tk 8.4. However, Python's binary distributions (for Mac and Windows, anyway) still link against Tk 8.4.x. There's nothing to prevent you from doing your own build of Python with Tk 8.5. That's what I've done. However, upping the "default version" of Tk is actually a pretty big deal in the Python world, and likely won't be done officially until Python 2.6. As the maintainer of Python-Mac, perhaps Ronald can chime in here. Ronald, what's your take on this? Any idea when the binary distro of MacPython will look for Tk 8.5 by default? -- Kevin Walzer Code by Kevin http://www.codebykevin.com From santagada at gmail.com Wed Jul 23 00:35:59 2008 From: santagada at gmail.com (Leonardo Santagada) Date: Tue, 22 Jul 2008 19:35:59 -0300 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: <48865E25.3080305@codebykevin.com> References: <4885DF01.5090403@codebykevin.com> <4885FC9E.5070108@codebykevin.com> <48865E25.3080305@codebykevin.com> Message-ID: <6B75225F-16F3-4D21-9D04-D3DBB3CCA2DD@gmail.com> On 22/07/2008, at 19:24, Kevin Walzer wrote: > Tk 8.5 was released last December, and is a big improvement over Tk > 8.4. However, Python's binary distributions (for Mac and Windows, > anyway) still link against Tk 8.4.x. > > There's nothing to prevent you from doing your own build of Python > with Tk 8.5. That's what I've done. However, upping the "default > version" of Tk is actually a pretty big deal in the Python world, > and likely won't be done officially until Python 2.6. Yes but I remember reading somewhere that tkinter (at least the version that comes with python 2.5) had some problems with Tk 8.5, are you using a tkinter package from svn, or did you merge back those changes to your build or python? -- Leonardo Santagada From kw at codebykevin.com Wed Jul 23 00:38:05 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 22 Jul 2008 18:38:05 -0400 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: <6B75225F-16F3-4D21-9D04-D3DBB3CCA2DD@gmail.com> References: <4885DF01.5090403@codebykevin.com> <4885FC9E.5070108@codebykevin.com> <48865E25.3080305@codebykevin.com> <6B75225F-16F3-4D21-9D04-D3DBB3CCA2DD@gmail.com> Message-ID: <4886614D.2010707@codebykevin.com> Leonardo Santagada wrote: > > On 22/07/2008, at 19:24, Kevin Walzer wrote: > >> Tk 8.5 was released last December, and is a big improvement over Tk >> 8.4. However, Python's binary distributions (for Mac and Windows, >> anyway) still link against Tk 8.4.x. >> >> There's nothing to prevent you from doing your own build of Python >> with Tk 8.5. That's what I've done. However, upping the "default >> version" of Tk is actually a pretty big deal in the Python world, and >> likely won't be done officially until Python 2.6. > > > Yes but I remember reading somewhere that tkinter (at least the version > that comes with python 2.5) had some problems with Tk 8.5, are you using > a tkinter package from svn, or did you merge back those changes to your > build or python? I'm just building Python 2.5.2 against Tk 8.5.3. I'm not sure what problems Tkinter itself had. It works fine for me. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Wed Jul 23 07:52:39 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 23 Jul 2008 07:52:39 +0200 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: <48865E25.3080305@codebykevin.com> References: <4885DF01.5090403@codebykevin.com> <4885FC9E.5070108@codebykevin.com> <48865E25.3080305@codebykevin.com> Message-ID: <8BEBC1C2-BBFA-4686-92CC-01D87844E2AB@mac.com> On 23 Jul, 2008, at 0:24, Kevin Walzer wrote: > Leonardo Santagada wrote: > >> Someone should do a table with the best version of tk for each >> version of python... Tk 8.5 works with the python that comes with >> leopard? > > No. > > The problem here is that Tk and Python don't move in sync. At the > time of Python 2.5's release, the main line of Tk development was > still 8.4.x, so the binary distributions of Python link against Tk > 8.4.x. > > Tk 8.5 was released last December, and is a big improvement over Tk > 8.4. However, Python's binary distributions (for Mac and Windows, > anyway) still link against Tk 8.4.x. > > There's nothing to prevent you from doing your own build of Python > with Tk 8.5. That's what I've done. However, upping the "default > version" of Tk is actually a pretty big deal in the Python world, > and likely won't be done officially until Python 2.6. > > As the maintainer of Python-Mac, perhaps Ronald can chime in here. > Ronald, what's your take on this? Any idea when the binary distro of > MacPython will look for Tk 8.5 by default? I don't know. Does Tkinter even work with Tcl/Tk 8.5? I don't use Tkinter myself, but I'm pretty sure I've seen some messages about problems with Tk 8.5 in the past. Those may have been resolved for Python 2.6. Ronald From kw at codebykevin.com Wed Jul 23 16:06:50 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 23 Jul 2008 10:06:50 -0400 Subject: [Pythonmac-SIG] Tkinter apps hang upon quitting In-Reply-To: <8BEBC1C2-BBFA-4686-92CC-01D87844E2AB@mac.com> References: <4885DF01.5090403@codebykevin.com> <4885FC9E.5070108@codebykevin.com> <48865E25.3080305@codebykevin.com> <8BEBC1C2-BBFA-4686-92CC-01D87844E2AB@mac.com> Message-ID: <48873AFA.7070202@codebykevin.com> Ronald Oussoren wrote: > > I don't know. Does Tkinter even work with Tcl/Tk 8.5? I don't use > Tkinter myself, but I'm pretty sure I've seen some messages about > problems with Tk 8.5 in the past. Those may have been resolved for > Python 2.6. > Yes, it works. I'm shipping a commercial application that uses Tkinter/Tk-8.5. There were some issues before involving fork/exec warnings in the console--there would be hundreds of such warnings during the program's execution. I could not find any impact on performance or stability, but the warnings were annoying. Running a test build of my app with Tk 8.5.3, the issues seem resolved. Not sure who fixed them or when, but I'm glad that the warnings don't litter the console anymore. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From anjiro at cc.gatech.edu Wed Jul 23 17:57:25 2008 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Wed, 23 Jul 2008 11:57:25 -0400 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? Message-ID: <488754E5.4070600@cc.gatech.edu> I'm working my way through the excellent book "Cocoa Programming for Mac OS X", but using PyObjC instead of ObjC. For the most part it's working very well - a testament to the awesomeness of PyObjC! However, I'm occasionally getting a crash from my application that gives no errors - it just enters into the debugger with no other output. A backtrace leads through C code to (inevitably) objc_msgSend(), which doesn't help much. In one case I managed to figure out that I needed to add myFunc_ = objc.accessor(myFunc_) after the definition of myFunc_() (though I have no clue why), but in the current case that doesn't help. The relevant chunk of code is below. My debug log shows the "Ending alert sheet" message, but not the "Alert ended" message. @IBAction def removeEmployee_(self, sender): selectedPeople = self._employeeController.selectedObjects() alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_(u'Delete?', u'Delete', u'Cancel', None, u'Do you really want to delete %d people?' % len(selectedPeople)) NSLog(u'Starting alert sheet') alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(self._tableView.window(), self, 'alertEnded:code:context:', None) NSLog(u'Ending alert sheet') def alertEnded_code_context_(self, alert, choice, context): NSLog(u'Alert ended') if choice == NSAlertDefaultReturn: self._employeeController.remove(None) Thanks in advance for any hints, whether general or specific! Daniel Ashbrook From gary.bernhardt at gmail.com Wed Jul 23 23:26:07 2008 From: gary.bernhardt at gmail.com (Gary Bernhardt) Date: Wed, 23 Jul 2008 17:26:07 -0400 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? In-Reply-To: <488754E5.4070600@cc.gatech.edu> References: <488754E5.4070600@cc.gatech.edu> Message-ID: <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> You need to wrap you alertEnded... method with PyObjcTools.Apphelper.endSheetMethod: @PyObjcTools.Apphelper.endSheetMethod def alertEnded(self, alert, choice, context): ... (Methods wrapped with endSheetMethod don't need the ObjC name mangling, so you can name it whatever you want.) I have a very weak understanding of why this is needed, but it's something related to sheet callback methods not having a fixed signature. On Wed, Jul 23, 2008 at 11:57 AM, Daniel Ashbrook wrote: > I'm working my way through the excellent book "Cocoa Programming for Mac OS > X", but using PyObjC instead of ObjC. For the most part it's working very > well - a testament to the awesomeness of PyObjC! > > However, I'm occasionally getting a crash from my application that gives no > errors - it just enters into the debugger with no other output. A backtrace > leads through C code to (inevitably) objc_msgSend(), which doesn't help > much. > > In one case I managed to figure out that I needed to add myFunc_ = > objc.accessor(myFunc_) after the definition of myFunc_() (though I have no > clue why), but in the current case that doesn't help. The relevant chunk of > code is below. My debug log shows the "Ending alert sheet" message, but not > the "Alert ended" message. > > > @IBAction > def removeEmployee_(self, sender): > selectedPeople = self._employeeController.selectedObjects() > alert = > NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_(u'Delete?', > u'Delete', u'Cancel', None, u'Do you really want to delete %d people?' % > len(selectedPeople)) > NSLog(u'Starting alert sheet') > alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(self._tableView.window(), > self, 'alertEnded:code:context:', None) > NSLog(u'Ending alert sheet') > > > def alertEnded_code_context_(self, alert, choice, context): > NSLog(u'Alert ended') > if choice == NSAlertDefaultReturn: > self._employeeController.remove(None) > > > Thanks in advance for any hints, whether general or specific! > > > > Daniel Ashbrook > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -- Gary http://blog.extracheese.org From anjiro at cc.gatech.edu Thu Jul 24 01:18:24 2008 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Wed, 23 Jul 2008 19:18:24 -0400 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? In-Reply-To: <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> References: <488754E5.4070600@cc.gatech.edu> <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> Message-ID: <4887BC40.3090406@cc.gatech.edu> Ahh, that did it. Awesome, thanks. These occasional "add a decorator to avoid random crash" problems are very confusing... guess I'll figure it all out as I go along. dan Gary Bernhardt wrote: > You need to wrap you alertEnded... method with > PyObjcTools.Apphelper.endSheetMethod: > > @PyObjcTools.Apphelper.endSheetMethod > def alertEnded(self, alert, choice, context): > ... > > (Methods wrapped with endSheetMethod don't need the ObjC name > mangling, so you can name it whatever you want.) > > I have a very weak understanding of why this is needed, but it's > something related to sheet callback methods not having a fixed > signature. > > On Wed, Jul 23, 2008 at 11:57 AM, Daniel Ashbrook wrote: >> I'm working my way through the excellent book "Cocoa Programming for Mac OS >> X", but using PyObjC instead of ObjC. For the most part it's working very >> well - a testament to the awesomeness of PyObjC! >> >> However, I'm occasionally getting a crash from my application that gives no >> errors - it just enters into the debugger with no other output. A backtrace >> leads through C code to (inevitably) objc_msgSend(), which doesn't help >> much. >> >> In one case I managed to figure out that I needed to add myFunc_ = >> objc.accessor(myFunc_) after the definition of myFunc_() (though I have no >> clue why), but in the current case that doesn't help. The relevant chunk of >> code is below. My debug log shows the "Ending alert sheet" message, but not >> the "Alert ended" message. >> >> >> @IBAction >> def removeEmployee_(self, sender): >> selectedPeople = self._employeeController.selectedObjects() >> alert = >> NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_(u'Delete?', >> u'Delete', u'Cancel', None, u'Do you really want to delete %d people?' % >> len(selectedPeople)) >> NSLog(u'Starting alert sheet') >> alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(self._tableView.window(), >> self, 'alertEnded:code:context:', None) >> NSLog(u'Ending alert sheet') >> >> >> def alertEnded_code_context_(self, alert, choice, context): >> NSLog(u'Alert ended') >> if choice == NSAlertDefaultReturn: >> self._employeeController.remove(None) >> >> >> Thanks in advance for any hints, whether general or specific! >> >> >> >> Daniel Ashbrook >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > > From ronaldoussoren at mac.com Thu Jul 24 07:52:05 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 24 Jul 2008 07:52:05 +0200 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? In-Reply-To: <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> References: <488754E5.4070600@cc.gatech.edu> <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> Message-ID: On 23 Jul, 2008, at 23:26, Gary Bernhardt wrote: > You need to wrap you alertEnded... method with > PyObjcTools.Apphelper.endSheetMethod: > > @PyObjcTools.Apphelper.endSheetMethod > def alertEnded(self, alert, choice, context): > ... > > (Methods wrapped with endSheetMethod don't need the ObjC name > mangling, so you can name it whatever you want.) > > I have a very weak understanding of why this is needed, but it's > something related to sheet callback methods not having a fixed > signature. That's the right fix, and it is needed because the arguments of the callback (the alertEnded method above) aren't all instances of NSObject. Some of them are basic C types. If you don't tell PyObjC about this the bridge won't know that and will happely treat a C integer or 'void*' value as an object reference, which will almost certainly crash your program. Decorators like endSheetMethod aren't needed for most other methods because either the method signature is simple (all arguments are objects, as is the return value), or PyObjC can deduct the correct method signature from the super class or protocol definitions. Ronald From anjiro at cc.gatech.edu Thu Jul 24 14:07:16 2008 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Thu, 24 Jul 2008 08:07:16 -0400 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? In-Reply-To: References: <488754E5.4070600@cc.gatech.edu> <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> Message-ID: <48887074.8050601@cc.gatech.edu> Ronald Oussoren wrote: > Decorators like endSheetMethod aren't needed for most other methods > because either the method signature is simple (all arguments are > objects, as is the return value), or PyObjC can deduct the correct > method signature from the super class or protocol definitions. There was a case where I had to decorate a couple of functions with @objc.accessor or I got the same kind of no-error crash. Is it the same cause? Is there a way to know when I need to use that vs not? Thanks, dan From ronaldoussoren at mac.com Thu Jul 24 14:12:55 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 24 Jul 2008 14:12:55 +0200 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? In-Reply-To: <48887074.8050601@cc.gatech.edu> References: <488754E5.4070600@cc.gatech.edu> <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> <48887074.8050601@cc.gatech.edu> Message-ID: <93E7A9E9-BC72-4268-8DAA-740F8B8D1C23@mac.com> On 24 Jul, 2008, at 14:07, Daniel Ashbrook wrote: > Ronald Oussoren wrote: >> Decorators like endSheetMethod aren't needed for most other methods >> because either the method signature is simple (all arguments are >> objects, as is the return value), or PyObjC can deduct the correct >> method signature from the super class or protocol definitions. > > There was a case where I had to decorate a couple of functions with > @objc.accessor or I got the same kind of no-error crash. Is it the > same cause? Is there a way to know when I need to use that vs not? That depends on the method names you're using. "Regular" accessors ("setFoo_" and "foo") should work without an objc.accessor decorator. Ronald From anjiro at cc.gatech.edu Thu Jul 24 14:43:33 2008 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Thu, 24 Jul 2008 08:43:33 -0400 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? In-Reply-To: <93E7A9E9-BC72-4268-8DAA-740F8B8D1C23@mac.com> References: <488754E5.4070600@cc.gatech.edu> <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> <48887074.8050601@cc.gatech.edu> <93E7A9E9-BC72-4268-8DAA-740F8B8D1C23@mac.com> Message-ID: <488878F5.4060706@cc.gatech.edu> Ronald Oussoren wrote: >> There was a case where I had to decorate a couple of functions with >> @objc.accessor or I got the same kind of no-error crash. Is it the >> same cause? Is there a way to know when I need to use that vs not? > > That depends on the method names you're using. "Regular" accessors > ("setFoo_" and "foo") should work without an objc.accessor decorator. The methods aren't of that form, because they're not really accessor methods as far as I understand it. The problem only occurs when I include: def someMethod_(...) #code... undo = self.undoManager() undo.prepareWithInvocationTarget_(self).someReverseMethod_(p, i) #code... If I don't add @objc.accessor to someMethod_() and someReverseMethod_() I get the unexplained crash. Those methods *do* modify an instance variable (directly); is that why they require the accessor decorator? dan From anjiro at cc.gatech.edu Thu Jul 24 14:45:21 2008 From: anjiro at cc.gatech.edu (Daniel Ashbrook) Date: Thu, 24 Jul 2008 08:45:21 -0400 Subject: [Pythonmac-SIG] PyObjC: debugging error-less crashes? In-Reply-To: <93E7A9E9-BC72-4268-8DAA-740F8B8D1C23@mac.com> References: <488754E5.4070600@cc.gatech.edu> <9c34c72e0807231426w43642b94p4d9a3b78f5f7dd02@mail.gmail.com> <48887074.8050601@cc.gatech.edu> <93E7A9E9-BC72-4268-8DAA-740F8B8D1C23@mac.com> Message-ID: <48887961.2020603@cc.gatech.edu> Ronald Oussoren wrote: > > On 24 Jul, 2008, at 14:07, Daniel Ashbrook wrote: > >> Ronald Oussoren wrote: >>> Decorators like endSheetMethod aren't needed for most other methods >>> because either the method signature is simple (all arguments are >>> objects, as is the return value), or PyObjC can deduct the correct >>> method signature from the super class or protocol definitions. >> >> There was a case where I had to decorate a couple of functions with >> @objc.accessor or I got the same kind of no-error crash. Is it the >> same cause? Is there a way to know when I need to use that vs not? > That depends on the method names you're using. "Regular" accessors > ("setFoo_" and "foo") should work without an objc.accessor decorator. > > Ronald From cburns at berkeley.edu Fri Jul 25 21:33:41 2008 From: cburns at berkeley.edu (Christopher Burns) Date: Fri, 25 Jul 2008 12:33:41 -0700 Subject: [Pythonmac-SIG] bdist_mpkg Python version prefix Message-ID: <764e38540807251233w3e388009h963b02cb6ee1c459@mail.gmail.com> When distributing Mac binaries of numpy, we've run into some confusion from users on the Python dependency. bdist_mpkg reports the MacPython ( python.org) dependency as the "System Python". This terminology is confusing as users see the "Apple Python" in the /System folder and believe they meet the required version. Could this be changed to something more descriptive? Updating the entry in the FRIENDLY_PREFIX is all that is needed. cburns at bdist_mpkg 12:31:38 $ grin -A 8 "FRIENDLY_PREFIX" ./plists.py: 70 : FRIENDLY_PREFIX = { 71 + os.path.expanduser(u'~/Library/Frameworks') : u'User', 72 + u'/System/Library/Frameworks' : u'Apple', 73 + u'/Library/Frameworks' : u'python.org Framework Build', 74 + u'/opt/local' : u'DarwinPorts', 75 + u'/usr/local' : u'Unix', 76 + u'/sw' : u'Fink', 77 + } On the numpy-list, Christopher Barker had proposed changing it to this: u'/Library/Frameworks' : u'python.org Framework Build', Thanks! Chris -- Christopher Burns Computational Infrastructure for Research Labs 10 Giannini Hall, UC Berkeley phone: 510.643.4014 http://cirl.berkeley.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From larry.meyn at nasa.gov Fri Jul 25 21:41:18 2008 From: larry.meyn at nasa.gov (Larry Meyn) Date: Fri, 25 Jul 2008 12:41:18 -0700 Subject: [Pythonmac-SIG] bdist_mpkg Python version prefix In-Reply-To: <764e38540807251233w3e388009h963b02cb6ee1c459@mail.gmail.com> Message-ID: FYI: The Apple provided python has an older version of numpy which is difficult (and probably unwise) to update. So it really only makes sense to install new versions of numpy for user installed copies of python. --Larry On 7/25/08 12:33 PM, "Christopher Burns" wrote: > When distributing Mac binaries of numpy, we've run into some confusion from > users on the Python dependency. bdist_mpkg reports the MacPython (python.org > ) dependency as the "System Python". This terminology is > confusing as users see the "Apple Python" in the /System folder and believe > they meet the required version. Could this be changed to something more > descriptive? > > Updating the entry in the FRIENDLY_PREFIX is all that is needed. > > cburns at bdist_mpkg 12:31:38 $ grin -A 8 "FRIENDLY_PREFIX" > ./plists.py: > 70 : FRIENDLY_PREFIX = { > 71 + os.path.expanduser(u'~/Library/Frameworks') : u'User', > 72 + u'/System/Library/Frameworks' : u'Apple', > 73 + u'/Library/Frameworks' : u'python.org > Framework Build', > 74 + u'/opt/local' : u'DarwinPorts', > 75 + u'/usr/local' : u'Unix', > 76 + u'/sw' : u'Fink', > 77 + } > > On the numpy-list, Christopher Barker had proposed changing it to this: > > u'/Library/Frameworks' : u'python.org Framework > Build', > > > Thanks! > Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Fri Jul 25 22:00:54 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 25 Jul 2008 13:00:54 -0700 Subject: [Pythonmac-SIG] bdist_mpkg Python version prefix In-Reply-To: References: Message-ID: <488A30F6.6060603@noaa.gov> Larry Meyn wrote: > FYI: The Apple provided python has an older version of numpy which is > difficult (and probably unwise) to update. There are ways to work around that, but yes, that's one reason that we're distributing binaries for the python.org build. -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 cburns at berkeley.edu Fri Jul 25 22:01:53 2008 From: cburns at berkeley.edu (Christopher Burns) Date: Fri, 25 Jul 2008 13:01:53 -0700 Subject: [Pythonmac-SIG] bdist_mpkg Python version prefix In-Reply-To: References: <764e38540807251233w3e388009h963b02cb6ee1c459@mail.gmail.com> Message-ID: <764e38540807251301j84e2491x9141b50a279751f1@mail.gmail.com> Yes, agreed. We build the numpy installer against the python.org version of python installed in /Library... The numpy developers have agreed to not touch the Apply Python. Users are required to install python from python.org. But this emphasizes my point, bdist_mpkg specifically refers to the python.org version of python as the "System Python" during an install. This causes a lot of confusion that can be resolved with a rewording of the requirement string. Chris On Fri, Jul 25, 2008 at 12:41 PM, Larry Meyn wrote: > FYI: The Apple provided python has an older version of numpy which is > difficult (and probably unwise) to update. So it really only makes sense to > install new versions of numpy for user installed copies of python. > --Larry > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at whizziwig.com Sun Jul 27 19:50:52 2008 From: david at whizziwig.com (David Blackman) Date: Sun, 27 Jul 2008 13:50:52 -0400 Subject: [Pythonmac-SIG] iTunes query Message-ID: <292ee0b50807271050u410261e5o24bf73e972dd4f2d@mail.gmail.com> I'm trying to figure out how AOEM queries work on iTunes, the code I'm trying looks like: for track in library.tracks[appscript.its.name().encode("utf-8").find("Sun")]: (I'm trying to find all the tracks in my library with the string "Sun" in the title) and the error I'm getting is: Traceback (most recent call last): File "./find_deleted_files2.py", line 78, in main() File "./find_deleted_files2.py", line 75, in main process_library(library) File "./find_deleted_files2.py", line 68, in process_library for track in library.tracks[appscript.its.name().encode("utf-8").find("Sun")]: File "/Library/Python/2.5/site-packages/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", line 524, in __getitem__ AttributeError: 'int' object has no attribute 'AS_aemreference' what am I doing wrong? thanks, --dave -- The Whole World + This Email = The Whole World From njriley at uiuc.edu Sun Jul 27 22:31:07 2008 From: njriley at uiuc.edu (Nicholas Riley) Date: Sun, 27 Jul 2008 15:31:07 -0500 Subject: [Pythonmac-SIG] iTunes query In-Reply-To: <292ee0b50807271050u410261e5o24bf73e972dd4f2d@mail.gmail.com> References: <292ee0b50807271050u410261e5o24bf73e972dd4f2d@mail.gmail.com> Message-ID: <20080727203107.GA4804@uiuc.edu> On Sun, Jul 27, 2008 at 01:50:52PM -0400, David Blackman wrote: > I'm trying to figure out how AOEM queries work on iTunes, the code I'm > trying looks like: > > for track in > library.tracks[appscript.its.name().encode("utf-8").find("Sun")]: > > (I'm trying to find all the tracks in my library with the string "Sun" > in the title) > > what am I doing wrong? You're trying to use Python string and iterable methods on an appscript reference. Because the remote process is doing the query, you're limited to specifying which it knows how to evaluate. Once you specify the query, you can then call .get() or just invoke the last accessor. I generally find these things are easier to express in AppleScript (scary, I know), so I use ASTranslate. For example, if I type into ASTranslate: tell app "iTunes" to get tracks whose name contains "Sun" I get back: app(u'/Applications/iTunes.app').tracks[its.name.contains(u'Sun')].get() And the expression is ready to use: In [7]: app(u'/Applications/iTunes.app').tracks[its.name.contains(u'Sun')].name() Out[7]: [u'California Sun', u'Wasted Early Sunday Morning', u'My Sundown', u'Sunday', u'The Sun Is Burning', [...] although you're better off using app(id='com.apple.iTunes') of course. -- Nicholas Riley | From randdvorak at gmail.com Mon Jul 28 01:46:02 2008 From: randdvorak at gmail.com (Rand Dvorak) Date: Sun, 27 Jul 2008 19:46:02 -0400 Subject: [Pythonmac-SIG] quick tutorial on aemreceive Message-ID: <1F220754-DB62-432D-ABC2-2DA5F9D26E74@gmail.com> I have an app that I created and put into an app wrapper using py2app, now need for it to be activated with a folder action script. All my research so far has pointed me to the aemreceive module, but I have not idea what to use for for the code for the second argument to installeventhandler. Basically, I need the eventhandler to be handed the list of files added to the folder to which the folder action is attached. Can someone point me to example? or provide me with a quick and dirty explanation how to determine that code? Thanks so much.... From njriley at uiuc.edu Mon Jul 28 04:11:37 2008 From: njriley at uiuc.edu (Nicholas Riley) Date: Sun, 27 Jul 2008 21:11:37 -0500 Subject: [Pythonmac-SIG] quick tutorial on aemreceive In-Reply-To: <1F220754-DB62-432D-ABC2-2DA5F9D26E74@gmail.com> References: <1F220754-DB62-432D-ABC2-2DA5F9D26E74@gmail.com> Message-ID: <20080728021137.GA18981@uiuc.edu> On Sun, Jul 27, 2008 at 07:46:02PM -0400, Rand Dvorak wrote: > > I have an app that I created and put into an app wrapper using py2app, > now need for it to be activated with a folder action script. All my > research so far has pointed me to the aemreceive module, but I have > not idea what to use for for the code for the second argument to > installeventhandler. Basically, I need the eventhandler to be handed > the list of files added to the folder to which the folder action is > attached. Can someone point me to example? or provide me with a > quick and dirty explanation how to determine that code? You can look at my Retrospect event handler I wrote a few years ago (and still use) - it's reasonably short and demonstrates some debugging techniques you can use to print out the event you're getting. -- Nicholas Riley | From hraban at fiee.net Mon Jul 28 14:43:01 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Mon, 28 Jul 2008 14:43:01 +0200 Subject: [Pythonmac-SIG] file system encoding and type Message-ID: How can I detect for some entry in "/Volumes" what kind of volume it is, e.g. Harddisk, USB stick, CD/DVD, and what encoding it uses? For a CD/DVD cataloguing tool I need to detect removable disks. At the moment I call "mount" like this: import re, subprocess def findCD(): """ Look for mounted volumes and return the first CD. Works probably only on MacOS X, depends on the output of 'mount' """ mountlines = subprocess.Popen('mount', stdout=subprocess.PIPE).communicate()[0].split('\n') reMountLine = re.compile('(.+) on (/[^(]*)(\((.+)\))?', re.I) for ml in mountlines: m = reMountLine.match(ml) if not m: continue g = m.groups() modes = g[3] if modes: modes = modes.split(', ') if ('nodev' in modes) and ('read-only' in modes): return unicode(g[1].strip(), 'utf-8') # here we need to know the FS encoding! return None This is a sample output of "mount" on my Leopard machine: hraban$ mount /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local) fdesc on /dev (fdesc, union) map -hosts on /net (autofs, automounted) map auto_home on /home (autofs, automounted) /dev/disk1s1 on /Volumes/RTFM (msdos, local, nodev, nosuid, noowners) /dev/disk2s0 on /Volumes/family 2008 (cd9660, local, nodev, nosuid, read-only, noowners) "RTFM" is my USB stick. "family 2008" is a CD. I.e. - "hfs", "msdos" or "cd9660" give a hint about the file system's encoding: - hfs: decomposed UTF-8 - msdos: latin-1 - cd9660: ? - "nodev" seems to mark a removable volume - "read-only" is normally a CD/DVD I couldn't find anything in Python's standard libraries to get this information. Is there? I would prefer a platform independent solution. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From dfh at forestfield.co.uk Mon Jul 28 15:25:40 2008 From: dfh at forestfield.co.uk (David Hughes) Date: Mon, 28 Jul 2008 14:25:40 +0100 Subject: [Pythonmac-SIG] file system encoding and type In-Reply-To: References: Message-ID: <488DC8D4.1020208@forestfield.co.uk> Henning Hraban Ramm wrote: > How can I detect for some entry in "/Volumes" what kind of volume it > is, e.g. Harddisk, USB stick, CD/DVD, and what encoding it uses? > For a CD/DVD cataloguing tool I need to detect removable disks. > I use the attached to extract information from the system_profiler and diskutil commands. Maybe it can be adapted to return encodings as well. -- Regards, David Hughes Forestfield Software -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: macosx.py URL: From hraban at fiee.net Mon Jul 28 23:58:04 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Mon, 28 Jul 2008 23:58:04 +0200 Subject: [Pythonmac-SIG] file system encoding and type In-Reply-To: <488DC8D4.1020208@forestfield.co.uk> References: <488DC8D4.1020208@forestfield.co.uk> Message-ID: <320BA329-44E8-4F27-AA1A-700E7F776B2D@fiee.net> Am 2008-07-28 um 15:25 schrieb David Hughes: > Henning Hraban Ramm wrote: >> >> How can I detect for some entry in "/Volumes" what kind of volume >> it is, e.g. Harddisk, USB stick, CD/DVD, and what encoding it uses? >> For a CD/DVD cataloguing tool I need to detect removable disks. >> > I use the attached to extract information from the system_profiler > and diskutil commands. Maybe it can be adapted to return encodings > as well. Thank you very much, but I was looking for a platform independent solution. Otherwise I can stay with "mount". Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From hengist.podd at virgin.net Tue Jul 29 09:33:14 2008 From: hengist.podd at virgin.net (Hengist Podd) Date: Tue, 29 Jul 2008 07:33:14 +0000 (GMT) Subject: [Pythonmac-SIG] quick tutorial on aemreceive Message-ID: <1497614148.647241217316794267.JavaMail.mail@webmail11> An HTML attachment was scrubbed... URL: From jaharmi at jaharmi.com Wed Jul 30 04:12:14 2008 From: jaharmi at jaharmi.com (Jeremy Reichman) Date: Tue, 29 Jul 2008 22:12:14 -0400 Subject: [Pythonmac-SIG] file system encoding and type In-Reply-To: Message-ID: It's too bad there doesn't seem to be something similar to os.path.ismount() that would determine the kind of volume. -- Jeremy From cdm at lizardlounge.com Wed Jul 30 04:03:22 2008 From: cdm at lizardlounge.com (Chris Mills) Date: Wed, 30 Jul 2008 14:03:22 +1200 Subject: [Pythonmac-SIG] New to Python - how to get Py2App to work? Message-ID: <488FCBEA.3000007@lizardlounge.com> Greetings, I am new to Python, have never developed tools with C++ (I have extensive MEL scripting experience with Autodesk's Maya), and am faced with needing to develop tools to deploy into a Mac OSX 10.5 environment. I've downloaded and installed py2app with ez-install and now am faced with getting it to work. I have a simple python script which runs from inside the IDE and does what it is supposed to do, but I can not figure out how to get py2app to work. I've seen a number of setup.py references about, but what I would really like is a step by step procedure for getting a simple "hello world" app to be built so that I can have some contextual reference and from there I can probably iterate my way to a successful solution. Is there a basic guide out there? The docs on: http://undefined.org/python/py2app.html do not make sense to me. Thanking you in advance for your patience and guidance. Kind regards, Chris Mills Lizard Lounge Graphics, LTD. Wellington, NZ http://lizardlounge.com Int'l: +644-977-5400 / +642-174-8770 NZ local: 04-977-5400 / 021-748-770 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vivacarlie at gmail.com Wed Jul 30 05:00:25 2008 From: vivacarlie at gmail.com (Nehemiah Dacres) Date: Tue, 29 Jul 2008 22:00:25 -0500 Subject: [Pythonmac-SIG] New to Python - how to get Py2App to work? In-Reply-To: <488FCBEA.3000007@lizardlounge.com> References: <488FCBEA.3000007@lizardlounge.com> Message-ID: <65fadfc30807292000v494410bek1a6801851acf5af4@mail.gmail.com> On Tue, Jul 29, 2008 at 9:03 PM, Chris Mills wrote: > Greetings, > > I am new to Python, have never developed tools with C++ (I have extensive > MEL scripting experience with Autodesk's Maya), and am faced with needing to > develop tools to deploy into a Mac OSX 10.5 environment. > > I've downloaded and installed py2app with ez-install and now am faced with > getting it to work. > > I have a simple python script which runs from inside the IDE and does what > it is supposed to do, but I can not figure out how to get py2app to work. > I've seen a number of setup.py references about, but what I would really > like is a step by step procedure for getting a simple "hello world" app to > be built so that I can have some contextual reference and from there I can > probably iterate my way to a successful solution. > > Is there a basic guide out there? The docs on: > http://undefined.org/python/py2app.html > do not make sense to me. > > Thanking you in advance for your patience and guidance. > > Kind regards, > Chris Mills > > Lizard Lounge Graphics, LTD. > Wellington, NZ > http://lizardlounge.com > > Int'l: +644-977-5400 / +642-174-8770 > NZ local: 04-977-5400 / 021-748-770 > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > I personally have never used py2app but if I wanted to develope a non GUI app I would simply investigate distutils. for a gui app I would simply use platypus and include what ever libraries I needed for the gui (unless it was the system's Tkinter) -- "lalalalala! it's not broken because I can use it" http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Wed Jul 30 07:37:03 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 29 Jul 2008 22:37:03 -0700 Subject: [Pythonmac-SIG] New to Python - how to get Py2App to work? In-Reply-To: <65fadfc30807292000v494410bek1a6801851acf5af4@mail.gmail.com> References: <488FCBEA.3000007@lizardlounge.com> <65fadfc30807292000v494410bek1a6801851acf5af4@mail.gmail.com> Message-ID: <488FFDFF.6010703@noaa.gov> Nehemiah Dacres wrote: > for a gui app I would > simply use platypus and include > what ever libraries I needed for the gui It would be interesting for someone to do a comparison of Platypus and py2app, but at a glance it looks like you'd need to do a lot of hand work to include everything you need for your app with Platypus. Py2app does all that for you -- at least most of the time! Yes, those docs are a bit sparse, there was a better one somewhere, but I can't find it at the moment. This doc from the pyObjC project may help. http://pyobjc.sourceforge.net/documentation/pyobjc-core/tutorial/index.html Here's the quick version: 1) you need to use the command line. If you've only ever run python script from IDLE or something, it's time to fire up Terminal and learn a bit about the command line. 2) You need a setup.py file for your app. There is a way to auto-generate a simple one that I forget at the moment, but the one in the PyObjC tutorial is a fine start: from distutils.core import setup import py2app datafiles = [] # I'm keeping this here, as it will be handy later. setup( app=['TheNameOfYOurMainScript.py'], data_files=[], ) It's that simple (for the simple case!) To run it, type: $ python setup.py py2app at the command line in the same dir as the setup.py file and your main script. It should build an app bundle and put it in the "dist" folder that it creates. Once you've got that, I'd search the web and the archives of this list for examples of more complex apps -- adding application icon, etc. Also, I think there are some examples distributed with Py2app. -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 altern2 at gmail.com Wed Jul 30 08:58:39 2008 From: altern2 at gmail.com (altern) Date: Wed, 30 Jul 2008 08:58:39 +0200 Subject: [Pythonmac-SIG] New to Python - how to get Py2App to work? In-Reply-To: <488FCBEA.3000007@lizardlounge.com> References: <488FCBEA.3000007@lizardlounge.com> Message-ID: <4890111F.9080300@gmail.com> Chris Mills(e)k dio: > Greetings, > > I am new to Python, have never developed tools with C++ (I have > extensive MEL scripting experience with Autodesk's Maya), and am faced > with needing to develop tools to deploy into a Mac OSX 10.5 environment. > > I've downloaded and installed py2app with ez-install and now am faced > with getting it to work. > > I have a simple python script which runs from inside the IDE and does > what it is supposed to do, but I can not figure out how to get py2app to > work. I've seen a number of setup.py references about, but what I would > really like is a step by step procedure for getting a simple "hello > world" app to be built so that I can have some contextual reference and > from there I can probably iterate my way to a successful solution. > > Is there a basic guide out there? The docs on: > http://undefined.org/python/py2app.html > do not make sense to me. I would try to use the Python built in help system by running this on the terminal $ python setup.py py2app --help that should give you a description of all available options in py2app. This example below explores some basic ideas, i hope it is not too old. I have not used mac so much for the last year or so. ############ #!/usr/bin/env python from distutils.core import setup import py2app py2app_options = dict( argv_emulation = True, iconfile = 'pathtomyicon.icns', packages = ['anyextrapackageshere', 'pyglet', 'twister'], resources = [("stuff", ["stuff/file.txt", "stuff/file2.wav"])] # there are few more options here i never had to use ) setup( app=['MyApplication.py'], options=dict( py2app=py2app_options, ) ) ############# this is an example with some of the options you will find with the python console help above. The "resources" option allows to specify files and folders that have to included in the standalone. Anyway there must be some better documentation. Ah here it is something http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html good luck! enrike > Thanking you in advance for your patience and guidance. > > Kind regards, > Chris Mills > > Lizard Lounge Graphics, LTD. > Wellington, NZ > http://lizardlounge.com > > Int'l: +644-977-5400 / +642-174-8770 > NZ local: 04-977-5400 / 021-748-770 > > From Garry.Willgoose at newcastle.edu.au Thu Jul 31 09:05:14 2008 From: Garry.Willgoose at newcastle.edu.au (Garry Willgoose) Date: Thu, 31 Jul 2008 17:05:14 +1000 Subject: [Pythonmac-SIG] problem compiling extension modules for 10.5 Message-ID: <8757CD2D-F275-473D-9D7D-68DA1ED79C9E@newcastle.edu.au> I have posted this problem a few months ago on several places but it has languished. I have been developing an extension using ActivePython 2.5.2 under 10.4 for some time now. When I switched to 10.5 I can no longer do this. The module compiles fine but when I import the library I get the following message ... willgoose-macpro:modules garrywillgoose$ python ActivePython 2.5.2.2 (ActiveState Software Inc.) based on Python 2.5.2 (r252:60911, Mar 27 2008, 17:40:23) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import tsim Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap Now when the module is compiled on an old 10.4 machine (same python, everything) and then copied to the new 10.5 machine it works fine. The error I believe from what little I have already found out is because the versions (compilers, libraries, etc??) of python and my module are incompatible (somewhere I saw that activepython is compiled against 10.4). I tried setting the environment variable MACOSX_DEPLOYMENT_TARGET=10.4 but still no go. Any suggestions. ==================================================================== Prof Garry Willgoose, Australian Professorial Fellow in Environmental Engineering, Director, Centre for Climate Impact Management (C2IM), School of Engineering, The University of Newcastle, Callaghan, 2308 Australia. Centre webpage: www.c2im.org.au Phone: (International) +61 2 4921 6050 (Tues-Fri AM); +61 2 6545 9574 (Fri PM-Mon) FAX: (International) +61 2 4921 6991 (Uni); +61 2 6545 9574 (personal and Telluric) Env. Engg. Secretary: (International) +61 2 4921 6042 email: garry.willgoose at newcastle.edu.au; g.willgoose at telluricresearch.com email-for-life: garry.willgoose at alum.mit.edu personal webpage: www.telluricresearch.com/garry ==================================================================== "Do not go where the path may lead, go instead where there is no path and leave a trail" Ralph Waldo Emerson ==================================================================== From vip at avatar.com.au Thu Jul 31 11:54:49 2008 From: vip at avatar.com.au (DavidW) Date: Thu, 31 Jul 2008 19:54:49 +1000 Subject: [Pythonmac-SIG] py access to speech synth? Message-ID: Hello all, Does anyone know whether there's any work being done on a python interface to the OSX speech synthesiser? thanks, ________________________________________________ David Worrall. From anand.prabhakar.patil at gmail.com Thu Jul 31 12:02:29 2008 From: anand.prabhakar.patil at gmail.com (Anand Patil) Date: Thu, 31 Jul 2008 11:02:29 +0100 Subject: [Pythonmac-SIG] Fwd: MACOSX_DEPLOYMENT_TARGET with Leopard system Python In-Reply-To: <2bc7a5a50805300200y1aa71067n2108d2ead7674de9@mail.gmail.com> References: <2bc7a5a50805300010r185940daie74fa1c73c1c8274@mail.gmail.com> <2bc7a5a50805300200y1aa71067n2108d2ead7674de9@mail.gmail.com> Message-ID: <2bc7a5a50807310302n2dd80fdbx8dbc705135b62f2@mail.gmail.com> All, Since I posted this message, I've received 4 personal emails from people having similar problems. The Python.org python distribution makes it hard to build extensions on Leopard, especially with gcc 4.2. I can't claim to understand completely what the problems are but the makefile that comes in the installer has: - MACOSX_DEPLOYMENT_TARGET=10.3 - --enable-universalsdk=/Developer/SDKs/MacOSX10.4u.sdk - BASICFLAGS= ... -Wno-long-double -no-cpp-precomp (doesn't work with gcc 4.2) all of which can cause problems under some circumstances. It would be great if someone could make sure that the python.org mac python can build widely-used packages with compiled extensions like numpy, matplotlib and pytables on leopard with a range of compilers, or else put some caveats about its compatibility on the website. I ended up building python from source, but I had to pass arguments to the configure script, alter the makefile it generated and then hack Pyrex in order to get everything working right. I don't remember exactly what I did but if any files on my system would help I'd be happy to share them. I can also go back and retrace the steps I took if necessary. Thanks for your attention to this... it's hard to recommend colleagues to switch to Python knowing that they'll have to start with a difficult source install. Please copy me directly if you respond. Anand Patil ---------- Forwarded message ---------- From: Anand Patil Date: Fri, May 30, 2008 at 10:00 AM Subject: Re: MACOSX_DEPLOYMENT_TARGET with Leopard system Python To: pythonmac-SIG at python.org On Fri, May 30, 2008 at 8:10 AM, Anand Patil < anand.prabhakar.patil at gmail.com> wrote: > Hi all, > This languished on comp.lang.python, sorry about the cross-post. I'm > getting the following error: > > distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET > mismatch: now "10.3" but "10.5" during configure > > on Leopard using system Python when trying to compile some third-party > modules but not others. I've set MACOSX_DEPLOYMENT_TARGET to 10.5 to no > avail. It looks like lots of people have seen similar problems, but the > fixes seem to involve running configure, which means a new Python build. Is > it possible to fix the problem and still use the system Python? > > Thanks, > Anand Patil > Just to check, I downloaded the Python.org 2.5.2 distribution. Now when I try to compile numpy I get the following. It works with gcc 4.0 but not gcc 4.2... but I need to use gcc 4.2 later on, so I want to get Python to play nicely with it. How can I do that? Thanks, Anand sihpc03:numpy anand$ python setup.py build Running from numpy source directory. non-existing path in 'numpy/distutils': 'site.cfg' F2PY Version 2_5245 blas_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers'] lapack_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3'] running build running scons customize UnixCCompiler Found executable /usr/bin/gcc customize NAGFCompiler Could not locate executable f95 customize AbsoftFCompiler Could not locate executable f90 Could not locate executable f77 customize IBMFCompiler Could not locate executable xlf90 Could not locate executable xlf customize IntelFCompiler Could not locate executable ifort Could not locate executable ifc customize GnuFCompiler Could not locate executable g77 customize Gnu95FCompiler Found executable /usr/local/bin/gfortran customize Gnu95FCompiler customize UnixCCompiler customize UnixCCompiler using scons running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src building py_modules sources creating build creating build/src.macosx-10.3-i386-2.5 creating build/src.macosx-10.3-i386-2.5/numpy creating build/src.macosx-10.3-i386-2.5/numpy/distutils building extension "numpy.core.multiarray" sources creating build/src.macosx-10.3-i386-2.5/numpy/core Generating build/src.macosx-10.3-i386-2.5/numpy/core/config.h customize NAGFCompiler customize AbsoftFCompiler customize IBMFCompiler customize IntelFCompiler customize GnuFCompiler customize Gnu95FCompiler customize Gnu95FCompiler customize Gnu95FCompiler using config C compiler: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 compile options: '-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -Inumpy/core/src -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c' gcc: _configtest.c powerpc-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" i686-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" lipo: can't figure out the architecture type of: /var/folders/y4/y4M-NZ0GELKlXr2RyIgYgU+++TI/-Tmp-//ccwKb2oD.out powerpc-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" i686-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp' cc1: error: unrecognized command line option "-Wno-long-double" lipo: can't figure out the architecture type of: /var/folders/y4/y4M-NZ0GELKlXr2RyIgYgU+++TI/-Tmp-//ccwKb2oD.out failure. removing: _configtest.c _configtest.o Traceback (most recent call last): File "setup.py", line 96, in setup_package() File "setup.py", line 89, in setup_package configuration=configuration ) File "/Users/anand/working copies/numpy/numpy/distutils/core.py", line 184, in setup return old_setup(**new_attr) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/Users/anand/working copies/numpy/numpy/distutils/command/build.py", line 40, in run old_build.run(self) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/command/build.py", line 112, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 130, in run self.build_sources() File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 147, in build_sources self.build_extension_sources(ext) File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 250, in build_extension_sources sources = self.generate_sources(sources, ext) File "/Users/anand/working copies/numpy/numpy/distutils/command/build_src.py", line 307, in generate_sources source = func(extension, build_dir) File "numpy/core/setup.py", line 83, in generate_config_h raise SystemError,"Failed to test configuration. "\ SystemError: Failed to test configuration. See previous error messages for more information. sihpc03:numpy anand$ -------------- next part -------------- An HTML attachment was scrubbed... URL: From krabby at mac.com Thu Jul 31 15:49:09 2008 From: krabby at mac.com (Mike Keith) Date: Thu, 31 Jul 2008 14:49:09 +0100 Subject: [Pythonmac-SIG] [py2app] problems running .app built on 10.5 on standard 10.4 Message-ID: <1de4b0f00807310649s2b377f55pb17f7eb457cf948d@mail.gmail.com> hi there, probably a silly question, but i'm having trouble producing an .app of a python script which will run on a bog standard tiger system. the mac i'm building the .app on is running 10.5 and only has the default apple python 2.5. the error the person running 10.4 sees is: A Python runtime could be located. You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this application's Info.plist file. (should that be "A Python runtime could not..." ?) are my problems down to the fact that i'm using apple's python 2.5 to build the .app? does this force it into using the semi-standalone option? (certainly appears to) if so, any advice on how to proceed? cheers, Mike From Chris.Barker at noaa.gov Thu Jul 31 18:33:54 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 31 Jul 2008 09:33:54 -0700 Subject: [Pythonmac-SIG] [py2app] problems running .app built on 10.5 on standard 10.4 In-Reply-To: <1de4b0f00807310649s2b377f55pb17f7eb457cf948d@mail.gmail.com> References: <1de4b0f00807310649s2b377f55pb17f7eb457cf948d@mail.gmail.com> Message-ID: <4891E972.3010107@noaa.gov> Mike Keith wrote: > are my problems down to the fact that i'm using apple's python 2.5 to > build the .app? yes. > if so, any advice on how to proceed? Install the python.org python ,and use that to built your app -- it should then run on all systems >= 10.3.9 -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 hengist.podd at virgin.net Thu Jul 31 19:34:41 2008 From: hengist.podd at virgin.net (Hengist Podd) Date: Thu, 31 Jul 2008 17:34:41 +0000 (GMT) Subject: [Pythonmac-SIG] py access to speech synth? Message-ID: <391180805.1016071217525682027.JavaMail.mail@webmail02> An HTML attachment was scrubbed... URL: From krabby at mac.com Thu Jul 31 21:55:48 2008 From: krabby at mac.com (Mike Keith) Date: Thu, 31 Jul 2008 20:55:48 +0100 Subject: [Pythonmac-SIG] [py2app] problems running .app built on 10.5 on standard 10.4 In-Reply-To: <4891E972.3010107@noaa.gov> References: <1de4b0f00807310649s2b377f55pb17f7eb457cf948d@mail.gmail.com> <4891E972.3010107@noaa.gov> Message-ID: <1de4b0f00807311255h570c6916u429a339caf4f452d@mail.gmail.com> > Install the python.org python ,and use that to built your app -- it should > then run on all systems >= 10.3.9 thanks! that works a treat cheers, Mike From mcovill at mac.com Thu Jul 31 22:40:38 2008 From: mcovill at mac.com (Mike Covill) Date: Thu, 31 Jul 2008 16:40:38 -0400 Subject: [Pythonmac-SIG] [py2app] problems running .app built on 10.5 on standard 10.4 In-Reply-To: <4891E972.3010107@noaa.gov> References: <1de4b0f00807310649s2b377f55pb17f7eb457cf948d@mail.gmail.com> <4891E972.3010107@noaa.gov> Message-ID: <4E286598-0A14-4782-A0E9-4ACC985F3650@mac.com> On 31-Jul-08, at 12:33 PM, Christopher Barker wrote: > Mike Keith wrote: >> are my problems down to the fact that i'm using apple's python 2.5 to >> build the .app? > > yes. > >> if so, any advice on how to proceed? > > Install the python.org python ,and use that to built your app -- it > should then run on all systems >= 10.3.9 > > -Chris > Corollary to installing python.org python (currently 2.5.2, I believe), how can I install and use the PyObjC version 2.0 for Leopard packages? I have tried downloading the subversion copy of PyObjC at "http://svn.red-bean.com/pyobjc/trunk " and the script inside pyobjc fails (02-develop-all.sh). Is this script working for everyone else? Any hints would be appreciated, thanks. Mike From kw at codebykevin.com Thu Jul 31 23:07:23 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 31 Jul 2008 17:07:23 -0400 Subject: [Pythonmac-SIG] py access to speech synth? In-Reply-To: References: Message-ID: <4892298B.60106@codebykevin.com> DavidW wrote: > Does anyone know whether there's any work being done on a python > interface to the OSX speech synthesiser? > You should be able to access through PyObjC--look up NSSpeechSynthesizer. -- Kevin Walzer Code by Kevin http://www.codebykevin.com