From aahz at pythoncraft.com Sun May 2 03:55:57 2010 From: aahz at pythoncraft.com (Aahz) Date: Sat, 1 May 2010 18:55:57 -0700 Subject: [Pythonmac-SIG] Module Import Problem In-Reply-To: <4889F0BFBE944824A648A6D92DDFE01D@FTXH9K1> References: <20100424162223.GA7867@panix.com> <4889F0BFBE944824A648A6D92DDFE01D@FTXH9K1> Message-ID: <20100502015557.GA15893@panix.com> On Sun, Apr 25, 2010, Mike wrote: > > ImportError: > dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-1 > 0.3-fat.egg/objc/_objc.so, 2): Library not loaded: /usr/lib/libxml2.2.dylib > Referenced from: > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10 > .3-fat.egg/objc/_objc.so > Reason: Incompatible library version: _objc.so requires version 10.0.0 > or later, but libxml2.2.dylib provides version 9.0.0 Just for the record, this is from downloading PyObjC 2.2 from PyPI, which is only built on/for Mac 10.6. Your later guess that you need to build from source is entirely correct. However, you may be able to use MacPorts instead of downloading source directly. (Someone suggested that earlier when I was having problems, but I'd already managed to build from source myself.) -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "It is easier to optimize correct code than to correct optimized code." --Bill Harlan From smartmike1 at gmail.com Sun May 2 20:16:24 2010 From: smartmike1 at gmail.com (Mike) Date: Sun, 2 May 2010 14:16:24 -0400 Subject: [Pythonmac-SIG] Module Import Problem References: <20100424162223.GA7867@panix.com><4889F0BFBE944824A648A6D92DDFE01D@FTXH9K1> <20100502015557.GA15893@panix.com> Message-ID: I built the latest PyObjC from source and got the same error. Do I need to build the older version, PyObjC 2.0? Also, what is mac ports? Mike ----- Original Message ----- From: "Aahz" To: Sent: Saturday, May 01, 2010 9:55 PM Subject: Re: [Pythonmac-SIG] Module Import Problem > On Sun, Apr 25, 2010, Mike wrote: >> >> ImportError: >> dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-1 >> 0.3-fat.egg/objc/_objc.so, 2): Library not loaded: >> /usr/lib/libxml2.2.dylib >> Referenced from: >> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10 >> .3-fat.egg/objc/_objc.so >> Reason: Incompatible library version: _objc.so requires version 10.0.0 >> or later, but libxml2.2.dylib provides version 9.0.0 > > Just for the record, this is from downloading PyObjC 2.2 from PyPI, which > is only built on/for Mac 10.6. Your later guess that you need to build > from source is entirely correct. However, you may be able to use > MacPorts instead of downloading source directly. (Someone suggested that > earlier when I was having problems, but I'd already managed to build from > source myself.) > -- > Aahz (aahz at pythoncraft.com) <*> > http://www.pythoncraft.com/ > > "It is easier to optimize correct code than to correct optimized code." > --Bill Harlan > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG From aahz at pythoncraft.com Mon May 3 05:02:28 2010 From: aahz at pythoncraft.com (Aahz) Date: Sun, 2 May 2010 20:02:28 -0700 Subject: [Pythonmac-SIG] Module Import Problem In-Reply-To: References: <20100502015557.GA15893@panix.com> Message-ID: <20100503030227.GA14694@panix.com> First: please do not top-post -- you'll notice that none of the regulars do that on this list. On Sun, May 02, 2010, Mike wrote: > ----- Original Message ----- From: "Aahz" >> On Sun, Apr 25, 2010, Mike wrote: >>> >>> ImportError: >>> dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-1 >>> 0.3-fat.egg/objc/_objc.so, 2): Library not loaded: >>> /usr/lib/libxml2.2.dylib >>> Referenced from: >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10 >>> .3-fat.egg/objc/_objc.so >>> Reason: Incompatible library version: _objc.so requires version 10.0.0 >>> or later, but libxml2.2.dylib provides version 9.0.0 >> >> Just for the record, this is from downloading PyObjC 2.2 from PyPI, which >> is only built on/for Mac 10.6. Your later guess that you need to build >> from source is entirely correct. However, you may be able to use >> MacPorts instead of downloading source directly. (Someone suggested that >> earlier when I was having problems, but I'd already managed to build from >> source myself.) > > I built the latest PyObjC from source and got the same error. Do I need > to build the older version, PyObjC 2.0? Also, what is mac ports? You built PyObjC on 10.6, right? You need to build PyObjC 2.2 on 10.5 to use it on 10.5. You could have Googled MacPorts instead of waiting for my response: http://www.macports.org/ -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "It is easier to optimize correct code than to correct optimized code." --Bill Harlan From ronaldoussoren at mac.com Mon May 3 07:09:32 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 03 May 2010 07:09:32 +0200 Subject: [Pythonmac-SIG] Module Import Problem In-Reply-To: References: <20100424162223.GA7867@panix.com> <4889F0BFBE944824A648A6D92DDFE01D@FTXH9K1> <20100502015557.GA15893@panix.com> Message-ID: <71A5BAD6-91E6-40D8-A521-A2E387B50317@mac.com> On 2 May, 2010, at 20:16, Mike wrote: > I built the latest PyObjC from source and got the same error. What is 'the latest'? It should be possible to use "easy_install http://pypi.python.org/packages/source/p/pyobjc-core/pyobjc-core-2.2.tar.gz" to install pyobjc-core, then "easy_install pyobjc==2.2" to install the rest. Ronald > Do I need to build the older version, PyObjC 2.0? Also, what is mac ports? > > Mike > ----- Original Message ----- From: "Aahz" > To: > Sent: Saturday, May 01, 2010 9:55 PM > Subject: Re: [Pythonmac-SIG] Module Import Problem > > >> On Sun, Apr 25, 2010, Mike wrote: >>> >>> ImportError: >>> dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-1 >>> 0.3-fat.egg/objc/_objc.so, 2): Library not loaded: /usr/lib/libxml2.2.dylib >>> Referenced from: >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10 >>> .3-fat.egg/objc/_objc.so >>> Reason: Incompatible library version: _objc.so requires version 10.0.0 >>> or later, but libxml2.2.dylib provides version 9.0.0 >> >> Just for the record, this is from downloading PyObjC 2.2 from PyPI, which >> is only built on/for Mac 10.6. Your later guess that you need to build >> from source is entirely correct. However, you may be able to use >> MacPorts instead of downloading source directly. (Someone suggested that >> earlier when I was having problems, but I'd already managed to build from >> source myself.) >> -- >> Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ >> >> "It is easier to optimize correct code than to correct optimized code." >> --Bill Harlan >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From hengist.podd at virgin.net Mon May 3 16:01:27 2010 From: hengist.podd at virgin.net (has) Date: Mon, 3 May 2010 15:01:27 +0100 Subject: [Pythonmac-SIG] Question on appscript's entire_contents() call In-Reply-To: References: Message-ID: <61D282D7-C327-4CF2-A9C8-5E79461057E2@virgin.net> Andrew Wu wrote: > My team is using py-appscript to do some automated testing (via the > UI). We really like the entire_contents() call because it gives us > all the UI elements for a given application (as referenced via > app('System Events').processes[app_name]). However, entire_contents() > seems to return a list, and we lose the advantage of generating > complex queries to discover information about a set of objects. > Instead we've found ourselves having to iterate over the list and > querying each item of interest in the list, which results in a > significant performance hit. > > I have 2 primary questions: > > a) Is there a way to create complex queries on entire_contents in this > context, or am I stuck iterating over the list that is returned? Doesn't look like it. System Events declares the property's type as 'list [of references]'. (Compare with Finder's 'entire contents' property, which is declared as 'reference'.) So you have to retrieve the entire list before you can do anything with it. > b) The same operation on the resultant list on Snow Leopard (10.6.3) > seems to run 4x slower than on Leopard (10.5.8), discounting hardware > differences. Is there a way for me to setup the appscript > installation to mitigate this performance hit? Have you tried running 32-bit on both to see if it's a 32-/64-bit issue? Otherwise, I'm guessing any performance hit will be in OS X/System Events, though you'd need to profile your code to be sure. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From arif.amirani at gmail.com Tue May 4 21:39:10 2010 From: arif.amirani at gmail.com (Arif Amirani) Date: Wed, 5 May 2010 01:09:10 +0530 Subject: [Pythonmac-SIG] Error while trying to install pyobjc2.2b on SL 10.6.3 Message-ID: Hi all, Recently I had to upgrade to Python 2.6.5 for an issue reported by one of my users and as I had done in the past installed a custom install of Python 2.6.5 (which I ship with the app). Everything went smooth but while installing PyObjc 2.2b itself I got the following error: ironman:temp arif$ easy_install pyobjc==2.2b2 Searching for pyobjc==2.2b2 Running pyobjc-framework-SystemConfiguration-2.2b2/setup.py -q bdist_egg --dist-dir /var/folders/nw/nwn2NyaOHmKGsqzdPdzbm++++TI/-Tmp-/easy_install-yDhfjL/pyobjc-framework-SystemConfiguration-2.2b2/egg-dist-tmp-cWmDsY :0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi Modules/_manual.m: In function ?mod_SCDynamicStoreCreate?: Modules/_manual.m:228: error: Mac OS X version 10.5 or later is needed for zerocost-exceptions error: Setup script exited with error: command 'gcc' failed with exit status 1 This is 10.6.3 Mac OS X Server VM running on VMWare Fusion. Appreciate any pointers in the right direction. Thanks, Arif From nitroamos at gmail.com Wed May 5 09:43:21 2010 From: nitroamos at gmail.com (Amos Anderson) Date: Wed, 5 May 2010 00:43:21 -0700 Subject: [Pythonmac-SIG] python library missing _environ symbol Message-ID: i'm having trouble with my non-standard way of building python. what I want to do is bundle Python-2.6.5.tar.bz2 with my software, so that the version i want can be built along with my code, which might happen on osx or linux etc. part of my software includes C++ extensions w/ boost, so my build system needs to link to the correct local version of python. here's (one of) the problem i've run into. ./configure --enable-universalsdk --with-universal-archs=intel then building my project I get: Undefined symbols: "_environ", referenced from: _initposix in libpython2.6.dylib(posixmodule.o) (maybe you meant: cstring=ignore_environment) ld: symbol(s) not found collect2: ld returned 1 exit status ...failed darwin.link.dll boost/boost_1_42_0/bin.v2/libs/python/build/darwin-4.2.1/release-triad/libboost_python.dylib... and sure enough: > nm libpython2.6.a | grep environ nm: no name list U _environ now, i can get _environ if I do it this way: ./configure --enable-framework --enable-universalsdk --with-universal-archs=intel > nm libpython2.6.a | grep environ nm: no name list 0000000000025768 b _environ so it appears to be the case that the _environ symbol is included if --enable-framework is added to the configure options, but is undefined if --enable-framework is not added. now, if I were actually planning on installing this in /Library/Frameworks/ then this behavior would be ok. however, because i want to treat my python install in an OS agnostic way, I don't want to use the --enable-framework option. is there another way to do this? i'm not enthusiastic about monkeying around in Python-2.6.5.tar.bz2 and then zipping it back up again, but if that's the only way then so be it... it seems to be the case that configure has some setting that's triggered with frameworks, so if someone could help me figure out how to trigger that setting in a more general context, then that might be the easiest thing to do. thanks! amos. From amorris at mistermorris.com Wed May 5 14:39:09 2010 From: amorris at mistermorris.com (Adam Morris) Date: Wed, 5 May 2010 19:39:09 +0700 Subject: [Pythonmac-SIG] Keywords <=> Variables in appscript Message-ID: How can one refer to keywords (the k) given a variable? I'm working on a script that allows users to tell pages, for example, to set the current selection's properties to stroke type: solid, stroke width: 1.0. But I want to abstract all of this away. Coercion is simple enough, but what to do about defined keywords when given a string? From ronaldoussoren at mac.com Wed May 5 22:15:11 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 05 May 2010 22:15:11 +0200 Subject: [Pythonmac-SIG] python library missing _environ symbol In-Reply-To: References: Message-ID: <1838CA54-ED72-4526-BC39-1292820E4E4A@mac.com> On 5 May, 2010, at 9:43, Amos Anderson wrote: > i'm having trouble with my non-standard way of building python. what I > want to do is bundle Python-2.6.5.tar.bz2 with my software, so that > the version i want can be built along with my code, which might happen > on osx or linux etc. part of my software includes C++ extensions w/ > boost, so my build system needs to link to the correct local version > of python. here's (one of) the problem i've run into. > > ./configure --enable-universalsdk --with-universal-archs=intel > > then building my project I get: > > Undefined symbols: > "_environ", referenced from: > _initposix in libpython2.6.dylib(posixmodule.o) > (maybe you meant: cstring=ignore_environment) > ld: symbol(s) not found > collect2: ld returned 1 exit status > ...failed darwin.link.dll > boost/boost_1_42_0/bin.v2/libs/python/build/darwin-4.2.1/release-triad/libboost_python.dylib... > > and sure enough: >> nm libpython2.6.a | grep environ > nm: no name list > U _environ > > > now, i can get _environ if I do it this way: > ./configure --enable-framework --enable-universalsdk > --with-universal-archs=intel > >> nm libpython2.6.a | grep environ > nm: no name list > 0000000000025768 b _environ > > > so it appears to be the case that the _environ symbol is included if > --enable-framework is added to the configure options, but is undefined > if --enable-framework is not added. now, if I were actually planning > on installing this in /Library/Frameworks/ then this behavior would be > ok. however, because i want to treat my python install in an OS > agnostic way, I don't want to use the --enable-framework option. > > is there another way to do this? i'm not enthusiastic about monkeying > around in Python-2.6.5.tar.bz2 and then zipping it back up again, but > if that's the only way then so be it... it seems to be the case that > configure has some setting that's triggered with frameworks, so if > someone could help me figure out how to trigger that setting in a more > general context, then that might be the easiest thing to do. This is probably related to . There is no _environ symbol on MacOSX, it just happens to work with a framework build if you force single-level namespaces because Modules/posixmodule.c defines a local "environ" variable for framework builds. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From nitroamos at gmail.com Thu May 6 02:37:16 2010 From: nitroamos at gmail.com (Amos Anderson) Date: Wed, 5 May 2010 17:37:16 -0700 Subject: [Pythonmac-SIG] extensions not loading Message-ID: hello -- i'm trying to embed python in my software so that i don't have to worry about which version clients have installed. this is causing lots of random errors on OSX 10.6.3, but appears to work just fine on linux... here's as far as I've gotten... 1) I added this to my Jamroot: using python : 2.6 : python/bin/python2.6 : python/include/python2.6 : python/lib/python2.6/config : ; 2) I downloaded python 2.6.5 .tar.bz2 and put it in my source tree. I've added these steps to my Makefile: tar -xjf $(PYTHON_DIR)/Python-2.6.5.tar.bz2 -C $(PYTHON_DIR) ./configure --prefix=$(CURDIR)/$(PYTHON_DIR) make && make install cp $(PYTHON_DIR)/lib/python2.6/config/libpython2.6.a $(PYTHON_DIR)/lib/python2.6/config/libpython2.6.dylib where the last step seemed necessary because OSX requires a dynamic library, and if it doesn't find one, it will link to the system's framework version instead, which is a different version of python. 3) Patched my python according to this bug (because _environ wasn't being included if i'm not building a framework, thanks Ronald for finding this for me) http://bugs.python.org/issue1602133 4) Compiles & links with no errors or warnings. Paths all appear to be ok when I do bjam -d2 5) Inspecting my build (to make sure everything is 64 bit): > lipo -detailed_info libboost_python.dylib input file libboost_python.dylib is not a fat file Non-fat file: libboost_python.dylib is architecture: x86_64 > lipo -detailed_info libpython2.6.dylib input file libpython2.6.dylib is not a fat file Non-fat file: libpython2.6.dylib is architecture: x86_64 > lipo -detailed_info python input file python is not a fat file Non-fat file: python is architecture: x86_64 > otool -L libboost_python.dylib libboost_python.dylib: libboost_python.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) (should I see libpython2.6.dylib listed here????) 6) Running my code: $trunk/src/python/bin/python -v myscript.py .... Fatal Python error: Interpreter not initialized (version mismatch?) ../triad.sh: line 19: 56200 Abort trap $trunk/src/python/bin/python -v $@ 7) Trying to force load my library: setenv DYLD_INSERT_LIBRARIES /Users/amos/triad/trunk/src/python/lib/python2.6/config/libpython2.6.dylib $trunk/src/python/bin/python -v myscript.py dyld: could not load inserted library: /Users/amos/triad/trunk/src/python/lib/python2.6/config/libpython2.6.dylib Trace/BPT trap 8) I tried this: ./configure --enable-universalsdk --with-universal-archs=intel --prefix=$(CURDIR)/$(PYTHON_DIR) and it didn't work either. next up, i'll figure out the framework issue here: http://bugs.python.org/issue3646 so i can try that option too. amos. From lists at mostrom.pp.se Thu May 6 16:28:37 2010 From: lists at mostrom.pp.se (=?iso-8859-1?Q?Jan_Erik_Mostr=F6m?=) Date: Thu, 6 May 2010 16:28:37 +0200 Subject: [Pythonmac-SIG] Problems with Tk (I think) Message-ID: I'm new to Tk so it might be something that I might be doing wrong but I have a crash that I can't find the cause to. The error message I get on the crash is: python(19468,0x7fff70f5cbe0) malloc: *** error for object 0x1002c5a10: double free *** set a breakpoint in malloc_error_break to debug Abort trap This is using the standard 2.6.1 version on OS X 10.6.3, but version 2.5 give the same result. When I try this using a linux box (v2.5.2) the program runs as it should. I tried to using the debugger to single step through the critical lines and it seem to crash when it should return from a menu item handler. The code for that handler looks like this def saveToFile(self): filename = dlg.asksaveasfilename() self._storage.store(filename,self._win.getText()) Single stepping seem to indicate that the call to self._win.getText() works just fine, the store command saves some text to a file and the file is created with the correct text, but then something seem to happen: (Pdb) s --Return-- > /Users/jem/Desktop/testing.py(96)saveToFile()->None -> self._storage.store(filename,self._win.getText()) (Pdb) s 2010-05-06 15:40:54.806 Python[19589:d07] *** __NSAutoreleaseFreedObject(): release of previously deallocated object (0x1011466f0) ignored Does anyone have an idea what could be causing this? The complete code is available at (and yes, I know that the code looks a bit strange but I have my reasons :) - jem From hengist.podd at virgin.net Thu May 6 19:14:20 2010 From: hengist.podd at virgin.net (has) Date: Thu, 6 May 2010 18:14:20 +0100 Subject: [Pythonmac-SIG] Keywords <=> Variables in appscript In-Reply-To: References: Message-ID: Adam Morris wrote: > How can one refer to keywords (the k) given a variable? from appscript import * s = 'some_keyword' print getattr(k, s) # k.some_keyword HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From kw at codebykevin.com Fri May 7 16:35:18 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 07 May 2010 10:35:18 -0400 Subject: [Pythonmac-SIG] Problems with Tk (I think) In-Reply-To: References: Message-ID: <4BE42526.8010505@codebykevin.com> On 5/6/10 10:28 AM, Jan Erik Mostr?m wrote: > I'm new to Tk so it might be something that I might be doing wrong but I have a crash that I can't find the cause to. > > The error message I get on the crash is: > > python(19468,0x7fff70f5cbe0) malloc: *** error for object 0x1002c5a10: double free > *** set a breakpoint in malloc_error_break to debug > Abort trap > > > This is using the standard 2.6.1 version on OS X 10.6.3, but version 2.5 give the same result. > > When I try this using a linux box (v2.5.2) the program runs as it should. > > I tried to using the debugger to single step through the critical lines and it seem to crash when it should return from a menu item handler. > > The code for that handler looks like this > > def saveToFile(self): > filename = dlg.asksaveasfilename() > self._storage.store(filename,self._win.getText()) > > Single stepping seem to indicate that the call to self._win.getText() works just fine, the store command saves some text to a file and the file is created with the correct text, but then something seem to happen: > > (Pdb) s > --Return-- >> /Users/jem/Desktop/testing.py(96)saveToFile()->None > -> self._storage.store(filename,self._win.getText()) > (Pdb) s > 2010-05-06 15:40:54.806 Python[19589:d07] *** __NSAutoreleaseFreedObject(): release of previously deallocated object (0x1011466f0) ignored > > > > Does anyone have an idea what could be causing this? > > The complete code is available at (and yes, I know that the code looks a bit strange but I have my reasons :) > > - jem > _______________________________________________ > I'm able to run your code on Leopard (10.5.8) with Python 2.6.2 and a 64-bit Cocoa-based build of Tk (similar to the system Tcl/Tk on Snow Leopard) and I don't see any crashes; I'm not able to reproduce this error. You might actually want to consider filing a bug with Apple, because this type of crash is coming from deep within Python or Tk's internals--not in your code. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From smartmike1 at gmail.com Sun May 9 22:21:37 2010 From: smartmike1 at gmail.com (Mike) Date: Sun, 9 May 2010 16:21:37 -0400 Subject: [Pythonmac-SIG] Module Import Problem References: <20100424162223.GA7867@panix.com> <4889F0BFBE944824A648A6D92DDFE01D@FTXH9K1> <20100502015557.GA15893@panix.com> <71A5BAD6-91E6-40D8-A521-A2E387B50317@mac.com> Message-ID: ----- Original Message ----- From: "Ronald Oussoren" To: "Mike" Cc: Sent: Monday, May 03, 2010 1:09 AM Subject: Re: [Pythonmac-SIG] Module Import Problem On 2 May, 2010, at 20:16, Mike wrote: > I built the latest PyObjC from source and got the same error. What is 'the latest'? It should be possible to use "easy_install http://pypi.python.org/packages/source/p/pyobjc-core/pyobjc-core-2.2.tar.gz" to install pyobjc-core, then "easy_install pyobjc==2.2" to install the rest. Ronald I followed your suggestion and installed pyobjc-core. Now my program runs, but the window pops up for a second then closes. I'm using Wx for my gui. Also, pygame does not play any sounds, I tried this separately from the program itself, it loads sounds and does not play them. Sorry I don't have anymore information, but the program just closes without any errors, works fine on Windows and Linux. Mike > Do I need to build the older version, PyObjC 2.0? Also, what is mac ports? > > Mike > ----- Original Message ----- From: "Aahz" > To: > Sent: Saturday, May 01, 2010 9:55 PM > Subject: Re: [Pythonmac-SIG] Module Import Problem > > >> On Sun, Apr 25, 2010, Mike wrote: >>> >>> ImportError: >>> dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-1 >>> 0.3-fat.egg/objc/_objc.so, 2): Library not loaded: >>> /usr/lib/libxml2.2.dylib >>> Referenced from: >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10 >>> .3-fat.egg/objc/_objc.so >>> Reason: Incompatible library version: _objc.so requires version 10.0.0 >>> or later, but libxml2.2.dylib provides version 9.0.0 >> >> Just for the record, this is from downloading PyObjC 2.2 from PyPI, which >> is only built on/for Mac 10.6. Your later guess that you need to build >> from source is entirely correct. However, you may be able to use >> MacPorts instead of downloading source directly. (Someone suggested that >> earlier when I was having problems, but I'd already managed to build from >> source myself.) >> -- >> Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ >> >> "It is easier to optimize correct code than to correct optimized code." >> --Bill Harlan >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG From ronaldoussoren at mac.com Tue May 11 09:49:45 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 11 May 2010 09:49:45 +0200 Subject: [Pythonmac-SIG] Python 2.7b2 Message-ID: Hi, As you might know the second beta of python 2.7 was released last weekend. This is the first beta with macosx installers, they can be downloaded from There are two installers: one for OSX 10.3 or later and one for OSX 10.5 later. The "10.3" installer includes support for 32-bit CPUs, while the "10.5" one supports 64-bit intel code as well. Ronald P.S. The "10.3" installer is simular to the installers for previous releases and works on 10.5/10.6 as well. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue May 11 10:04:41 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 11 May 2010 10:04:41 +0200 Subject: [Pythonmac-SIG] Module Import Problem In-Reply-To: References: <20100424162223.GA7867@panix.com> <4889F0BFBE944824A648A6D92DDFE01D@FTXH9K1> <20100502015557.GA15893@panix.com> <71A5BAD6-91E6-40D8-A521-A2E387B50317@mac.com> Message-ID: On 9 May, 2010, at 22:21, Mike wrote: > > ----- Original Message ----- From: "Ronald Oussoren" > To: "Mike" > Cc: > Sent: Monday, May 03, 2010 1:09 AM > Subject: Re: [Pythonmac-SIG] Module Import Problem > > > > On 2 May, 2010, at 20:16, Mike wrote: > >> I built the latest PyObjC from source and got the same error. > > What is 'the latest'? It should be possible to use "easy_install http://pypi.python.org/packages/source/p/pyobjc-core/pyobjc-core-2.2.tar.gz" to install pyobjc-core, then "easy_install pyobjc==2.2" to install the rest. > > Ronald > > I followed your suggestion and installed pyobjc-core. Now my program runs, > but the window pops up for a second then closes. I'm using Wx for my gui. > Also, pygame does not play any sounds, I tried this separately from the > program itself, it loads sounds and does not play them. Sorry I don't have > anymore information, but the program just closes without any errors, works > fine on Windows and Linux. You may get an unexpected exception. The easiest way to look for them is to start the binary from the command-line, if your application is named 'Foo.app' you can start it using '/path/to/Foo.app/Contents/MacOS/Foo'. That will behave the same as double-clicking on the app icon, except that you'll be able to see the stdout/stderr streams from the program. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From smartmike1 at gmail.com Tue May 11 17:47:14 2010 From: smartmike1 at gmail.com (Mike) Date: Tue, 11 May 2010 11:47:14 -0400 Subject: [Pythonmac-SIG] Module Import Problem References: <20100424162223.GA7867@panix.com> <4889F0BFBE944824A648A6D92DDFE01D@FTXH9K1> <20100502015557.GA15893@panix.com> <71A5BAD6-91E6-40D8-A521-A2E387B50317@mac.com> Message-ID: ----- Original Message ----- From: "Ronald Oussoren" To: "Mike" Cc: Sent: Tuesday, May 11, 2010 4:04 AM Subject: Re: [Pythonmac-SIG] Module Import Problem On 9 May, 2010, at 22:21, Mike wrote: > > ----- Original Message ----- From: "Ronald Oussoren" > > To: "Mike" > Cc: > Sent: Monday, May 03, 2010 1:09 AM > Subject: Re: [Pythonmac-SIG] Module Import Problem > > > > On 2 May, 2010, at 20:16, Mike wrote: > >> I built the latest PyObjC from source and got the same error. > > What is 'the latest'? It should be possible to use "easy_install > http://pypi.python.org/packages/source/p/pyobjc-core/pyobjc-core-2.2.tar.gz" > to install pyobjc-core, then "easy_install pyobjc==2.2" to install the > rest. > > Ronald > > I followed your suggestion and installed pyobjc-core. Now my program runs, > but the window pops up for a second then closes. I'm using Wx for my gui. > Also, pygame does not play any sounds, I tried this separately from the > program itself, it loads sounds and does not play them. Sorry I don't have > anymore information, but the program just closes without any errors, works > fine on Windows and Linux. You may get an unexpected exception. The easiest way to look for them is to start the binary from the command-line, if your application is named 'Foo.app' you can start it using '/path/to/Foo.app/Contents/MacOS/Foo'. That will behave the same as double-clicking on the app icon, except that you'll be able to see the stdout/stderr streams from the program. Ronald I haven't built it to an app yet. I'm still running from source, from the command line, and there is no traceback. Could this be a problem with WXPython? I noticed something on their site that it requires a special Mac build of Python, but since I installed the mac build of Python from python.org I didn't think this would be a concern. Mike From Chris.Barker at noaa.gov Tue May 11 19:36:54 2010 From: Chris.Barker at noaa.gov (Chris Barker) Date: Tue, 11 May 2010 10:36:54 -0700 Subject: [Pythonmac-SIG] Python 2.7b2 In-Reply-To: References: Message-ID: <4BE995B6.2030609@noaa.gov> Ronald Oussoren wrote: > As you might know the second beta of python 2.7 was released last weekend. This is the first beta with macosx installers, they can be downloaded from great!, thanks Ronald. > There are two installers: one for OSX 10.3 or later and one for OSX > 10.5 later. The "10.3" installer includes support for 32-bit CPUs, > while the "10.5" one supports 64-bit intel code as well. so the 10.5+ one is: PPC32, Intel32, Intel64 ? -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 guillaume.viry at gmail.com Wed May 12 05:04:47 2010 From: guillaume.viry at gmail.com (Guillaume VIRY) Date: Wed, 12 May 2010 12:04:47 +0900 Subject: [Pythonmac-SIG] py2app and zlib Message-ID: Hello everyone I'm trying to package an application with py2app on Snow Leopard, but I can't even build a Hello Word application. I installed Python26 via MacPorts, as well as py2app and pyselect with all their dependencies. I switch my default Python to the MacPorts one. So far everything seems fine and the application works perfectly in the console. Then, problem. When I try to run the built application: 5/8/10 9:05:55 AM [0x0-0x2e62e6].org.pythonmac.unspecified.toto[73116] zipimport.ZipImportError: can't decompress data; zlib not available 5/8/10 9:05:55 AM toto[73116] toto Error 5/8/10 9:05:55 AM toto[73116] toto Error An unexpected error has occurred during execution of the main script ZipImportError: can't decompress data; zlib not available 5/8/10 9:05:58 AM com.apple.launchd.peruser.501[111] ([0x0-0x2e62e6].org.pythonmac.unspecified.toto[73116]) Exited with exit code: 255 After further verification, zlib.so is in the built package. And an "import zlib" works in my python console. Could anyone help me with this ? I'm out of ideas :( -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Thu May 13 09:21:28 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 13 May 2010 09:21:28 +0200 Subject: [Pythonmac-SIG] Python 2.7b2 In-Reply-To: <4BE995B6.2030609@noaa.gov> References: <4BE995B6.2030609@noaa.gov> Message-ID: <737DDE36-C393-4E2D-8A94-87A9E4A48C7C@mac.com> On 11 May, 2010, at 19:36, Chris Barker wrote: > Ronald Oussoren wrote: >> As you might know the second beta of python 2.7 was released last weekend. This is the first beta with macosx installers, they can be downloaded from > > great!, thanks Ronald. > > >> There are two installers: one for OSX 10.3 or later and one for OSX >> 10.5 later. The "10.3" installer includes support for 32-bit CPUs, >> while the "10.5" one supports 64-bit intel code as well. > > so the 10.5+ one is: PPC32, Intel32, Intel64 ? That is correct. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From memilanuk at gmail.com Sun May 16 04:12:18 2010 From: memilanuk at gmail.com (Monte Milanuk) Date: Sat, 15 May 2010 19:12:18 -0700 Subject: [Pythonmac-SIG] Trying to find a .def file Message-ID: Hello all, I'm trying to setup an extension to idle (vidle) and the instructions talk about a file 'config-extensions.def'. The author works primarily on a PC and I'm obviously working on a Mac (Python 2.6.5, if it matters). I've tried searching the entire hard drive for this file, but only turned up two results: one file as part of the Sage installation, and another as part of a vpython installation (both installed out of curiosity rather than any need/use). So at this point I'm kind of unsure as to how to proceed? Any suggestions? TIA, Monte From pythonmac at rebertia.com Sun May 16 04:24:14 2010 From: pythonmac at rebertia.com (Chris Rebert) Date: Sat, 15 May 2010 19:24:14 -0700 Subject: [Pythonmac-SIG] Trying to find a .def file In-Reply-To: References: Message-ID: On Sat, May 15, 2010 at 7:12 PM, Monte Milanuk wrote: > Hello all, > > I'm trying to setup an extension to idle (vidle) and the instructions talk > about a file 'config-extensions.def'. ?The author works primarily on a PC > and I'm obviously working on a Mac (Python 2.6.5, if it matters). ?I've > tried searching the entire hard drive for this file, but only turned up two > results: ?one file as part of the Sage installation, and another as part of > a vpython installation (both installed out of curiosity rather than any > need/use). ?So at this point I'm kind of unsure as to how to proceed? > > Any suggestions? $ locate idlelib | grep def | grep extensions Worked for me. Results: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/config-extensions.def (and the obvious 2.5 and 2.3 variants) /sw/lib/python2.6/idlelib//config-extensions.def (since I use Fink) Cheers, Chris -- http://blog.rebertia.com From memilanuk at gmail.com Sun May 16 06:50:30 2010 From: memilanuk at gmail.com (Monte Milanuk) Date: Sat, 15 May 2010 21:50:30 -0700 Subject: [Pythonmac-SIG] Trying to find a .def file In-Reply-To: References: Message-ID: On 5/15/10 7:24 PM, Chris Rebert wrote: > $ locate idlelib | grep def | grep extensions > > Worked for me. > > Results: > /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/config-extensions.def > (and the obvious 2.5 and 2.3 variants) > /sw/lib/python2.6/idlelib//config-extensions.def > (since I use Fink) Hmmm. That worked, after I generated the locatedb file. Guess it's been a looooong while since I've used this laptop in anything resembling a Unix-y fashion ;) I hadn't even thought about using 'locate'. Anywho, this is what I got: macbook:~ monte$ locate idlelib | grep def | grep extensions /Applications/Gimp.app/Contents/Resources/lib/python2.5/idlelib/config-extensions.def /Applications/Komodo Edit.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/config-extensions.def /Applications/sage/local/lib/python2.6/idlelib/config-extensions.def /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/config-extensions.def /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib/config-extensions.def /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/idlelib/config-extensions.def /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/idlelib/config-extensions.def /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/config-extensions.def macbook:~ monte$ This might be another exceptionally dumb question... but is there a (simple) way to get Finder to actually search the *whole* hard drive when I want it to - including /System and such? 'Cuz the /Applications/sage/.../config-extensions.def file showed up in a search of the 'whole hard drive' in Finder, and another file that didn't even show up here (but it was in a folder in my home directory...). All the other files, even the ones under /Applications (like the sage directory) didn't show up at all? Thanks, Monte From smartmike1 at gmail.com Sun May 16 20:06:36 2010 From: smartmike1 at gmail.com (Mike) Date: Sun, 16 May 2010 14:06:36 -0400 Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac Message-ID: <4F4F590084694803AD510D5858EC297E@FTXH9K1> Hi, I'm sure you've seen my thread that started off with a module import problem. Now, I've really hit a dead end since the program won't even stay open and there's no traceback to give me a starting point. Could someone who's experienced in python mac development and has some extra time be willing to look at my app and try to help me figure this out? I'd be willing to give the SVN info, just email me off list. The project I'm working on will bring accessible games to blind mac users, so I'd greatly appreciate it if someone would help out, and it would help a lot of people as well. Thanks in advance. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From aahz at pythoncraft.com Mon May 17 03:49:44 2010 From: aahz at pythoncraft.com (Aahz) Date: Sun, 16 May 2010 18:49:44 -0700 Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac In-Reply-To: <4F4F590084694803AD510D5858EC297E@FTXH9K1> References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> Message-ID: <20100517014943.GA26213@panix.com> On Sun, May 16, 2010, Mike wrote: > > I'm sure you've seen my thread that started off with a module import > problem. Now, I've really hit a dead end since the program won't even > stay open and there's no traceback to give me a starting point. Could > someone who's experienced in python mac development and has some extra > time be willing to look at my app and try to help me figure this > out? I'd be willing to give the SVN info, just email me off list. The > project I'm working on will bring accessible games to blind mac users, > so I'd greatly appreciate it if someone would help out, and it would > help a lot of people as well. Have you looked in the console logs? (Your cause is important to me, but I have nearly zero time other than sporadic mailing list activity.) -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ f u cn rd ths, u cn gt a gd jb n nx prgrmmng. From janssen at parc.com Mon May 17 04:11:52 2010 From: janssen at parc.com (Bill Janssen) Date: Sun, 16 May 2010 19:11:52 PDT Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac In-Reply-To: <4F4F590084694803AD510D5858EC297E@FTXH9K1> References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> Message-ID: <10318.1274062312@parc.com> Mike, I looked back at your messages. I find that things work best on the Mac when I don't try to install things that Apple has already installed -- just my experience. Once you start doing that, you've almost got to take a couple of months and understand everything from source. There are also some red flags in your messages. Using a non-Apple version of Python on OS X is one, downloading a new version of PyObjC is a second, using easy_install (for anything) a third. Mixing PyObjC with Wx is a fourth, because it introduces issues about the event loop, but less red, because it is certainly doable. My advice would be to try getting this pyttsx module to work by itself, using the system Python on a vanilla OS X machine, first. Only then make life complicated. Good luck! Bill From janssen at parc.com Mon May 17 04:28:54 2010 From: janssen at parc.com (Bill Janssen) Date: Sun, 16 May 2010 19:28:54 PDT Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac In-Reply-To: <4F4F590084694803AD510D5858EC297E@FTXH9K1> References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> Message-ID: <10428.1274063334@parc.com> I tried pyttsx on a Mac running 10.5.8: % ls MANIFEST.in README pyttsx setup.cfg PKG-INFO docs pyttsx.egg-info setup.py % python setup.py build Traceback (most recent call last): File "setup.py", line 18, in from ez_setup import use_setuptools ImportError: No module named ez_setup % So I opened up setup.py, and removed the two lines that read: from ez_setup import use_setuptools use_setuptools() Then, "python setup.py build", and "python setup.py install". Then: % python Python 2.5.1 (r251:54863, Jun 17 2009, 20:37:34) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pyttsx >>> eng = pyttsx.init() >>> eng.say("hello hello hello") >>> eng.runAndWait() # and "hello hello hello" comes out of the speakers >>> Seems to work. No additional downloads needed. Bill From smartmike1 at gmail.com Mon May 17 05:23:33 2010 From: smartmike1 at gmail.com (Mike) Date: Sun, 16 May 2010 23:23:33 -0400 Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> <10318.1274062312@parc.com> Message-ID: <38819840983C41D0B5C4C987DABE4BAF@FTXH9K1> ----- Original Message ----- From: "Bill Janssen" To: "Mike" Cc: ; Sent: Sunday, May 16, 2010 10:11 PM Subject: Re: [Pythonmac-SIG] Still Unable to get my Python program working on the mac > Mike, I looked back at your messages. I find that things work best on > the Mac when I don't try to install things that Apple has already > installed -- just my experience. Once you start doing that, you've > almost got to take a couple of months and understand everything from > source. > > There are also some red flags in your messages. Using a non-Apple > version of Python on OS X is one, downloading a new version of PyObjC is > a second, using easy_install (for anything) a third. Mixing PyObjC with > Wx is a fourth, because it introduces issues about the event loop, but > less red, because it is certainly doable. > > My advice would be to try getting this pyttsx module to work by itself, > using the system Python on a vanilla OS X machine, first. Only then > make life complicated. > > Good luck! > > Bill > Thakns, we think we figured out that it's WX and Pyttsx not working right together. Apparently, there's a way to have Pyttsx use ctypes. We found some stuff at http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSpeechSynthesizer_Class/Reference/Reference.html and http://stackoverflow.com/questions/1490039/calling-objective-c-functions-from-python We can't seem to get it working though. How would we do this? Mike From smartmike1 at gmail.com Tue May 18 05:04:10 2010 From: smartmike1 at gmail.com (Mike) Date: Mon, 17 May 2010 23:04:10 -0400 Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> <10428.1274063334@parc.com> Message-ID: <2B406AAA1D7042488AEFCC4F3AB72937@FTXH9K1> ----- Original Message ----- From: "Bill Janssen" To: "Mike" Cc: ; Sent: Sunday, May 16, 2010 10:28 PM Subject: Re: [Pythonmac-SIG] Still Unable to get my Python program working on the mac >I tried pyttsx on a Mac running 10.5.8: > > % ls > MANIFEST.in README pyttsx setup.cfg > PKG-INFO docs pyttsx.egg-info setup.py > % python setup.py build > Traceback (most recent call last): > File "setup.py", line 18, in > from ez_setup import use_setuptools > ImportError: No module named ez_setup > % > > So I opened up setup.py, and removed the two lines that read: > > from ez_setup import use_setuptools > use_setuptools() > > Then, "python setup.py build", and "python setup.py install". > > Then: > > % python > Python 2.5.1 (r251:54863, Jun 17 2009, 20:37:34) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import pyttsx >>>> eng = pyttsx.init() >>>> eng.say("hello hello hello") >>>> eng.runAndWait() > # and "hello hello hello" comes out of the speakers >>>> > > Seems to work. No additional downloads needed. > > Bill Hi, I have found an example that uses CTypes and the NSSpeechSynthesizer, but it doesn't seem to work. (I am not getting any errors) . The only feature we really need from this file is the SpeakString() and the stopping of speech. You can find the example here: http://www.mail-archive.com/pythonmac-sig at python.org/msg02231.html As I indicated in my previous message I commented out of all the speech related stuff and the app worked. So I'm assuming it's the combination of PyObjC and wx. Mike From janssen at parc.com Tue May 18 08:22:42 2010 From: janssen at parc.com (Bill Janssen) Date: Mon, 17 May 2010 23:22:42 PDT Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac In-Reply-To: <2B406AAA1D7042488AEFCC4F3AB72937@FTXH9K1> References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> <10428.1274063334@parc.com> <2B406AAA1D7042488AEFCC4F3AB72937@FTXH9K1> Message-ID: <26822.1274163762@parc.com> An easy way to speak stuff on the Mac from Python is import os os.system("/usr/bin/say 'hello hello hello'") Bill From smartmike1 at gmail.com Wed May 19 02:24:26 2010 From: smartmike1 at gmail.com (Mike) Date: Tue, 18 May 2010 20:24:26 -0400 Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> <10428.1274063334@parc.com> <2B406AAA1D7042488AEFCC4F3AB72937@FTXH9K1> <26822.1274163762@parc.com> Message-ID: <37690065BFD743F19DD3681E8966BA60@FTXH9K1> ----- Original Message ----- From: "Bill Janssen" To: "Mike" Cc: ; Sent: Tuesday, May 18, 2010 2:22 AM Subject: Re: [Pythonmac-SIG] Still Unable to get my Python program working on the mac > An easy way to speak stuff on the Mac from Python is > > import os > os.system("/usr/bin/say 'hello hello hello'") > > Bill Thanks, but that won't work for the amount of stuff we have to output, since there's a lag. Also it doesn't allow for interrupt, that is, for it to stop saying whatever it's currently saying and start speaking a new string if that option is passed to it. The only way I can see this working is getting pyttsx working with ctypes...or if anyone knows of another similar package that doesn't use PyObjC... Mike From mk0423 at towb.de Wed May 19 09:17:23 2010 From: mk0423 at towb.de (Tobias Weber) Date: Wed, 19 May 2010 09:17:23 +0200 Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac In-Reply-To: <37690065BFD743F19DD3681E8966BA60@FTXH9K1> References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> <10428.1274063334@parc.com> <2B406AAA1D7042488AEFCC4F3AB72937@FTXH9K1> <26822.1274163762@parc.com> <37690065BFD743F19DD3681E8966BA60@FTXH9K1> Message-ID: <38C4EF22-8EEB-439D-9DC5-41AA9E214118@towb.de> On 19.05.2010, at 02:24, Mike wrote: > The only way I can see this working is getting pyttsx working with ctypes...or if anyone knows of another similar package that doesn't use PyObjC... I didn't follow the thread, but to mix conflicting packages you can always split your programm into two processes. Python comes with several IPC mechanisms. I once wrote a tiny headless server in PHP for a library that's not available in Python and talk to it via subprocess over pipes. From ronaldoussoren at mac.com Wed May 19 15:06:23 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 19 May 2010 15:06:23 +0200 Subject: [Pythonmac-SIG] Still Unable to get my Python program working on the mac In-Reply-To: <4F4F590084694803AD510D5858EC297E@FTXH9K1> References: <4F4F590084694803AD510D5858EC297E@FTXH9K1> Message-ID: <9D4410F0-1910-407C-AAE9-128154965833@mac.com> On 16 May, 2010, at 20:06, Mike wrote: > Hi, > > I'm sure you've seen my thread that started off with a module import problem. Now, I've really hit a dead end since the program won't even stay open and there's no traceback to give me a starting point. Could someone who's experienced in python mac development and has some extra time be willing to look at my app and try to help me figure this out? I'd be willing to give the SVN info, just email me off list. The project I'm working on will bring accessible games to blind mac users, so I'd greatly appreciate it if someone would help out, and it would help a lot of people as well. What kind of error messages get printed in the console when you start your program? Ronald > > Thanks in advance. > > Mike > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From smartmike1 at gmail.com Thu May 20 04:01:45 2010 From: smartmike1 at gmail.com (Mike) Date: Wed, 19 May 2010 22:01:45 -0400 Subject: [Pythonmac-SIG] Py2App Problem Message-ID: <4D720D6BFCA64B41A8DECE07847C2E87@FTXH9K1> Hi, I was finally able to get my app to run by using multiprocessing, so thanks guys for that suggestion. However, I'm trying to build it with py2app, and am getting this error. I generated a setup.py script using py2applate --make-setup zgp.py. Installed /Users/MacAdmin/Desktop/RSG/zgp/src/py2app-0.4.3-py2.6.egg Searching for macholib>=1.2.1 Reading http://pypi.python.org/simple/macholib/ Reading http://undefined.org/python/#macholib Best match: macholib 1.2.1 Downloading http://pypi.python.org/packages/source/m/macholib/macholib-1.2.1.tar.gz#md5=7f7f44e62a057d19b92e813fb2f3d05b Processing macholib-1.2.1.tar.gz Running macholib-1.2.1/setup.py -q bdist_egg --dist-dir /var/folders/mv/mvEjQsJVGCSwCIw+VNs1HE+++TI/-Tmp-/easy_install-lHneIg/ma cholib-1.2.1/egg-dist-tmp-W5wYXK Installed /Users/MacAdmin/Desktop/RSG/zgp/src/macholib-1.2.1-py2.6.egg Searching for modulegraph>=0.7.3 Reading http://pypi.python.org/simple/modulegraph/ Reading http://undefined.org/python/#modulegraph Best match: modulegraph 0.7.3 Downloading http://pypi.python.org/packages/source/m/modulegraph/modulegraph-0.7.3.tar.gz#md5=ba3bf16397001f4f6997a7f5c102542f Processing modulegraph-0.7.3.tar.gz Running modulegraph-0.7.3/setup.py -q bdist_egg --dist-dir /var/folders/mv/mvEjQsJVGCSwCIw+VNs1HE+++TI/-Tmp-/easy_install-eHPll_ /modulegraph-0.7.3/egg-dist-tmp-_8Dpcn Installed /Users/MacAdmin/Desktop/RSG/zgp/src/modulegraph-0.7.3-py2.6.egg Searching for altgraph>=0.6.7 Reading http://pypi.python.org/simple/altgraph/ Reading http://undefined.org/python/#altgraph Best match: altgraph 0.6.7 Downloading http://pypi.python.org/packages/source/a/altgraph/altgraph-0.6.7.tar.gz#md5=6792e11b471e70ab3d4dfecf41fb759e Processing altgraph-0.6.7.tar.gz Running altgraph-0.6.7/setup.py -q bdist_egg --dist-dir /var/folders/mv/mvEjQsJVGCSwCIw+VNs1HE+++TI/-Tmp-/easy_install-HIlDlg/al tgraph-0.6.7/egg-dist-tmp-UUt2z1 Installed /Users/MacAdmin/Desktop/RSG/zgp/src/altgraph-0.6.7-py2.6.egg Traceback (most recent call last): File "setup_mac.py", line 18, in setup_requires=['py2app'], File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 113, in setup _setup_distribution = dist = klass(attrs) File "build/bdist.linux-i686/egg/setuptools/dist.py", line 264, in __init__ File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 270, in __init__ self.finalize_options() File "build/bdist.linux-i686/egg/setuptools/dist.py", line 297, in finalize_options File "build/bdist.linux-i686/egg/pkg_resources.py", line 1954, in load File "/Users/MacAdmin/Desktop/RSG/zgp/src/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 29, in import macholib.MachOStandalone File "build/bdist.macosx-10.3-fat/egg/macholib/MachOStandalone.py", line 8, in File "build/bdist.macosx-10.3-fat/egg/macholib/MachOGraph.py", line 17, in File "build/bdist.macosx-10.3-fat/egg/macholib/MachO.py", line 15, in File "build/bdist.macosx-10.3-fat/egg/macholib/util.py", line 56, in TypeError: Error when calling the metaclass bases cannot create 'builtin_function_or_method' instances I've no idea what any of this means, so any help would be appreciated. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From smartmike1 at gmail.com Thu May 20 04:35:53 2010 From: smartmike1 at gmail.com (Mike) Date: Wed, 19 May 2010 22:35:53 -0400 Subject: [Pythonmac-SIG] My previous Message Message-ID: <78D39C8CD4084765BCA34D6CDF31345F@FTXH9K1> Sorry about my previous message. It seems the guy who's testing this for me forgot to install Py2app. It built successfully...I think I'm now getting an import error: no module named Drivers.NSSS. I'll post more console output if there is any. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From cool-rr at cool-rr.com Fri May 21 00:26:30 2010 From: cool-rr at cool-rr.com (cool-RR) Date: Fri, 21 May 2010 00:26:30 +0200 Subject: [Pythonmac-SIG] Could py2app bundle all the requirements of my package? Message-ID: Hello! I'm developing a desktop application called GarlicSim: http://garlicsim.org I want to distribute it natively to all OSes. On Windows I have already succeeded packaging it with py2exe and InnoSetup. I have not touched py2app yet. Do you think that py2app could bundle all the packages I want? I want to bundle the entire Python standard library. (My program is a sort of a science lab, and a very important part of it is a Python shell that I provide, and I want my users to be able to use all of Python.) I want to bundle wxPython and cairo. (I'm especially worried about cairo.) My app is wxPython-based and I want to use cairo for drawing widgets. I want to bundle a big selection of scientific modules. Scipy, numpy, Traits, Mayavi (With VTK, which is especially hard to install.) Pretty much most of the things that Enthought provides. Note that with py2exe I've been able to do all of the above, (except I haven't finished bundling all the scientific libraries, just most of them.) (And no, I don't mind my app weighing 1GB.) Will py2app be able to bundle all these things and how much hair will I have left on my head after I get it working? (Please `cc` any replies to me.) Thanks for your help, Ram Rachum. -------------- next part -------------- An HTML attachment was scrubbed... URL: From madzientist at gmail.com Fri May 21 07:48:17 2010 From: madzientist at gmail.com (Suresh Krishna) Date: Fri, 21 May 2010 06:48:17 +0100 Subject: [Pythonmac-SIG] MacPython for OS 9 In-Reply-To: <4A8CC90D.7040105@noaa.gov> References: <4A8CC90D.7040105@noaa.gov> Message-ID: Several months ago, several helpful people on this list pointed me to Jack Jansen's page: http://homepages.cwi.nl/~jack/macpython/download.html for a version of python for OS 9.2 Unfortunately, the ftp server for the downloads is not working.... I have emailed Jack Jansen's listed email address, but I thought I would also ask in here to see if someone knew of an alternative site to download MacPython 2.3.3 from. Thanks much ! Suresh On Thu, 20 Aug 2009 04:54:53 +0100, Chris Barker wrote: > Suresh Krishna wrote: >> i have to work with mac OS 9.2 for legacy reasons...is there a >> compiled version of python for this os ? > > It looks like Jack Jansen's old page is still there, complete with > downloads: > > > Look for EasyDialogs, I think it's called, for simple GUIs. Also, > TKinter worked, I think. > > good luck! > > -Chris From stephen.gava at gmail.com Fri May 21 07:16:24 2010 From: stephen.gava at gmail.com (Stephen M. Gava) Date: Fri, 21 May 2010 15:16:24 +1000 Subject: [Pythonmac-SIG] python 2.7 Tkinter using Tk 8.6 Message-ID: <4BF61728.60706@python.net> Hi there, I've installed the python.org package of python 2.7b2 for osx snow leopard. It's Tkinter appears to be built against Tk 8.4, but I want to use Tkinter with my installed framework build of Tk 8.6 (for native Tk .png support among other things). So, I assume I need to build my own osx packages of 2.7 linking against Tk 8.6 to achieve this? Thanks, Stephen From brendan.simon at etrix.com.au Fri May 21 12:56:33 2010 From: brendan.simon at etrix.com.au (Brendan Simon (eTRIX)) Date: Fri, 21 May 2010 20:56:33 +1000 Subject: [Pythonmac-SIG] Subject:, Could py2app bundle all the requirements of my package? Message-ID: <4BF666E1.2020509@etrix.com.au> I think the short answer is yes. I've had no trouble with py2app getting all my dependencies. You have a bigger app so it may need some extra tweaking, but py2app has lots of commands to include and exclude stuff. It is similar to py2exe from what I can tell. Cheers, Brendan. > Subject: > [Pythonmac-SIG] Could py2app bundle all the requirements of my package? > From: > cool-RR > Date: > Fri, 21 May 2010 00:26:30 +0200 > > To: > pythonmac-sig > > > Hello! > > I'm developing a desktop application called GarlicSim: > > http://garlicsim.org > > I want to distribute it natively to all OSes. > > On Windows I have already succeeded packaging it with py2exe and > InnoSetup. > > I have not touched py2app yet. Do you think that py2app could bundle > all the packages I want? > > I want to bundle the entire Python standard library. (My program is a > sort of a science lab, and a very important part of it is a Python > shell that I provide, and I want my users to be able to use all of > Python.) > I want to bundle wxPython and cairo. (I'm especially worried about > cairo.) My app is wxPython-based and I want to use cairo for drawing > widgets. > I want to bundle a big selection of scientific modules. Scipy, numpy, > Traits, Mayavi (With VTK, which is especially hard to install.) Pretty > much most of the things that Enthought provides. > > Note that with py2exe I've been able to do all of the above, (except I > haven't finished bundling all the scientific libraries, just most of > them.) > > (And no, I don't mind my app weighing 1GB.) > > Will py2app be able to bundle all these things and how much hair will > I have left on my head after I get it working? > > (Please `cc` any replies to me.) > > Thanks for your help, > Ram Rachum. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kw at codebykevin.com Fri May 21 14:24:05 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 21 May 2010 08:24:05 -0400 Subject: [Pythonmac-SIG] python 2.7 Tkinter using Tk 8.6 In-Reply-To: <4BF61728.60706@python.net> References: <4BF61728.60706@python.net> Message-ID: <4BF67B65.5040207@codebykevin.com> On 5/21/10 1:16 AM, Stephen M. Gava wrote: > Hi there, > I've installed the python.org package of python 2.7b2 for osx snow leopard. > > It's Tkinter appears to be built against Tk 8.4, but I want to use > Tkinter with my installed framework build of Tk 8.6 (for native Tk .png > support among other things). > > So, I assume I need to build my own osx packages of 2.7 linking against > Tk 8.6 to achieve this? > > Thanks, > Stephen Yes, most likely. I believe the binary installers from Python.org still link against 8.4 by default--anything else requires you to build your own. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From ronaldoussoren at mac.com Fri May 21 17:21:00 2010 From: ronaldoussoren at mac.com (ronaldoussoren) Date: Fri, 21 May 2010 08:21:00 -0700 (PDT) Subject: [Pythonmac-SIG] [pythonmac-sig] python 2.7 tkinter using tk 8.6 In-Reply-To: <4BF67B65.5040207@codebykevin.com> Message-ID: On May 21, 2010, at 02:24 PM, Kevin Walzer wrote: On 5/21/10 1:16 AM, Stephen M. Gava wrote: > Hi there, > I've installed the python.org package of python 2.7b2 for osx snow leopard. > > It's Tkinter appears to be built against Tk 8.4, but I want to use > Tkinter with my installed framework build of Tk 8.6 (for native Tk .png > support among other things). > > So, I assume I need to build my own osx packages of 2.7 linking against > Tk 8.6 to achieve this? > > Thanks, > Stephen Yes, most likely. I believe the binary installers from Python.org still link against 8.4 by default--anything else requires you to build your own. The binary installers link to 8.4, and that won't change until all supported versions of OSX ship with a newer version of Tk. I'm willing to ship a version of tkinter that links with 8.5, but only if someone provides a patch that enables linking to both 8.4 and 8.5 (in two different builds of _tkinter) and automaticly selects the right version to use. What I'm thinking of is: have _tkinter.py that does: try: ?? from _tkinter85 import * except ImportError: ?? from _tkinter84 import * Then patch setup.py to build _tkinter84.so and _tkinter85.so from _tkinter.c while linking to the right version of Tk. This should only be done when a special configure argument is present, if it isn't setup.py should default to building _tkinter.so like it currently does.? Ronald ? --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG at python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Fri May 21 17:31:17 2010 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 21 May 2010 16:31:17 +0100 Subject: [Pythonmac-SIG] [pythonmac-sig] python 2.7 tkinter using tk 8.6 In-Reply-To: References: <4BF67B65.5040207@codebykevin.com> Message-ID: On 21 May 2010 16:21, ronaldoussoren wrote: > > > On May 21, 2010, at 02:24 PM, Kevin Walzer wrote: > > On 5/21/10 1:16 AM, Stephen M. Gava wrote: > > Hi there, > > I've installed the python.org package of python 2.7b2 for osx snow > leopard. > > > > It's Tkinter appears to be built against Tk 84, but I want to use > > Tkinter with my installed framework build of Tk 8.6 (for native Tk .png > > support among other things). > > > > So, I assume I need to build my own osx packages of 2.7 linking against > > Tk 8.6 to achieve this? > > > > Thanks, > > Stephen > > Yes, most likely. I believe the binary installers from Python.org still > link against 8.4 by default--anything else requires you to build your own. > > > The binary installers link to 8.4, and that won't change until all > supported versions of OSX ship with a newer version of Tk. > > I'm willing to ship a version of tkinter that links with 8.5, but only if > someone provides a patch that enables linking to both 8.4 and 8.5 (in two > different builds of _tkinter) and automaticly selects the right version to > use. > > What I'm thinking of is: > > have _tkinterpy that does: > > try: > from _tkinter85 import * > except ImportError: > from _tkinter84 import * > > Then patch setup.py to build _tkinter84.so and _tkinter85.so from > _tkinter.c while linking to the right version of Tk. This should only be > done when a special configure argument is present, if it isn't setup.py > should default to building _tkinter.so like it currently does. > That sounds great! Michael > > Ronald > > > > > > --Kevin > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > -- http://www.ironpythoninaction.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Fri May 21 18:28:43 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 21 May 2010 18:28:43 +0200 Subject: [Pythonmac-SIG] [pythonmac-sig] python 2.7 tkinter using tk 8.6 In-Reply-To: References: <4BF67B65.5040207@codebykevin.com> Message-ID: <8EE3C69C-24DF-4AF9-93C2-2089D100AEB0@mac.com> On 21 May, 2010, at 17:31, Michael Foord wrote: > > > On 21 May 2010 16:21, ronaldoussoren wrote: > > > On May 21, 2010, at 02:24 PM, Kevin Walzer wrote: > >> On 5/21/10 1:16 AM, Stephen M. Gava wrote: >> > Hi there, >> > I've installed the python.org package of python 2.7b2 for osx snow leopard. >> > >> > It's Tkinter appears to be built against Tk 84, but I want to use >> > Tkinter with my installed framework build of Tk 8.6 (for native Tk .png >> > support among other things). >> > >> > So, I assume I need to build my own osx packages of 2.7 linking against >> > Tk 8.6 to achieve this? >> > >> > Thanks, >> > Stephen >> >> Yes, most likely. I believe the binary installers from Python.org still >> link against 8.4 by default--anything else requires you to build your own. > > The binary installers link to 8.4, and that won't change until all supported versions of OSX ship with a newer version of Tk. > > I'm willing to ship a version of tkinter that links with 8.5, but only if someone provides a patch that enables linking to both 8.4 and 8.5 (in two different builds of _tkinter) and automaticly selects the right version to use. > > What I'm thinking of is: > > have _tkinterpy that does: > > try: > from _tkinter85 import * > except ImportError: > from _tkinter84 import * > > Then patch setup.py to build _tkinter84.so and _tkinter85.so from _tkinter.c while linking to the right version of Tk. This should only be done when a special configure argument is present, if it isn't setup.py should default to building _tkinter.so like it currently does. > > > That sounds great! Cool. When can I expect a patch ;-) Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From fuzzyman at voidspace.org.uk Fri May 21 18:34:47 2010 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Fri, 21 May 2010 17:34:47 +0100 Subject: [Pythonmac-SIG] [pythonmac-sig] python 2.7 tkinter using tk 8.6 In-Reply-To: <8EE3C69C-24DF-4AF9-93C2-2089D100AEB0@mac.com> References: <4BF67B65.5040207@codebykevin.com> <8EE3C69C-24DF-4AF9-93C2-2089D100AEB0@mac.com> Message-ID: <4BF6B627.8020506@voidspace.org.uk> On 21/05/2010 17:28, Ronald Oussoren wrote: > > On 21 May, 2010, at 17:31, Michael Foord wrote: > >> >> >> On 21 May 2010 16:21, ronaldoussoren > > wrote: >> >> >> >> On May 21, 2010, at 02:24 PM, Kevin Walzer wrote: >> >>> On 5/21/10 1:16 AM, Stephen M. Gava wrote: >>> > Hi there, >>> > I've installed the python.org package of >>> python 2.7b2 for osx snow leopard. >>> > >>> > It's Tkinter appears to be built against Tk 84, but I want to use >>> > Tkinter with my installed framework build of Tk 8.6 (for >>> native Tk .png >>> > support among other things). >>> > >>> > So, I assume I need to build my own osx packages of 2.7 >>> linking against >>> > Tk 8.6 to achieve this? >>> > >>> > Thanks, >>> > Stephen >>> >>> Yes, most likely. I believe the binary installers from >>> Python.org still >>> link against 8.4 by default--anything else requires you to build >>> your own. >> >> The binary installers link to 8.4, and that won't change until >> all supported versions of OSX ship with a newer version of Tk. >> >> I'm willing to ship a version of tkinter that links with 8.5, but >> only if someone provides a patch that enables linking to both 8.4 >> and 8.5 (in two different builds of _tkinter) and automaticly >> selects the right version to use. >> >> What I'm thinking of is: >> >> have _tkinterpy that does: >> >> try: >> from _tkinter85 import * >> except ImportError: >> from _tkinter84 import * >> >> Then patch setup.py to build _tkinter84.so and _tkinter85.so from >> _tkinter.c while linking to the right version of Tk. This should >> only be done when a special configure argument is present, if it >> isn't setup.py should default to building _tkinter.so like it >> currently does. >> >> >> >> That sounds great! > > Cool. When can I expect a patch ;-) > Judging by the progress of my current good intentions for learning to contribute to the C parts of CPython it will only be a few years now... :-( Michael > Ronald > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From smartmike1 at gmail.com Sun May 23 04:35:28 2010 From: smartmike1 at gmail.com (Mike) Date: Sat, 22 May 2010 22:35:28 -0400 Subject: [Pythonmac-SIG] Py2APP App Won't Run After Build Message-ID: Hi, I built my program with py2app thew standard way. py2applet --make-setup zgp.py then python setup.py py2app. As far as external packages I'm using WXPython, PyGame, and Pyttsx. I think the error is something related to Pyttsx. Here's the output I get when running the app from the console: Xelabos-Mac-Pro:src MacAdmin$ ./dist/zgp.app/Contents/MacOS/zgp Traceback (most recent call last): File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/__boot__.py", line 137, in _run('zgp.py') File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/__boot__.py", line 134, in _run execfile(path, globals(), globals()) File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/zgp.py", line 18, in main() File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/zgp.py", line 13, in main output.setup() File "output.pyc", line 36, in setup File "build/bdist.macosx-10.6-universal/egg/pyttsx/__init__.py", line 39, in init File "build/bdist.macosx-10.6-universal/egg/pyttsx/engine.py", line 45, in __init__ File "build/bdist.macosx-10.6-universal/egg/pyttsx/driver.py", line 64, in __init__ ImportError: No module named drivers.nsss 2010-05-21 07:08:28.986 zgp[41405:10b] zgp Error 2010-05-21 07:08:29.443 zgp[41405:10b] zgp Error An unexpected error has occurred during execution of the main script ImportError: No module named drivers.nsss -------------- next part -------------- An HTML attachment was scrubbed... URL: From aahz at pythoncraft.com Sun May 23 14:54:20 2010 From: aahz at pythoncraft.com (Aahz) Date: Sun, 23 May 2010 05:54:20 -0700 Subject: [Pythonmac-SIG] Could py2app bundle all the requirements of my package? In-Reply-To: References: Message-ID: <20100523125420.GA22862@panix.com> On Fri, May 21, 2010, cool-RR wrote: > > On Windows I have already succeeded packaging it with py2exe and InnoSetup. > > I have not touched py2app yet. Do you think that py2app could bundle all the > packages I want? py2app is roughly similar to py2exe, so I'd be surprised if you had significant difficulty. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ f u cn rd ths, u cn gt a gd jb n nx prgrmmng. From ronaldoussoren at mac.com Mon May 24 11:00:16 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 24 May 2010 11:00:16 +0200 Subject: [Pythonmac-SIG] [pythonmac-sig] python 2.7 tkinter using tk 8.6 In-Reply-To: <4BF7263C.5050905@gmail.com> References: <4BF7263C.5050905@gmail.com> Message-ID: <7BE6BBF5-3530-4FF3-A314-D27DF68561F9@mac.com> On 22 May, 2010, at 2:33, Stephen Gava wrote: > > On 22/05/10 1:21 AM, ronaldoussoren wrote: >> >> >> On May 21, 2010, at 02:24 PM, Kevin Walzer wrote: >> >>> On 5/21/10 1:16 AM, Stephen M. Gava wrote: >>> > Hi there, >>> > I've installed the python.org package of python >>> 2.7b2 for osx snow leopard. >>> > >>> > It's Tkinter appears to be built against Tk 84, but I want to use > [...] >> two different builds of _tkinter) and automaticly selects the right >> version to use. >> >> What I'm thinking of is: >> >> have _tkinterpy that does: >> >> try: >> from _tkinter85 import * >> except ImportError: >> from _tkinter84 import * >> >> Then patch setup.py to build _tkinter84.so and _tkinter85.so from >> _tkinter.c while linking to the right version of Tk. This should only be >> done when a special configure argument is present, if it isn't setup.py >> should default to building _tkinter.so like it currently does. >> >> Ronald > > hmm, sounds great. i don't have the c expertise to patch cpython tho. This wouldn't require tweaks to C code, just to a distutils setup.py script (the one in the root of the python distribution). The final version should add a new flag to the configure script as well, but I could add flag later on when the setup.py patch uses a global variable to check if it should build one _tkinter.so or a number of them. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From ronaldoussoren at mac.com Mon May 24 11:08:15 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 24 May 2010 11:08:15 +0200 Subject: [Pythonmac-SIG] [pythonmac-sig] python 2.7 tkinter using tk 8.6 In-Reply-To: References: Message-ID: On 21 May, 2010, at 18:22, ronaldoussoren wrote: > > > On May 21, 2010, at 02:24 PM, Kevin Walzer wrote: > >> On 5/21/10 1:16 AM, Stephen M. Gava wrote: >> > Hi there, >> > I've installed the python.org package of python 2.7b2 for osx snow leopard. >> > >> > It's Tkinter appears to be built against Tk 8.4, but I want to use >> > Tkinter with my installed framework build of Tk 8.6 (for native Tk .png >> > support among other things). >> > >> > So, I assume I need to build my own osx packages of 2.7 linking against >> > Tk 8.6 to achieve this? >> > >> > Thanks, >> > Stephen >> >> Yes, most likely. I believe the binary installers from Python.org still >> link against 8.4 by default--anything else requires you to build your own. > > The binary installers link to 8.4, and that won't change until all supported versions of OSX ship with a newer version of Tk. > > I'm willing to ship a version of tkinter that links with 8.5, but only if someone provides a patch that enables linking to both 8.4 and 8.5 (in two different builds of _tkinter) and automaticly selects the right version to use. > > What I'm thinking of is: > > have _tkinter.py that does: > > try: > from _tkinter85 import * > except ImportError: > from _tkinter84 import * > > Then patch setup.py to build _tkinter84.so and _tkinter85.so from _tkinter.c while linking to the right version of Tk. This should only be done when a special configure argument is present, if it isn't setup.py should default to building _tkinter.so like it currently does. I've filed issue 8798 for this. As mentioned in the issue I don't have time to work on this myself. Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From lists at mostrom.pp.se Mon May 24 12:28:59 2010 From: lists at mostrom.pp.se (=?ISO-8859-1?Q?Jan_Erik_Mostr=F6m?=) Date: Mon, 24 May 2010 12:28:59 +0200 Subject: [Pythonmac-SIG] Which version to use?? Message-ID: I thought I would play around with Python 3.x a bit and would like to ask if you have any recommendations if I should use the version available at python.org or the one available at activestate? From aahz at pythoncraft.com Mon May 24 15:08:01 2010 From: aahz at pythoncraft.com (Aahz) Date: Mon, 24 May 2010 06:08:01 -0700 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: Message-ID: <20100524130800.GA18562@panix.com> On Mon, May 24, 2010, Jan Erik Mostr?m wrote: > > I thought I would play around with Python 3.x a bit and would like to > ask if you have any recommendations if I should use the version > available at python.org or the one available at activestate? If you care about the Mac (particularly in terms of being able to use PyObjC and/or py2app), stick with 2.x for now. Otherwise, it doesn't matter much which exact version of 3.x you use. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ f u cn rd ths, u cn gt a gd jb n nx prgrmmng. From lists at mostrom.pp.se Mon May 24 23:14:31 2010 From: lists at mostrom.pp.se (=?ISO-8859-1?Q?Jan_Erik_Mostr=F6m?=) Date: Mon, 24 May 2010 23:14:31 +0200 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: <20100524130800.GA18562@panix.com> References: <20100524130800.GA18562@panix.com> Message-ID: On Mon, May 24, 2010 at 15:08, Aahz wrote: > On Mon, May 24, 2010, Jan Erik Mostr?m wrote: >> >> I thought I would play around with Python 3.x a bit and would like to >> ask if you have any recommendations if I should use the version >> available at python.org or the one available at activestate? > > If you care about the Mac (particularly in terms of being able to use > PyObjC and/or py2app), stick with 2.x for now. ?Otherwise, it doesn't > matter much which exact version of 3.x you use. OK, thanks (I'm just using it to play around and to see what's new) - jem From cekees at gmail.com Tue May 25 16:25:11 2010 From: cekees at gmail.com (Chris Kees) Date: Tue, 25 May 2010 09:25:11 -0500 Subject: [Pythonmac-SIG] OSX10.6/readline-6.1/python-2.6.5 Message-ID: Hi, I'm compiling python and readline from source and getting a segmentation fault in readline after two lines of input. Anybody seen this before or know the fix? Summary of the problem follows. % python Python 2.6.5 (r265:3362, May 25 2010, 09:06:56) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = 1 >>> b = 2 Segmentation fault The built python works fine if I compile without readline support. My readline and python configuration steps look like this: readline: configure --prefix=${MY_PREFIX} CC=/usr/bin/gcc python: ./configure --prefix=${MY_PREFIX} --enable-framework=${MY_PREFIX} CFLAGS="-I${MY_PREFIX}/include" LDFLAGS="-L${MY_PREFIX}/lib" --with-readline-dir=${MY_PREFIX} Also, I've tried MACOSX_DEPLOYMENT_TARGET=10.3 and 10.6. Running python in gdb shows the % gdb python GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar 5 04:43:10 UTC 2010) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ..... done (gdb) run Starting program: /Users/cekees/src/proteus/darwin/bin/python Reading symbols for shared libraries ++++. done Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007fff5fc01028 in __dyld__dyld_start () (gdb) c Continuing. Reading symbols for shared libraries .......... done Python 2.6.5 (r265:3362, May 25 2010, 09:06:56) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. Reading symbols for shared libraries ... done >>> a = 1 >>> b = 2 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00000001003ee0a7 in call_readline (sys_stdin=, sys_stdout=, prompt=) at /Users/cekees/src/proteus/externalPackages/Python-2.6.5/Modules/readline.c:1037 1037 line = history_get(state->length)->line; (gdb) back #0 0x00000001003ee0a7 in call_readline (sys_stdin=, sys_stdout=, prompt=) at /Users/cekees/src/proteus/externalPackages/Python-2.6.5/Modules/readline.c:1037 #1 0x00000001000086e2 in PyOS_Readline (sys_stdin=0x7fff702be0c0, sys_stdout=0x7fff702be158, prompt=0x10059cf24 ">>> ") at Parser/myreadline.c:208 #2 0x000000010000a088 in tok_nextc (tok=0x100458310) at Parser/tokenizer.c:784 #3 0x000000010000a81a in tok_get [inlined] () at /Users/cekees/src/proteus/externalPackages/Python-2.6.5/Parser/tokenizer.c:1131 #4 0x000000010000a81a in PyTokenizer_Get (tok=0x100458310, p_start=0x7fff5fbfe658, p_end=0x7fff5fbfe650) at Parser/tokenizer.c:1571 #5 0x00000001000054da in parsetok (tok=0x100458310, g=, start=, err_ret=0x7fff5fbfe6b0, flags=0x7fff5fbfe6dc) at Parser/parsetok.c:159 #6 0x00000001000dd592 in orte_iof_base_setup_prefork () at Python/pythonrun.c:1463 #7 0x00000001000de7a3 in orte_ns_base_get_proc_name_string () at Python/pythonrun.c:824 #8 0x00000001000dea8e in PyRun_InteractiveLoopFlags (fp=0x7fff702be0c0, filename=0x10011a988 "", flags=0x7fff5fbfe8e0) at Python/pythonrun.c:764 #9 0x00000001000df301 in PyRun_AnyFileExFlags (fp=0x7fff702be0c0, filename=0x10011a988 "", closeit=0, flags=0x7fff5fbfe8e0) at Python/pythonrun.c:733 #10 0x00000001000ee697 in orte_rmaps_base_get_job_map () at Modules/main.c:572 #11 0x0000000100000f14 in ?? () -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodneys at io.com Tue May 25 18:18:57 2010 From: rodneys at io.com (Rodney Somerstein) Date: Tue, 25 May 2010 12:18:57 -0400 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: <20100524130800.GA18562@panix.com> References: <20100524130800.GA18562@panix.com> Message-ID: On Tuesday, May 24, 2010, Aahz wrote: >If you care about the Mac (particularly in terms of being able to use >PyObjC and/or py2app), stick with 2.x for now. Otherwise, it doesn't >matter much which exact version of 3.x you use. This brings up a question for me as to what the state of Python is on the Mac. Python 3.x has been a available for quite awhile. I see on Python.org that 3.1.2 is listed as the current download for the Mac. What exactly is the current state of this? What doesn't work on the Mac in Python 3 and what are current plans related to this? The Mac Python community seems pretty small. Given that Python seems to position itself as a major programming and scripting language, it seems rather strange that there is so little effort placed into providing first class support for the second most popular computing platform. I know that various individuals on this list put a tremendous amount of work into porting and supporting various parts of Python on the Mac platform. But what is the overall state of Python here? Especially in regards to Python 3, which seems to definitely be the future of the language. I have looked at moving into Python several times over the years, but it always seems to be a second class language when it comes to producing programs to run on the Mac. At least outside of various command line tools. Is Python moving toward parity with the Windows and Unix world on the Macintosh? Thanks, -Rodney From zvezdan at zope.com Tue May 25 20:11:10 2010 From: zvezdan at zope.com (Zvezdan Petkovic) Date: Tue, 25 May 2010 14:11:10 -0400 Subject: [Pythonmac-SIG] OSX10.6/readline-6.1/python-2.6.5 In-Reply-To: References: Message-ID: On May 25, 2010, at 10:25 AM, Chris Kees wrote: > Hi, > > I'm compiling python and readline from source and getting a segmentation fault in readline after two lines of input. Anybody seen this before or know the fix? Summary of the problem follows. > > % python > Python 2.6.5 (r265:3362, May 25 2010, 09:06:56) > [GCC 4.2.1 (Apple Inc. build 5659)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> a = 1 > >>> b = 2 > Segmentation fault I've seen this before if a Mac OS X native editline (readline emulation) is used with Mac OS X version <= 10.4. This was fixed and patched for 10.6 and 10.5 in Python 2.6.5 release. You should be able to use a native editline (readline). There's no need for an external readline library if you use Python 2.6.5 with Mac OS X 10.6 or 10.5. > The built python works fine if I compile without readline support. My readline and python configuration steps look like this: > > readline: > configure --prefix=${MY_PREFIX} CC=/usr/bin/gcc > python: > ./configure --prefix=${MY_PREFIX} --enable-framework=${MY_PREFIX} CFLAGS="-I${MY_PREFIX}/include" LDFLAGS="-L${MY_PREFIX}/lib" --with-readline-dir=${MY_PREFIX} It is better to use CPPFLAGS="-I${MY_PREFIX}/include" to pass include path, not CFLAGS. Using CPPFLAGS ensures that the order of include path parts is the same as Python build intended it to be: -I. -IInclude ... are first and then user's CPPFLAGS include path parts. This is a configuration that worked for me with GNU readline from MacPorts (in /opt/local/...) ./configure \ --prefix=${HOME}/opt \ LDFLAGS=-L/opt/local/lib \ CPPFLAGS=-I/opt/local/include \ MACOSX_DEPLOYMENT_TARGET=10.6 One can check that Python was linked against it using: OPT_PYTHON=~/opt/bin/python2.6 MODULE_PATH="import readline; print readline.__file__" otool -L $(${OPT_PYTHON} -c "${MODULE_PATH}") It should return: /opt/local/lib/libreadline.X.Y.dylib > Also, I've tried MACOSX_DEPLOYMENT_TARGET=10.3 and 10.6. The default configuration for Intel-based Mac sets the deployment target to 10.4 (Tiger). For a PPC Mac, the default configuration sets the deployment target to 10.3 (Panther). As mentioned before, if you set the deployment target to 10.6, you don't need an external copy of readline (unless you want specific GNU readline features). This configuration builds a 64-bit Python 2.6 linked against the native editline. ./configure \ --prefix=${HOME}/opt \ MACOSX_DEPLOYMENT_TARGET=10.6 The check with otool (see above) returns: /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.11.0) (Add more options for a universal build or a 32-bit only build.) Now, let's see the gdb output ... > Running python in gdb shows the > % gdb python > GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar 5 04:43:10 UTC 2010) > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ..... done > > (gdb) run > Starting program: /Users/cekees/src/proteus/darwin/bin/python > Reading symbols for shared libraries ++++. done > > Program received signal SIGTRAP, Trace/breakpoint trap. > 0x00007fff5fc01028 in __dyld__dyld_start () > (gdb) c > Continuing. > Reading symbols for shared libraries .......... done > Python 2.6.5 (r265:3362, May 25 2010, 09:06:56) > [GCC 4.2.1 (Apple Inc. build 5659)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > Reading symbols for shared libraries ... done > >>> a = 1 > >>> b = 2 > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 > 0x00000001003ee0a7 in call_readline (sys_stdin=, sys_stdout=, prompt=) at /Users/cekees/src/proteus/externalPackages/Python-2.6.5/Modules/readline.c:1037 > 1037 line = history_get(state->length)->line; The line above should be executed for GNU readline. However, for the native editline it causes a crash because of off-by-one array access. You should check what library is the readline module linked against using otool as shown above. It seems that it's linked against libedit, but compiled in a way that prevents it from using the code specific to libedit. This line should be executed for libedit: line = history_get(state->length - 1)->line; Are you sure that Python can actually find your copy of readline? What is the exact path to your copy of readline library? Is your readline built as 64-bit, 32-bit, or universal? Is your Python built as 64-bit, 32-bit, or universal? There are many possible reasons why your build of Python did not link against your copy of GNU readline and more information is needed to pinpoint the exact one. Python 2.6.5 on Mac OS X 10.6 can be successfully linked against: (a) GNU readline, and (b) native Mac OS X editline. It works fine with both. > (gdb) back > #0 0x00000001003ee0a7 in call_readline (sys_stdin=, sys_stdout=, prompt=) at /Users/cekees/src/proteus/externalPackages/Python-2.6.5/Modules/readline.c:1037 > #1 0x00000001000086e2 in PyOS_Readline (sys_stdin=0x7fff702be0c0, sys_stdout=0x7fff702be158, prompt=0x10059cf24 ">>> ") at Parser/myreadline.c:208 > #2 0x000000010000a088 in tok_nextc (tok=0x100458310) at Parser/tokenizer.c:784 > #3 0x000000010000a81a in tok_get [inlined] () at /Users/cekees/src/proteus/externalPackages/Python-2.6.5/Parser/tokenizer.c:1131 > #4 0x000000010000a81a in PyTokenizer_Get (tok=0x100458310, p_start=0x7fff5fbfe658, p_end=0x7fff5fbfe650) at Parser/tokenizer.c:1571 > #5 0x00000001000054da in parsetok (tok=0x100458310, g=, start=, err_ret=0x7fff5fbfe6b0, flags=0x7fff5fbfe6dc) at Parser/parsetok.c:159 > #6 0x00000001000dd592 in orte_iof_base_setup_prefork () at Python/pythonrun.c:1463 > #7 0x00000001000de7a3 in orte_ns_base_get_proc_name_string () at Python/pythonrun.c:824 > #8 0x00000001000dea8e in PyRun_InteractiveLoopFlags (fp=0x7fff702be0c0, filename=0x10011a988 "", flags=0x7fff5fbfe8e0) at Python/pythonrun.c:764 > #9 0x00000001000df301 in PyRun_AnyFileExFlags (fp=0x7fff702be0c0, filename=0x10011a988 "", closeit=0, flags=0x7fff5fbfe8e0) at Python/pythonrun.c:733 > #10 0x00000001000ee697 in orte_rmaps_base_get_job_map () at Modules/main.c:572 > #11 0x0000000100000f14 in ?? () From Chris.Barker at noaa.gov Tue May 25 20:17:28 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 25 May 2010 11:17:28 -0700 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: <20100524130800.GA18562@panix.com> Message-ID: <4BFC1438.3000406@noaa.gov> Rodney Somerstein wrote: >> If you care about the Mac (particularly in terms of being able to use >> PyObjC and/or py2app), stick with 2.x for now. Otherwise, it doesn't >> matter much which exact version of 3.x you use. > > This brings up a question for me as to what the state of Python is on > the Mac. Python 3.x has been a available for quite awhile. I see on > Python.org that 3.1.2 is listed as the current download for the Mac. > What exactly is the current state of this? What doesn't work on the Mac > in Python 3 and what are current plans related to this? Honestly, I don't know if the Mac is in any poorer position with regard to Python 3 as any other platform. NONE of the major packages I use have been ported to Py3 on any platform: numpy, SciPy, wxPython. Many of those are well supported on the Mac, so I don't think there will be any issues there. > The Mac Python community seems pretty small. There are a LOT of folks using Python on teh Mac -- the community that is pretty small is the community of folks doing mac-specific stuff -- PyObjC, for instance. It getting to be that the the fradction of development that is done for desktop apps is pretty small -- and that that is done is often done with cross-platfrom tools. The only folks that care about py2app are folks doing desktop development and the only folks that care about PyObjC are folks doing desktop development for Mac-only applications. If that is what you want to do, then you are right, the community is pretty small -- is there a larger one built around an open-source dynamic language? I have no idea. > Given that Python seems to > position itself as a major programming and scripting language, it seems > rather strange that there is so little effort placed into providing > first class support for the second most popular computing platform. It does have first class support for scripting, command line stuff, web app development, etc -- one reason the there are so many more users of Python on the Mac than there are folks on this list is that all that stuff "just works". -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 vze26m98 at optonline.net Tue May 25 20:40:40 2010 From: vze26m98 at optonline.net (Charles Turner) Date: Tue, 25 May 2010 14:40:40 -0400 Subject: [Pythonmac-SIG] OSX10.6/readline-6.1/python-2.6.5 In-Reply-To: References: Message-ID: On May 25, 2010, at 10:25 AM, Chris Kees wrote: > I'm compiling python and readline from source and getting a segmentation fault in readline This approach worked for me: I believe there's a test or two that fails, but they've been noted in the Python issue tracker. HTH, Charles From Chris.Barker at noaa.gov Tue May 25 21:57:28 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 25 May 2010 12:57:28 -0700 Subject: [Pythonmac-SIG] PIL binaries -- please test Message-ID: <4BFC2BA8.6040809@noaa.gov> Hi folks, Much to my surprise, I had a little time to build some PIL binaries: http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.5-macosx10.5.mpkg.zip http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.6-macosx10.5.mpkg.zip I'd really like folks to test them on as many different systems as possible. You can see these are for python 2.5 or 2.6, build with and for the python.org python binaries. They should have all dependencies statically linked. I built them on OS-X 10.5 (leopard), so they may not work on 10.4 I'd love if someone could test and see if they do, however, I no longer have a 10.4 system to test on. I do expect them to work on 10.5 and 10.6, PPC and Intel. Please let me know if you test, whether it worked or not, and on what system/python. If these work well, I think Fredrik will put them on the PIL site. Thanks, -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 zvezdan at zope.com Tue May 25 22:00:53 2010 From: zvezdan at zope.com (Zvezdan Petkovic) Date: Tue, 25 May 2010 16:00:53 -0400 Subject: [Pythonmac-SIG] OSX10.6/readline-6.1/python-2.6.5 In-Reply-To: References: Message-ID: <9B609112-2B7D-45AC-A413-15513D60B8BB@zope.com> On May 25, 2010, at 2:40 PM, Charles Turner wrote: > On May 25, 2010, at 10:25 AM, Chris Kees wrote: > >> I'm compiling python and readline from source and getting a segmentation fault in readline > > This approach worked for me: > > This is exactly why I asked the OP in the previous post how his readline was compiled and where it was stored. You took care to compile it universal and for the same deployment target as your Python. That is very important. Additionally, you installed both into (a default) /usr/local/... which again may be important because it's in the default path for library search. I must point out, though, that you built Python 2.6.4 where compilation of GNU readline was the only option. Starting with Python 2.6.5, when the deployment target is 10.6 (or 10.5), the GNU readline is not needed at all. Python will link with the native editline and work just fine. The OP should be able to build it using your instructions with or without external GNU readline. Best regards, Zvezdan From ronaldoussoren at mac.com Tue May 25 22:08:07 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 25 May 2010 22:08:07 +0200 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: <20100524130800.GA18562@panix.com> Message-ID: <2A9881C5-37DB-4D71-8A89-F65BAC70BAFC@mac.com> On 25 May, 2010, at 18:18, Rodney Somerstein wrote: > On Tuesday, May 24, 2010, Aahz wrote: >> If you care about the Mac (particularly in terms of being able to use >> PyObjC and/or py2app), stick with 2.x for now. Otherwise, it doesn't >> matter much which exact version of 3.x you use. > > This brings up a question for me as to what the state of Python is on the Mac. Python 3.x has been a available for quite awhile. I see on Python.org that 3.1.2 is listed as the current download for the Mac. What exactly is the current state of this? What doesn't work on the Mac in Python 3 and what are current plans related to this? Python 3.1.2 works fine on OSX. There is an issue with building extensions on OSX 10.6, but that will be fixed in 3.1.3. PyObjC in the repository works with python 3 and I'm working towards a release. I haven't looked into py2app yet. With some luck it will work without major changes. > > The Mac Python community seems pretty small. Given that Python seems to position itself as a major programming and scripting language, it seems rather strange that there is so little effort placed into providing first class support for the second most popular computing platform. I know that various individuals on this list put a tremendous amount of work into porting and supporting various parts of Python on the Mac platform. But what is the overall state of Python here? Especially in regards to Python 3, which seems to definitely be the future of the language. Porting to py3k is an issue throughout the python community, mostly because cleanly porting non-trivial projects takes time. What hasn't helped is that a lot of project depend on setuptools and that didn't supported until pretty recently (and that only through the 'distribute' fork). As far as PyObjC is concerned port to py3k was a lot of work due to C-API changes and because PyObjC tries to provide seemless integration between Python and Cocoa, which means it is pretty sensitive to the large changes between python 2.x and 3.x. > > I have looked at moving into Python several times over the years, but it always seems to be a second class language when it comes to producing programs to run on the Mac. At least outside of various command line tools. Is Python moving toward parity with the Windows and Unix world on the Macintosh? What do you mean? Python on OSX is support as well as it is on Linux and Windows. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From aditya at wefoundland.com Tue May 25 22:08:51 2010 From: aditya at wefoundland.com (aditya bhargava) Date: Tue, 25 May 2010 15:08:51 -0500 Subject: [Pythonmac-SIG] PIL binaries -- please test In-Reply-To: <4BFC2BA8.6040809@noaa.gov> References: <4BFC2BA8.6040809@noaa.gov> Message-ID: How do you determine which version of Python to build for? I'm on 10.4 and I've got two versions of Python ? python2.3 in /usr/bin/python and python2.5 in /opt/local/bin/python. python2.5 is my default (i.e. the one that shows when I run 'which python'), but the package installer doesn't seem to recognize it. It gives me an error saying "You cannot install PIL 1.1.7 on this volume. PIL requires System Python 2.5 to install". Aditya On Tue, May 25, 2010 at 2:57 PM, Christopher Barker wrote: > Hi folks, > > Much to my surprise, I had a little time to build some PIL binaries: > > > http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.5-macosx10.5.mpkg.zip > > > http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.6-macosx10.5.mpkg.zip > > I'd really like folks to test them on as many different systems as > possible. > > You can see these are for python 2.5 or 2.6, build with and for the > python.org python binaries. They should have all dependencies statically > linked. > > I built them on OS-X 10.5 (leopard), so they may not work on 10.4 I'd love > if someone could test and see if they do, however, I no longer have a 10.4 > system to test on. > > I do expect them to work on 10.5 and 10.6, PPC and Intel. > > Please let me know if you test, whether it worked or not, and on what > system/python. > > If these work well, I think Fredrik will put them on the PIL site. > > Thanks, > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -- wefoundland.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodneys at io.com Tue May 25 22:45:22 2010 From: rodneys at io.com (Rodney Somerstein) Date: Tue, 25 May 2010 16:45:22 -0400 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: <4BFC1438.3000406@noaa.gov> References: <20100524130800.GA18562@panix.com> <4BFC1438.3000406@noaa.gov> Message-ID: At 11:17 AM -0700 5/25/10, Christopher Barker wrote: >Honestly, I don't know if the Mac is in any poorer position with >regard to Python 3 as any other platform. > >NONE of the major packages I use have been ported to Py3 on any >platform: numpy, SciPy, wxPython. Many of those are well supported >on the Mac, so I don't think there will be any issues there. Thanks, Chris. This is the kind of thing I was trying to find out. After I asked the question I started reading the comp.lang.python newsgroup and see that lots of people seem to be in the same situation. There are a fair number of people wanting to USE Python 3.x - that is, develop WITH Python 3.x. However, the people that make all of the tools for those of us that want to use them are not porting or are at least not being very public about their ports. To someone like me, who is mostly looking in from the outside, Python seems like it has a lot of potential but the fragmentation of the development community is a bit problematic. Unless the powers that be decide to once and for all cease development of the 2.x branch of Python, I'm not sure that 3.x will ever end up having the support that it needs in terms of ported packages. If I had the ability to port something like wxPython, I would definitely do so. Unfortunately, that isn't the case. It seems kind of strange to start doing work with 2.7 when supposedly 3.1.2 is the current version. Does no one other than the maintainers of the language itself want 3.x to succeed? >>The Mac Python community seems pretty small. > >There are a LOT of folks using Python on teh Mac -- the community >that is pretty small is the community of folks doing mac-specific >stuff -- PyObjC, for instance. It getting to be that the the >fradction of development that is done for desktop apps is pretty >small -- and that that is done is often done with cross-platfrom >tools. True. Unfortunately, the cross-platform tools like wxPython don't seem to be there for Python 3. I would love to use Python for some cross-platform application development. Packaging on the Mac, in particular, though, seems to be a bit iffy. Yes, there is on-going work on py2app. However, it seems to mostly be a one person project with work done as available. (A hazard of open source, I guess.) >The only folks that care about py2app are folks doing desktop >development and the only folks that care about PyObjC are folks >doing desktop development for Mac-only applications. > >If that is what you want to do, then you are right, the community is >pretty small -- is there a larger one built around an open-source >dynamic language? I have no idea. I'm not sure that there is a larger Mac community built around an open-source dynamic language. However, I'm trying to figure out how viable Python is to develop applications on the Mac. That requires at least py2app for packaging and PyObjC for full access to Mac native controls, from what I can tell. wxPython may be a viable option, but the 3.x support seems MIA. > >>Given that Python seems to position itself as a major programming >>and scripting language, it seems rather strange that there is so >>little effort placed into providing first class support for the >>second most popular computing platform. > >It does have first class support for scripting, command line stuff, >web app development, etc -- one reason the there are so many more >users of Python on the Mac than there are folks on this list is that >all that stuff "just works". I suppose that is true. Maybe it is just application development where people want native applications for the various platforms that doesn't "just work". It is possible that Python will never be that. I have been hoping for a long time that it would be moving in that direction. That is the main reason for my original questions here. Thanks, -Rodney From rodneys at io.com Tue May 25 23:15:18 2010 From: rodneys at io.com (Rodney Somerstein) Date: Tue, 25 May 2010 17:15:18 -0400 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: <2A9881C5-37DB-4D71-8A89-F65BAC70BAFC@mac.com> References: <20100524130800.GA18562@panix.com> <2A9881C5-37DB-4D71-8A89-F65BAC70BAFC@mac.com> Message-ID: At 10:08 PM +0200 5/25/10, Ronald Oussoren wrote: >Python 3.1.2 works fine on OSX. There is an issue with building >extensions on OSX 10.6, but that will be fixed in 3.1.3. > >PyObjC in the repository works with python 3 and I'm working towards >a release. I haven't looked into py2app yet. With some luck it will >work without major changes. Good to hear. Thanks for the hard work on PyObjC. Do you have specific plans to look into py2app for Python 3? > > The Mac Python community seems pretty small. Given that Python >seems to position itself as a major programming and scripting >language, it seems rather strange that there is so little effort >placed into providing first class support for the second most >popular computing platform. I know that various individuals on this >list put a tremendous amount of work into porting and supporting >various parts of Python on the Mac platform. But what is the overall >state of Python here? Especially in regards to Python 3, which seems >to definitely be the future of the language. > >Porting to py3k is an issue throughout the python community, mostly >because cleanly porting non-trivial projects takes time. What hasn't >helped is that a lot of project depend on setuptools and that didn't >supported until pretty recently (and that only through the >'distribute' fork). > >As far as PyObjC is concerned port to py3k was a lot of work due to >C-API changes and because PyObjC tries to provide seemless >integration between Python and Cocoa, which means it is pretty >sensitive to the large changes between python 2.x and 3.x. > It's great to see dedicated people such as yourself continuing this kind of work. Hopefully things will start to fall into place for Python 3.x. I see questions on comp.lang.python and elsewhere from people wanting to use Python 3.x as their main development language. I think many people, such as myself, are reluctant to jump into Python right now. My perception is that 2.x has a limited life span. It seems not to be the best choice to jump into that right now when the 3.x branch of the language itself is where most work seems to be going on. However, as you noted, many packages aren't trivial to port and that seems to be going very slowly. Are you planning on focusing on 3.x from this point forward with only maintenance on the 2.x version of PyObjC? How far away is Python 3 from being the main branch of the language? Are we talking another year? 2? 5? > > I have looked at moving into Python several times over the years, >but it always seems to be a second class language when it comes to >producing programs to run on the Mac. At least outside of various >command line tools. Is Python moving toward parity with the Windows >and Unix world on the Macintosh? > >What do you mean? Python on OSX is support as well as it is on >Linux and Windows. I'm not trying to denigrate the hard work that you and others put into keeping Python functioning well on the Mac. In part, due to the fact that packaging seems to be trickier for people to figure out with py2app than with py2exe I have gotten that impression. Maybe most people are using py2app with very little trouble and I'm only seeing the problems and requests for help that get reported here. It sounds like for pure Mac development, that a bit of testing and hopefully minor tweaking will be enough to get py2app running well. Once that is done, Python 3 may actually work as a great development language for Mac applications. The only thing really missing once that is done is a port of a good cross-platform UI library, such as wxWidgets, so that cross-platform apps can be developed easily. I also think that another part of the issue is simply that there are many more Windows developers than Mac developers. This means simply that more packages get released for Windows earlier than on the Mac. Similarly there may be more UI libraries and such under Windows because more people write them. For Unix/Linux, I suspect that a larger percentage of the users are actually developers, based on what I've seen in the past. That would tend to lead to more people capable of fixing code and contributing to ports themselves on those platforms. Maybe what I have to resign myself to is that if I want to develop in Python 3 (or any Python for that matter) for desktop applications, I need to be willing to live with any limitations. This is because I don't have the skill to code around those limitations in C. Alternatively I could develop my C and C++ skills as well as Python skills all at the same time so that I can port needed packages. That doesn't seem very realistic. This may just be a matter of the open source nature of Python. -Rodney From matthias.baas at gmail.com Wed May 26 00:24:54 2010 From: matthias.baas at gmail.com (Matthias Baas) Date: Tue, 25 May 2010 23:24:54 +0100 Subject: [Pythonmac-SIG] PIL binaries -- please test In-Reply-To: <4BFC2BA8.6040809@noaa.gov> References: <4BFC2BA8.6040809@noaa.gov> Message-ID: <4BFC4E36.8030604@gmail.com> Christopher Barker wrote: > Much to my surprise, I had a little time to build some PIL binaries: > > http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.5-macosx10.5.mpkg.zip > http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.6-macosx10.5.mpkg.zip > > I'd really like folks to test them on as many different systems as > possible. > > You can see these are for python 2.5 or 2.6, build with and for the > python.org python binaries. They should have all dependencies statically > linked. > > I built them on OS-X 10.5 (leopard), so they may not work on 10.4 I'd > love if someone could test and see if they do, however, I no longer have > a 10.4 system to test on. I tried the py2.6 binary on OSX 10.4. The package installs fine but it can't really load an image. When I open a jpg, I can read its size but as soon as I try to load the data, I get an import error: ImportError: The _imaging C module is not installed When I try to import _imaging manually I get: ImportError: dlopen(./_imaging.so, 2): Symbol not found: _clock$UNIX2003 Referenced from: ./_imaging.so Expected in: dynamic lookup I don't know what that UNIX2003 means? Is that a special version of clock() that's not compatible with the one provided here on 10.4? Cheers, - Matthias - From matthias.baas at gmail.com Wed May 26 00:30:20 2010 From: matthias.baas at gmail.com (Matthias Baas) Date: Tue, 25 May 2010 23:30:20 +0100 Subject: [Pythonmac-SIG] PIL binaries -- please test In-Reply-To: References: <4BFC2BA8.6040809@noaa.gov> Message-ID: <4BFC4F7C.3060805@gmail.com> aditya bhargava wrote: > How do you determine which version of Python to build for? I'm on 10.4 > and I've got two versions of Python ? python2.3 in /usr/bin/python and > python2.5 in /opt/local/bin/python. python2.5 is my default (i.e. the > one that shows when I run 'which python'), but the package installer > doesn't seem to recognize it. It gives me an error saying "You cannot > install PIL 1.1.7 on this volume. PIL requires System Python 2.5 to > install". Apparently, you got your Python 2.5 from MacPorts (as it's in /opt/local). As far as I know, such installers as provided by Christopher only work with the Python version you can download on python.org (or the system Python probably) whereas if you want extension modules for your MacPorts Python you also have to use MacPorts to install them. Cheers, - Matthias - From matthias.baas at gmail.com Wed May 26 00:57:04 2010 From: matthias.baas at gmail.com (Matthias Baas) Date: Tue, 25 May 2010 23:57:04 +0100 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: <20100524130800.GA18562@panix.com> <4BFC1438.3000406@noaa.gov> Message-ID: <4BFC55C0.5090007@gmail.com> Rodney Somerstein wrote: > At 11:17 AM -0700 5/25/10, Christopher Barker wrote: >> Honestly, I don't know if the Mac is in any poorer position with >> regard to Python 3 as any other platform. >> >> NONE of the major packages I use have been ported to Py3 on any >> platform: numpy, SciPy, wxPython. Many of those are well supported on >> the Mac, so I don't think there will be any issues there. > > Thanks, Chris. This is the kind of thing I was trying to find out. After > I asked the question I started reading the comp.lang.python newsgroup > and see that lots of people seem to be in the same situation. There are > a fair number of people wanting to USE Python 3.x - that is, develop > WITH Python 3.x. However, the people that make all of the tools for > those of us that want to use them are not porting or are at least not > being very public about their ports. Another problem with porting packages to Python 3 is that Boost.Python or Pyrex are not yet available for Python 3 (Boost.Python is supposed to support Python 3 now, but it didn't work for me). These are used to write extension modules and as long as they are not ready, this will block all the packages that are based on those tools. > development community is a bit problematic. Unless the powers that be > decide to once and for all cease development of the 2.x branch of > Python, I'm not sure that 3.x will ever end up having the support that > it needs in terms of ported packages. If I had the ability to port > something like wxPython, I would definitely do so. By the way, for doing cross-platform GUI development you could also have a look at PyQt. I think there's no binary around, but building for Python 3 went absolutely smooth in my case. > Unfortunately, that > isn't the case. It seems kind of strange to start doing work with 2.7 > when supposedly 3.1.2 is the current version. I'm quite sure that Python 2.7 will still be around for quite a while. There's a growing number of commercial applications that use Python as their scripting language and I would imagine that in their case, it takes even longer until they move to Python 3, so the demand for Python 2.x packages will still be there for a while. Apart from that, they are not entirely different languages, so if you want to give Python a try, you could just as well begin with Python 2.6 or 2.7. If you write your programs with Python 3 in mind, then I think moving to Python 3 eventually won't be such a big issue. You can use the "-3" option when running Python to get warnings when you use stuff that's incompatible with Python 3. Then there's the 2to3 tool that can convert a lot of stuff automatically. If you are using an IDE that has dedicated support for Python, you might also be able to tell it you are writing code for Python 3, so that it warns you when you are writing incompatible code. For example, in Eclipse/PyDev you can set the grammar version that should be used for checking the Python syntax (it constantly yells at me because I'm still not used to print being a function... ;) ) Cheers, - Matthias - From Chris.Barker at noaa.gov Wed May 26 01:00:00 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 25 May 2010 16:00:00 -0700 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: <20100524130800.GA18562@panix.com> <2A9881C5-37DB-4D71-8A89-F65BAC70BAFC@mac.com> Message-ID: <4BFC5670.5050300@noaa.gov> Rodney Somerstein wrote: > Hopefully things will start to fall into place for Python 3.x. > I see questions on comp.lang.python and elsewhere from people wanting to > use Python 3.x as their main development language. I think many people, > such as myself, are reluctant to jump into Python right now. My > perception is that 2.x has a limited life span. Limited, yes, but long -- it is the primary version for most users now -- it will be maintained for a good while. > best choice to jump into that right now when the 3.x branch of the > language itself is where most work seems to be going on. However, as you > noted, many packages aren't trivial to port and that seems to be going > very slowly. Which contradicts your perception -- there are two types of work being done: - development of the language itself -- yes, that is the 3.x branch - development of third-party packages -- this is moving slowly to 3.x, but every one I'm involved with is making great effort to keep things 2.x compatible as they develop for 3.x - development of applications with python -- still mostly 2.x The 2 to 3 transition is a much bigger deal for extension packages -- ones that cal into the C runtime, than it is for application code. In short -- fire up 2.6.5, and code away -- I'm quite confident you will be supported as you move forward. > How far away is Python 3 from being the main branch of the language? Are > we talking another year? 2? 5? I'm going to guess about 2 years until it's the first choice for new projects, and 5 or more before most projects have ported to it -- and that is a totally uneducated guess! > In part, due to the fact > that packaging seems to be trickier for people to figure out with py2app > than with py2exe I have gotten that impression. I've always found py2app to be easier to use, actually. > The only thing really missing once that is done is > a port of a good cross-platform UI library, such as wxWidgets, so that > cross-platform apps can be developed easily. yup -- for me, I think wx will be the last one I rely on to get ported. Oh well. It's a big package! -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 cekees at gmail.com Wed May 26 01:16:42 2010 From: cekees at gmail.com (Chris Kees) Date: Tue, 25 May 2010 18:16:42 -0500 Subject: [Pythonmac-SIG] OSX10.6/readline-6.1/python-2.6.5 In-Reply-To: <9B609112-2B7D-45AC-A413-15513D60B8BB@zope.com> References: <9B609112-2B7D-45AC-A413-15513D60B8BB@zope.com> Message-ID: Thanks for explaining the situation with readline. As you suspected, what was happening is that an older version of readline was installed in /usr/local/lib that I had forgotten about. The GNU readline I had built as a 2-way 32/64-bit and installed into ${MY_PREFIX} wasn't getting linked in. After uninstalling the /usr/local/lib readline and the readline in ${MY_PREFIX} I get a working 2 way 32/64 bit python interpreter from: ./configure --prefix=${MY_PREFIX} --enable-framework=${MY_PREFIX} --with-universal-archs=intel --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.6 CC=/usr/bin/gcc CPPFLAGS="-I${MY_PREFIX}/include" LD=/usr/bin/gcc LDFLAGS="-L${MY_PREFIX}/lib" I haven't tried to get it working with GNU readline yet, but I think what I'm going to do is use the readline module from pypi as a fallback on systems where the default readline module doesn't build instead of carrying around GNU readline in my stack. For future reference, the readline module is here: http://pypi.python.org/pypi/readline/2.6.4 Thanks again for your help. Chris On Tue, May 25, 2010 at 3:00 PM, Zvezdan Petkovic wrote: > On May 25, 2010, at 2:40 PM, Charles Turner wrote: > > > On May 25, 2010, at 10:25 AM, Chris Kees wrote: > > > >> I'm compiling python and readline from source and getting a segmentation > fault in readline > > > > This approach worked for me: > > > > < > http://rh0dium.blogspot.com/2010/01/building-python-on-264-snow-leopard.html > > > > This is exactly why I asked the OP in the previous post how his readline > was compiled and where it was stored. > > You took care to compile it universal and for the same deployment target as > your Python. That is very important. > > Additionally, you installed both into (a default) /usr/local/... which > again may be important because it's in the default path for library search. > > I must point out, though, that you built Python 2.6.4 where compilation of > GNU readline was the only option. > > Starting with Python 2.6.5, when the deployment target is 10.6 (or 10.5), > the GNU readline is not needed at all. Python will link with the native > editline and work just fine. > > The OP should be able to build it using your instructions with or without > external GNU readline. > > Best regards, > > Zvezdan > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Wed May 26 01:21:57 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 25 May 2010 16:21:57 -0700 Subject: [Pythonmac-SIG] PIL binaries -- please test In-Reply-To: <4BFC4E36.8030604@gmail.com> References: <4BFC2BA8.6040809@noaa.gov> <4BFC4E36.8030604@gmail.com> Message-ID: <4BFC5B95.5070909@noaa.gov> Matthias Baas wrote: > Christopher Barker wrote: >> Much to my surprise, I had a little time to build some PIL binaries: >> >> http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.5-macosx10.5.mpkg.zip >> http://dl.dropbox.com/u/855965/PIL-OSX-Binaries/PIL-1.1.7-py2.6-macosx10.5.mpkg.zip >> I built them on OS-X 10.5 (leopard), so they may not work on 10.4 I'd >> love if someone could test and see if they do, however, I no longer have >> a 10.4 system to test on. > > I tried the py2.6 binary on OSX 10.4. The package installs fine but it > can't really load an image. When I open a jpg, I can read its size but > as soon as I try to load the data, I get an import error: > > ImportError: The _imaging C module is not installed > > When I try to import _imaging manually I get: > > ImportError: dlopen(./_imaging.so, 2): Symbol not found: _clock$UNIX2003 > Referenced from: ./_imaging.so > Expected in: dynamic lookup Thanks for testing -- it's pretty much what I expected. I build libjpeg will macports, and it linked it against the 10.5 system libs. It's certainly possible to build libs that are 10.4 compatible, but it's a pain to do on a 10.5 machine. I don't have much time, so these will remain 10.5 and above binaries, unless someone steps up to build universal versions of the dependencies that work with 10.4. NOTE: it was trivial to build them with macports on 10.5. However, last time I tried on 10.4, I had trouble. But if you have a 10.4 system and want to give it a try: $ sudo port install jpeg +universal and see if it works -- if it does, try the other dependencies (I think it's freetype, zlib, and lcms -- see the PIL README) Fredrik -- it's up to you what you want to post on your site, but if we hear from some others that they work for them, you might want to post these, making it clear they work only for the python.org binaries and OS-X 10.5 and above. For what it's worth, I built these on an Intel 10.5 system and they work there and on my PPC 10.5 system, so that's a start. -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 cekees at gmail.com Wed May 26 05:48:09 2010 From: cekees at gmail.com (Chris Kees) Date: Tue, 25 May 2010 22:48:09 -0500 Subject: [Pythonmac-SIG] DESTDIR problem Message-ID: Hi, I'm having trouble with 'make install' trying to put or touch a few things in /Applications even though I've set the prefix and framework directories to be $MY_PREFIX as in ./configure --prefix=${MY_PREFIX} --enable-framework=${MY_PREFIX} --disable-universalsdk MACOSX_DEPLOYMENT_TARGET=10.6 When running 'make install' I get: OSError: [Errno 13] Permission denied: '/Applications/Python 2.6/Build Applet.app/Contents/Info.plist' Is there some additional option I need to set to MY_PREFIX to get everything where I want it? Thanks, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From zvezdan at zope.com Wed May 26 06:10:30 2010 From: zvezdan at zope.com (Zvezdan Petkovic) Date: Wed, 26 May 2010 00:10:30 -0400 Subject: [Pythonmac-SIG] PIL binaries -- please test In-Reply-To: <4BFC4E36.8030604@gmail.com> References: <4BFC2BA8.6040809@noaa.gov> <4BFC4E36.8030604@gmail.com> Message-ID: On May 25, 2010, at 6:24 PM, Matthias Baas wrote: > I tried the py2.6 binary on OSX 10.4. The package installs fine but it > can't really load an image. When I open a jpg, I can read its size but > as soon as I try to load the data, I get an import error: > > ImportError: The _imaging C module is not installed > > When I try to import _imaging manually I get: > > ImportError: dlopen(./_imaging.so, 2): Symbol not found: _clock$UNIX2003 > Referenced from: ./_imaging.so > Expected in: dynamic lookup > > I don't know what that UNIX2003 means? Is that a special version of > clock() that's not compatible with the one provided here on 10.4? In short: Mac OS X 10.5 (Leopard) is an officially certified UNIX conforming to UNIX 2003 specification. Since Mac OS X 10.4 and earlier still had to be supported, Apple decided to use names like _clock() for legacy calls and _clock$UNIX2003() for the new UNIX specification compatible calls. See the details here: http://developer.apple.com/mac/library/releasenotes/Darwin/SymbolVariantsRelNotes/index.html Unfortunately, this also means that you cannot use this build of PIL on Mac OS X 10.4 and older. Best regards, Zvezdan From ronaldoussoren at mac.com Wed May 26 07:54:25 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 26 May 2010 07:54:25 +0200 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: <20100524130800.GA18562@panix.com> <2A9881C5-37DB-4D71-8A89-F65BAC70BAFC@mac.com> Message-ID: On 25 May, 2010, at 23:15, Rodney Somerstein wrote: > At 10:08 PM +0200 5/25/10, Ronald Oussoren wrote: >> Python 3.1.2 works fine on OSX. There is an issue with building extensions on OSX 10.6, but that will be fixed in 3.1.3. >> >> PyObjC in the repository works with python 3 and I'm working towards a release. I haven't looked into py2app yet. With some luck it will work without major changes. > > Good to hear. Thanks for the hard work on PyObjC. Do you have specific plans to look into py2app for Python 3? I will look into py2app after the next release of PyObjC, which will happen before python 2.7rc2 is released. > >> > The Mac Python community seems pretty small. Given that Python seems to position itself as a major programming and scripting language, it seems rather strange that there is so little effort placed into providing first class support for the second most popular computing platform. I know that various individuals on this list put a tremendous amount of work into porting and supporting various parts of Python on the Mac platform. But what is the overall state of Python here? Especially in regards to Python 3, which seems to definitely be the future of the language. >> >> Porting to py3k is an issue throughout the python community, mostly because cleanly porting non-trivial projects takes time. What hasn't helped is that a lot of project depend on setuptools and that didn't supported until pretty recently (and that only through the 'distribute' fork). >> >> As far as PyObjC is concerned port to py3k was a lot of work due to C-API changes and because PyObjC tries to provide seemless integration between Python and Cocoa, which means it is pretty sensitive to the large changes between python 2.x and 3.x. >> > > It's great to see dedicated people such as yourself continuing this kind of work. Hopefully things will start to fall into place for Python 3.x. I see questions on comp.lang.python and elsewhere from people wanting to use Python 3.x as their main development language. I think many people, such as myself, are reluctant to jump into Python right now. My perception is that 2.x has a limited life span. It seems not to be the best choice to jump into that right now when the 3.x branch of the language itself is where most work seems to be going on. However, as you noted, many packages aren't trivial to port and that seems to be going very slowly. 2.x has a limited life span indeed, but that's still a long time in Internet time: 2.7 will be maintained at least 2 years and longer when there is reason to do so. The current consensus is that there will be no 2.8 though, which means there will be no new features in 2.x after the release of 2.7 (later this summer). IMHO there is a chicken-and-egg problem: there aren't a lot of python 3 users and hence there is little uptake in porting libraries to python 3. However, the reason there aren't a lot of python 3 users is that a lot of libraries aren't available yet. > > Are you planning on focusing on 3.x from this point forward with only maintenance on the 2.x version of PyObjC? No. The C code for PyObjC contains lots of conditional code to be able to compile with both branches, while the Python code translates cleanly with 2to3. Having two development branches > > How far away is Python 3 from being the main branch of the language? Are we talking another year? 2? 5? Most new work in CPython is done in python 3, and when 2.7 is released all new features will only be 3.x. > >> > I have looked at moving into Python several times over the years, but it always seems to be a second class language when it comes to producing programs to run on the Mac. At least outside of various command line tools. Is Python moving toward parity with the Windows and Unix world on the Macintosh? >> >> What do you mean? Python on OSX is support as well as it is on Linux and Windows. > > I'm not trying to denigrate the hard work that you and others put into keeping Python functioning well on the Mac. In part, due to the fact that packaging seems to be trickier for people to figure out with py2app than with py2exe I have gotten that impression. Maybe most people are using py2app with very little trouble and I'm only seeing the problems and requests for help that get reported here. Py2app works at least as well as py2exe. The requests you see here are for the harder problems. IIRC two issues crop up reasonably often: (1) support for using py2app with a 64-bit build of python and (2) using py2app with libraries like Qt4 where the automatic detection of dependencies doesn't work. Support for 64-bit builds is relatively new, and full support requires some additional changes to py2app. As I'm the only developer on py2app and do all work in my free time it may take a while until I get around to publishing those changes. The second class of problem could be fixed by recipes in py2app, and already is for a number of libraries. This is something where py2app is actually easier to use than py2exe, it is an explicit goal of py2app to automate as much as possible and avoid the need for pages like this . > > It sounds like for pure Mac development, that a bit of testing and hopefully minor tweaking will be enough to get py2app running well. Once that is done, Python 3 may actually work as a great development language for Mac applications. The only thing really missing once that is done is a port of a good cross-platform UI library, such as wxWidgets, so that cross-platform apps can be developed easily. The python bindings for wxWidgets work fine with python 2, I don't know what their plans for python 3 are. PyQt already supports python 3 (at least on Windows, I haven't looked at their Mac port yet). To be honest, I'm far from impressed by the quality of the wxWidgets port to the Mac. I've run into numerous issues in the past where API calls worked just fine on Windows but failed to work on OSX. That isn't very helpfull when you want to do the groundwork of a Windows app using wxWidgets on OSX and do as little as possible on an actual windows machine. > > I also think that another part of the issue is simply that there are many more Windows developers than Mac developers. This means simply that more packages get released for Windows earlier than on the Mac. Similarly there may be more UI libraries and such under Windows because more people write them. It should be easier to develop packages with C extensions on OSX than on Windows, on Windows you basicly have to buy a compiler (although free versions for the MS tools and the MingW port of GCC may also work for some versions of those tools and some versions of Python). > > For Unix/Linux, I suspect that a larger percentage of the users are actually developers, based on what I've seen in the past. That would tend to lead to more people capable of fixing code and contributing to ports themselves on those platforms. > > Maybe what I have to resign myself to is that if I want to develop in Python 3 (or any Python for that matter) for desktop applications, I need to be willing to live with any limitations. This is because I don't have the skill to code around those limitations in C. Alternatively I could develop my C and C++ skills as well as Python skills all at the same time so that I can port needed packages. That doesn't seem very realistic. This may just be a matter of the open source nature of Python. Why not use PyObjC to build the GUI? This will allow you to write fully native applications that can make use of a significant portion of the OSX platform. Ronald > > -Rodney > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From stephen.gava at gmail.com Sat May 22 02:33:00 2010 From: stephen.gava at gmail.com (Stephen Gava) Date: Sat, 22 May 2010 10:33:00 +1000 Subject: [Pythonmac-SIG] [pythonmac-sig] python 2.7 tkinter using tk 8.6 In-Reply-To: References: Message-ID: <4BF7263C.5050905@gmail.com> On 22/05/10 1:21 AM, ronaldoussoren wrote: > > > On May 21, 2010, at 02:24 PM, Kevin Walzer wrote: > >> On 5/21/10 1:16 AM, Stephen M. Gava wrote: >> > Hi there, >> > I've installed the python.org package of python >> 2.7b2 for osx snow leopard. >> > >> > It's Tkinter appears to be built against Tk 84, but I want to use [...] > two different builds of _tkinter) and automaticly selects the right > version to use. > > What I'm thinking of is: > > have _tkinterpy that does: > > try: > from _tkinter85 import * > except ImportError: > from _tkinter84 import * > > Then patch setup.py to build _tkinter84.so and _tkinter85.so from > _tkinter.c while linking to the right version of Tk. This should only be > done when a special configure argument is present, if it isn't setup.py > should default to building _tkinter.so like it currently does. > > Ronald hmm, sounds great. i don't have the c expertise to patch cpython tho. i notice that the tcl/tk 'roadmap' for 8.6 mentions an immanent (last month) beta 2 release that will be a release candidate. of course these things (schedules) are _very_ rubbery with tcl-tk, but it would be nice if something like this tkinter tk choosing mechanism could be in place by the time there is an 'official' tk 8.6 release (lol, no rush, could be years yet...). the native .png support is worth the price of admission to tk 8.6 alone i think, no faffing about with PIL builds for recent osx just to have .png images supported in your ui. anyway, thanks for the replies, stephen. > >> >> >> --Kevin >> -- >> Kevin Walzer >> Code by Kevin >> http://www.codebykevin.com >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG >> From jens.thomas at stfc.ac.uk Tue May 25 18:20:56 2010 From: jens.thomas at stfc.ac.uk (jens.thomas at stfc.ac.uk) Date: Tue, 25 May 2010 17:20:56 +0100 Subject: [Pythonmac-SIG] Problem packaging vtk application on Snow Leopard with py2app Message-ID: <6BC8E5C6409FE941A4A19CC9A68D0CAE0208A312@exchange28.fed.cclrc.ac.uk> Hi, I'm trying to package up an app under OSX 10.6 (MacBook with Intel Duo) with py2app. The application uses the external modules: vtk, numpy, Pmw. When I try to package it up, I get the following error: ...lots of output... Copying /Library/Python/2.6/site-packages/numpy-1.4.1-py2.6-macosx-10.6-universal.egg/numpy/version.pyc -> /Users/jmht/Documents/ccp1gui/dist/ccp1gui.app/Contents/Resources/lib/python2.6/numpy creating /Users/jmht/Documents/ccp1gui/dist/ccp1gui.app/Contents/Resources/lib/python2.6/lib-dynload/vtk Traceback (most recent call last): File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 589, in _run self.run_normal() File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 660, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 777, in create_binaries platfiles = mm.run() File "build/bdist.macosx-10.6-universal/egg/macholib/MachOStandalone.py", line 101, in run for fn in platfiles: File "build/bdist.macosx-10.6-universal/egg/macholib/util.py", line 227, in iter_platform_files if is_platform_file(fn): File "build/bdist.macosx-10.6-universal/egg/macholib/util.py", line 206, in is_platform_file header = mach_o.fat_header.from_fileobj(fileobj, _endian_='>') File "build/bdist.macosx-10.6-universal/egg/macholib/ptypes.py", line 44, in from_fileobj return cls.from_str(f.read(cls._size_), **kw) File "build/bdist.macosx-10.6-universal/egg/macholib/ptypes.py", line 48, in from_str return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw) error: unpack requires a string argument of length 8 As py2app kindly fires up the debugger, I was able to look through the stack and see that: endian + cls._format_ is '>LL' (i.e. big-endian with two unsigned longs) the string s that was read in from the file is: '\xca\xfe\xba\xbe\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x03' which is of length 16, and cls._size_ is 16. Everything points to 16 being the correct length, but the call to struct.unpack is expecting something of length 8. I looked in the struct module and there is a 'calcsize' function which indicates what size is required for a specific format. struct.calcsize('>LL') is 8 whereas struct.calcsize('LL') is 16 so it looks to me like the problem is with the format string. Does anyone know if this is a bug in py2app, python or just something I'm doing wrong? Any help/suggestions would be appreciated. Thanks, Jens -- Scanned by iCritical. From jens.thomas at stfc.ac.uk Tue May 25 18:43:15 2010 From: jens.thomas at stfc.ac.uk (jens.thomas at stfc.ac.uk) Date: Tue, 25 May 2010 17:43:15 +0100 Subject: [Pythonmac-SIG] Possible bug in setuptools/py2app Message-ID: <6BC8E5C6409FE941A4A19CC9A68D0CAE0208A313@exchange28.fed.cclrc.ac.uk> Hi, I've hit a problem trying to package up an application using py2app (this is on OSX 10.6). This is using the latest version of py2app as installed with easy_install. My setup.py file lives in the top-level directory of the project directory (i.e. it's in the same directory as the python code for the project, which I think is a valid place for it to live). When I try and package it up with py2app, the packaging fails because the paths to the data files that py2app looks for have the first character of their path lopped off and py2app crashes out as shown below: running py2app running build_py creating build/bdist.macosx-10.6-universal/lib/ccp1gui/oc error: can't copy 'oc/ccp1gui.zme.txt': doesn't exist or not a regular file The correct path should be: "doc/ccp1gui.zme.txt" I've managed to trace the problem to the file: /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/build_py.py specifically the function _get_data_files, where there is the code: # Length of path to strip from found files plen = len(src_dir)+1 In my case, src_dir is blank for the first package directory (I think because it's the same one as the one in which setup.py is running from), which is why it chops off the first character. Is this a bug? Many thanks, Jens -- Scanned by iCritical. From ronaldoussoren at mac.com Wed May 26 11:59:43 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 26 May 2010 11:59:43 +0200 Subject: [Pythonmac-SIG] Problem packaging vtk application on Snow Leopard with py2app In-Reply-To: <6BC8E5C6409FE941A4A19CC9A68D0CAE0208A312@exchange28.fed.cclrc.ac.uk> References: <6BC8E5C6409FE941A4A19CC9A68D0CAE0208A312@exchange28.fed.cclrc.ac.uk> Message-ID: <26AAAE2E-39DF-4147-BF7F-4A8D126E3A36@mac.com> On 25 May, 2010, at 18:20, jens.thomas at stfc.ac.uk wrote: > Hi, > > I'm trying to package up an app under OSX 10.6 (MacBook with Intel Duo) with py2app. The application uses the external modules: vtk, numpy, Pmw. > > When I try to package it up, I get the following error: > > ...lots of output... > Copying /Library/Python/2.6/site-packages/numpy-1.4.1-py2.6-macosx-10.6-universal.egg/numpy/version.pyc -> /Users/jmht/Documents/ccp1gui/dist/ccp1gui.app/Contents/Resources/lib/python2.6/numpy > creating /Users/jmht/Documents/ccp1gui/dist/ccp1gui.app/Contents/Resources/lib/python2.6/lib-dynload/vtk > Traceback (most recent call last): > File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 589, in _run > self.run_normal() > File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 660, in run_normal > self.create_binaries(py_files, pkgdirs, extensions, loader_files) > File "/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 777, in create_binaries > platfiles = mm.run() > File "build/bdist.macosx-10.6-universal/egg/macholib/MachOStandalone.py", line 101, in run > for fn in platfiles: > File "build/bdist.macosx-10.6-universal/egg/macholib/util.py", line 227, in iter_platform_files > if is_platform_file(fn): > File "build/bdist.macosx-10.6-universal/egg/macholib/util.py", line 206, in is_platform_file > header = mach_o.fat_header.from_fileobj(fileobj, _endian_='>') > File "build/bdist.macosx-10.6-universal/egg/macholib/ptypes.py", line 44, in from_fileobj > return cls.from_str(f.read(cls._size_), **kw) > File "build/bdist.macosx-10.6-universal/egg/macholib/ptypes.py", line 48, in from_str > return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw) > error: unpack requires a string argument of length 8 > > > As py2app kindly fires up the debugger, I was able to look through the stack and see that: > > endian + cls._format_ is '>LL' (i.e. big-endian with two unsigned longs) > > the string s that was read in from the file is: > > '\xca\xfe\xba\xbe\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x03' > > which is of length 16, and cls._size_ is 16. > > Everything points to 16 being the correct length, but the call to struct.unpack is expecting something of length 8. You seem to be running a 64-bit versions of python. There are some issues w.r.t. running py2app on 64-bit executables and you seem to run into one of them. IIRC '>L' is always a 32-bit entity in the struct module, while the code expects it to be a 64-bit entity (for 64-bit binaries). Patching that should be fairly easy, but I don't have time to do that right now. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From jwhughes at me.com Wed May 26 15:27:48 2010 From: jwhughes at me.com (Joe Hughes) Date: Wed, 26 May 2010 09:27:48 -0400 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: <20100524130800.GA18562@panix.com> <2A9881C5-37DB-4D71-8A89-F65BAC70BAFC@mac.com> Message-ID: <4597ED2B-FB90-460B-89ED-E78209DE5727@me.com> I have some questions concerning what I'm reading below. Ronald states that Python 3.1.2 works with PyObjC on OSX 10.6. Is this with PyObjC 2.2 on the main site or some branch that is still experimental? If this is experimental do I use RCS/CVS/Subversion to load it onto my Mac and compile it? It has been many years since I last used an experimental branch and I forgot how to get it, but I also like using Python 3 on my Mac and have wanted to try PyObjC. Thanks, Joe On May 26, 2010, at 1:54 AM, Ronald Oussoren wrote: > > On 25 May, 2010, at 23:15, Rodney Somerstein wrote: > >> At 10:08 PM +0200 5/25/10, Ronald Oussoren wrote: >>> Python 3.1.2 works fine on OSX. There is an issue with building extensions on OSX 10.6, but that will be fixed in 3.1.3. >>> >>> PyObjC in the repository works with python 3 and I'm working towards a release. I haven't looked into py2app yet. With some luck it will work without major changes. >> >> Good to hear. Thanks for the hard work on PyObjC. Do you have specific plans to look into py2app for Python 3? > > I will look into py2app after the next release of PyObjC, which will happen before python 2.7rc2 is released. > >> >>>> The Mac Python community seems pretty small. Given that Python seems to position itself as a major programming and scripting language, it seems rather strange that there is so little effort placed into providing first class support for the second most popular computing platform. I know that various individuals on this list put a tremendous amount of work into porting and supporting various parts of Python on the Mac platform. But what is the overall state of Python here? Especially in regards to Python 3, which seems to definitely be the future of the language. >>> >>> Porting to py3k is an issue throughout the python community, mostly because cleanly porting non-trivial projects takes time. What hasn't helped is that a lot of project depend on setuptools and that didn't supported until pretty recently (and that only through the 'distribute' fork). >>> >>> As far as PyObjC is concerned port to py3k was a lot of work due to C-API changes and because PyObjC tries to provide seemless integration between Python and Cocoa, which means it is pretty sensitive to the large changes between python 2.x and 3.x. >>> >> >> It's great to see dedicated people such as yourself continuing this kind of work. Hopefully things will start to fall into place for Python 3.x. I see questions on comp.lang.python and elsewhere from people wanting to use Python 3.x as their main development language. I think many people, such as myself, are reluctant to jump into Python right now. My perception is that 2.x has a limited life span. It seems not to be the best choice to jump into that right now when the 3.x branch of the language itself is where most work seems to be going on. However, as you noted, many packages aren't trivial to port and that seems to be going very slowly. > > 2.x has a limited life span indeed, but that's still a long time in Internet time: 2.7 will be maintained at least 2 years and longer when there is reason to do so. The current consensus is that there will be no 2.8 though, which means there will be no new features in 2.x after the release of 2.7 (later this summer). > > IMHO there is a chicken-and-egg problem: there aren't a lot of python 3 users and hence there is little uptake in porting libraries to python 3. However, the reason there aren't a lot of python 3 users is that a lot of libraries aren't available yet. > >> >> Are you planning on focusing on 3.x from this point forward with only maintenance on the 2.x version of PyObjC? > > No. The C code for PyObjC contains lots of conditional code to be able to compile with both branches, while the Python code translates cleanly with 2to3. > > Having two development branches >> >> How far away is Python 3 from being the main branch of the language? Are we talking another year? 2? 5? > > Most new work in CPython is done in python 3, and when 2.7 is released all new features will only be 3.x. > >> >>>> I have looked at moving into Python several times over the years, but it always seems to be a second class language when it comes to producing programs to run on the Mac. At least outside of various command line tools. Is Python moving toward parity with the Windows and Unix world on the Macintosh? >>> >>> What do you mean? Python on OSX is support as well as it is on Linux and Windows. >> >> I'm not trying to denigrate the hard work that you and others put into keeping Python functioning well on the Mac. In part, due to the fact that packaging seems to be trickier for people to figure out with py2app than with py2exe I have gotten that impression. Maybe most people are using py2app with very little trouble and I'm only seeing the problems and requests for help that get reported here. > > Py2app works at least as well as py2exe. The requests you see here are for the harder problems. IIRC two issues crop up reasonably often: (1) support for using py2app with a 64-bit build of python and (2) using py2app with libraries like Qt4 where the automatic detection of dependencies doesn't work. > > Support for 64-bit builds is relatively new, and full support requires some additional changes to py2app. As I'm the only developer on py2app and do all work in my free time it may take a while until I get around to publishing those changes. > > The second class of problem could be fixed by recipes in py2app, and already is for a number of libraries. This is something where py2app is actually easier to use than py2exe, it is an explicit goal of py2app to automate as much as possible and avoid the need for pages like this . > >> >> It sounds like for pure Mac development, that a bit of testing and hopefully minor tweaking will be enough to get py2app running well. Once that is done, Python 3 may actually work as a great development language for Mac applications. The only thing really missing once that is done is a port of a good cross-platform UI library, such as wxWidgets, so that cross-platform apps can be developed easily. > > The python bindings for wxWidgets work fine with python 2, I don't know what their plans for python 3 are. PyQt already supports python 3 (at least on Windows, I haven't looked at their Mac port yet). > > To be honest, I'm far from impressed by the quality of the wxWidgets port to the Mac. I've run into numerous issues in the past where API calls worked just fine on Windows but failed to work on OSX. That isn't very helpfull when you want to do the groundwork of a Windows app using wxWidgets on OSX and do as little as possible on an actual windows machine. > >> >> I also think that another part of the issue is simply that there are many more Windows developers than Mac developers. This means simply that more packages get released for Windows earlier than on the Mac. Similarly there may be more UI libraries and such under Windows because more people write them. > > It should be easier to develop packages with C extensions on OSX than on Windows, on Windows you basicly have to buy a compiler (although free versions for the MS tools and the MingW port of GCC may also work for some versions of those tools and some versions of Python). > >> >> For Unix/Linux, I suspect that a larger percentage of the users are actually developers, based on what I've seen in the past. That would tend to lead to more people capable of fixing code and contributing to ports themselves on those platforms. >> >> Maybe what I have to resign myself to is that if I want to develop in Python 3 (or any Python for that matter) for desktop applications, I need to be willing to live with any limitations. This is because I don't have the skill to code around those limitations in C. Alternatively I could develop my C and C++ skills as well as Python skills all at the same time so that I can port needed packages. That doesn't seem very realistic. This may just be a matter of the open source nature of Python. > > Why not use PyObjC to build the GUI? This will allow you to write fully native applications that can make use of a significant portion of the OSX platform. > > Ronald >> >> -Rodney >> >> >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG From ronaldoussoren at mac.com Wed May 26 17:11:43 2010 From: ronaldoussoren at mac.com (ronaldoussoren) Date: Wed, 26 May 2010 08:11:43 -0700 (PDT) Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: <4597ED2B-FB90-460B-89ED-E78209DE5727@me.com> Message-ID: On May 26, 2010, at 03:27 PM, Joe Hughes wrote: I have some questions concerning what I'm reading below. Ronald states that Python 3.1.2 works with PyObjC on OSX 10.6. Is this with PyObjC 2.2 on the main site or some branch that is still experimental? If this is experimental do I use RCS/CVS/Subversion to load it onto my Mac and compile it? It has been many years since I last used an experimental branch and I forgot how to get it, but I also like using Python 3 on my Mac and have wanted to try PyObjC. This is with the version of pyobjc that is currently in the repository (the trunk). Building PyObjC is a bit of a hassle due to the large number of subprojects and I'd therefore advise against ?installing from the repository unless you know what you're doing. I with some luck I'll upload a first beta of the next release before WWDC, I'm currently wrestling with my test environment: I've writting a script that builds and runs the unittests for all subprojects and that doesn't work entirely right for python 3.x yet. This is caused by bugs in some components I'm using, at least when building using python 3.2 (alpha version from the repository). I have to fix those issues before I can properly automate testing for the py3k port.... Ronald Thanks, Joe On May 26, 2010, at 1:54 AM, Ronald Oussoren wrote: > > On 25 May, 2010, at 23:15, Rodney Somerstein wrote: > >> At 10:08 PM +0200 5/25/10, Ronald Oussoren wrote: >>> Python 3.1.2 works fine on OSX. There is an issue with building extensions on OSX 10.6, but that will be fixed in 3.1.3. >>> >>> PyObjC in the repository works with python 3 and I'm working towards a release. I haven't looked into py2app yet. With some luck it will work without major changes. >> >> Good to hear. Thanks for the hard work on PyObjC. Do you have specific plans to look into py2app for Python 3? > > I will look into py2app after the next release of PyObjC, which will happen before python 2.7rc2 is released. > >> >>>> The Mac Python community seems pretty small. Given that Python seems to position itself as a major programming and scripting language, it seems rather strange that there is so little effort placed into providing first class support for the second most popular computing platform. I know that various individuals on this list put a tremendous amount of work into porting and supporting various parts of Python on the Mac platform. But what is the overall state of Python here? Especially in regards to Python 3, which seems to definitely be the future of the language. >>> >>> Porting to py3k is an issue throughout the python community, mostly because cleanly porting non-trivial projects takes time. What hasn't helped is that a lot of project depend on setuptools and that didn't supported until pretty recently (and that only through the 'distribute' fork). >>> >>> As far as PyObjC is concerned port to py3k was a lot of work due to C-API changes and because PyObjC tries to provide seemless integration between Python and Cocoa, which means it is pretty sensitive to the large changes between python 2.x and 3.x. >>> >> >> It's great to see dedicated people such as yourself continuing this kind of work. Hopefully things will start to fall into place for Python 3.x. I see questions on comp.lang.python and elsewhere from people wanting to use Python 3.x as their main development language. I think many people, such as myself, are reluctant to jump into Python right now. My perception is that 2.x has a limited life span. It seems not to be the best choice to jump into that right now when the 3.x branch of the language itself is where most work seems to be going on. However, as you noted, many packages aren't trivial to port and that seems to be going very slowly. > > 2.x has a limited life span indeed, but that's still a long time in Internet time: 2.7 will be maintained at least 2 years and longer when there is reason to do so. The current consensus is that there will be no 2.8 though, which means there will be no new features in 2.x after the release of 2.7 (later this summer). > > IMHO there is a chicken-and-egg problem: there aren't a lot of python 3 users and hence there is little uptake in porting libraries to python 3. However, the reason there aren't a lot of python 3 users is that a lot of libraries aren't available yet. > >> >> Are you planning on focusing on 3.x from this point forward with only maintenance on the 2.x version of PyObjC? > > No. The C code for PyObjC contains lots of conditional code to be able to compile with both branches, while the Python code translates cleanly with 2to3. > > Having two development branches >> >> How far away is Python 3 from being the main branch of the language? Are we talking another year? 2? 5? > > Most new work in CPython is done in python 3, and when 2.7 is released all new features will only be 3.x. > >> >>>> I have looked at moving into Python several times over the years, but it always seems to be a second class language when it comes to producing programs to run on the Mac. At least outside of various command line tools. Is Python moving toward parity with the Windows and Unix world on the Macintosh? >>> >>> What do you mean? Python on OSX is support as well as it is on Linux and Windows. >> >> I'm not trying to denigrate the hard work that you and others put into keeping Python functioning well on the Mac. In part, due to the fact that packaging seems to be trickier for people to figure out with py2app than with py2exe I have gotten that impression Maybe most people are using py2app with very little trouble and I'm only seeing the problems and requests for help that get reported here. > > Py2app works at least as well as py2exe. The requests you see here are for the harder problems. IIRC two issues crop up reasonably often: (1) support for using py2app with a 64-bit build of python and (2) using py2app with libraries like Qt4 where the automatic detection of dependencies doesn't work. > > Support for 64-bit builds is relatively new, and full support requires some additional changes to py2app. As I'm the only developer on py2app and do all work in my free time it may take a while until I get around to publishing those changes. > > The second class of problem could be fixed by recipes in py2app, and already is for a number of libraries. This is something where py2app is actually easier to use than py2exe, it is an explicit goal of py2app to automate as much as possible and avoid the need for pages like this >> >> It sounds like for pure Mac development, that a bit of testing and hopefully minor tweaking will be enough to get py2app running well. Once that is done, Python 3 may actually work as a great development language for Mac applications. The only thing really missing once that is done is a port of a good cross-platform UI library, such as wxWidgets, so that cross-platform apps can be developed easily. > > The python bindings for wxWidgets work fine with python 2, I don't know what their plans for python 3 are. PyQt already supports python 3 (at least on Windows, I haven't looked at their Mac port yet). > > To be honest, I'm far from impressed by the quality of the wxWidgets port to the Mac. I've run into numerous issues in the past where API calls worked just fine on Windows but failed to work on OSX. That isn't very helpfull when you want to do the groundwork of a Windows app using wxWidgets on OSX and do as little as possible on an actual windows machine. > >> >> I also think that another part of the issue is simply that there are many more Windows developers than Mac developers. This means simply that more packages get released for Windows earlier than on the Mac. Similarly there may be more UI libraries and such under Windows because more people write them. > > It should be easier to develop packages with C extensions on OSX than on Windows, on Windows you basicly have to buy a compiler (although free versions for the MS tools and the MingW port of GCC may also work for some versions of those tools and some versions of Python). > >> >> For Unix/Linux, I suspect that a larger percentage of the users are actually developers, based on what I've seen in the past. That would tend to lead to more people capable of fixing code and contributing to ports themselves on those platforms. >> >> Maybe what I have to resign myself to is that if I want to develop in Python 3 (or any Python for that matter) for desktop applications, I need to be willing to live with any limitations. This is because I don't have the skill to code around those limitations in C. Alternatively I could develop my C and C++ skills as well as Python skills all at the same time so that I can port needed packages. That doesn't seem very realistic. This may just be a matter of the open source nature of Python. > > Why not use PyObjC to build the GUI? This will allow you to write fully native applications that can make use of a significant portion of the OSX platform. > > Ronald >> >> -Rodney >> >> >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG at python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Wed May 26 18:43:57 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 26 May 2010 09:43:57 -0700 Subject: [Pythonmac-SIG] Which version to use?? In-Reply-To: References: <20100524130800.GA18562@panix.com> <2A9881C5-37DB-4D71-8A89-F65BAC70BAFC@mac.com> Message-ID: <4BFD4FCD.8040303@noaa.gov> Ronald Oussoren wrote: > To be honest, I'm far from impressed by the quality of the wxWidgets > port to the Mac. I've run into numerous issues in the past where API > calls worked just fine on Windows but failed to work on OSX. That > isn't very helpfull when you want to do the groundwork of a Windows > app using wxWidgets on OSX and do as little as possible on an actual > windows machine. Being a wx fan, I thought I'd comment. Ronald is absolutely correct -- there are platform differences -- there is no substitute for testing early and often on all the platforms you want to support. I've found that while it's fairly common for s given piece of code to work on one platform, but not another, I can usually find a way to write it that works everywhere -- and that's usually the documented "proper" way. i.e. you can get away with different errors on the different platforms. However, while not perfect, what are the alternatives? If you only want to support the Mac, then by all means use PyObjC -- that will give you a fully native application, but it is not an option if you want to support other platforms. pyQT, pyGTK, and tkInter are the other options -- each has its fans, but none of them produce native looking and feeling apps on OS-X. wx wraps the native libs (Carbon for now, but the next version is Cocoa), so it's possible to have truly native Mac apps with wx, that are also native on Windows and *nix (of you call GTK native). Note that I say possible, because there are lot of details about how you design the apps t make them look and feel "right" on the Mac -- if you neglect those, it won't be quite right. I suppose if you tweak a QT app enough, it might look native, but wx does a much better job out of the box. The other option, of course, is to write multiple GUIs -- my experience is that it takes a LOT of code to write a GUI -- so that's a lot of work! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Wed May 26 19:58:32 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 26 May 2010 10:58:32 -0700 Subject: [Pythonmac-SIG] [Image-SIG] PIL binaries -- please test In-Reply-To: <1274858227.6918.10.camel@mypride> References: <4BFC2BA8.6040809@noaa.gov> <1274858227.6918.10.camel@mypride> Message-ID: <4BFD6148.8000407@noaa.gov> Yury V. Zaytsev wrote: > On Tue, 2010-05-25 at 12:57 -0700, Christopher Barker wrote: > >> If these work well, I think Fredrik will put them on the PIL site. > > If you need a permanent mirror in the States, here you go: > > http://packages.zaytsev.net/python/ Thanks, though ideally these would be available in a place everyone would know to look -- i.e. the PIL site. > What I would want to comment is that it would be nice for you to post > the history script / walk-through / whatever on how you created them, so > that other people would be able to reproduce this if you are busy / > unavailable etc. > > For instance, I have a whole bunch of Macs out there... great -- are any of them running 10.4? I have little time, but here is the short version: The goal is to get a PIL binary that is statically linked to all of its dependencies, and those dependencies are all universal (32 bit PPC and Intel) and linked against the 10.4 sdk (or even the 10.3 one...) I achieved all of this except for the 10.4 part... = Building the dependencies: = This ended up being trivial with macports: sudo port install jpeg +universal sudo port install lcms +universal sudo port install freetype +universal = Statically linking them when building PIL: = This is trickier -- it turns out that the PIL setup.py already looks in the macports tree for libs. However, gcc prefers dynamic linking, so out of the box, it will dynamically link the dependencies -- fine on your machine, but not re-distributable. I THINK there may be a way to tell gcc, through distutils, to statically link, but it's hard to find. However, if gcc only finds static libs, then it will link those. In this case, I wasn't using macports for anything else on that machine, so what I did is re-name /opt/local/lib, and then create a new one that had only static libs in it. then I just ran setup,py build and presto: all was well. The better way to do this would be to edit the setup.py to point to a place where the static libs are instead of mangling your macports install. One other note about 10.4 -- the last time I tried to build teh deps n a 10.4 machine, I had trouble -- I don't think there are a lot of macports devs on 10.4 any more, so it tends to be buggier. To create the package, run bdist_mpkg, you can get that with easy-install -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 wrw at me.com Fri May 28 15:00:42 2010 From: wrw at me.com (William R. Wing) Date: Fri, 28 May 2010 09:00:42 -0400 Subject: [Pythonmac-SIG] py2app query from a naif Message-ID: <62958350-BE0E-4CDD-9C1A-3FEB6E27E2A1@me.com> I'm trying to get py2app working so I can distribute a python application I've written for OS-X. I finally succeeded in getting py2app to run to completion with no errors, and it produces an output bundle with the right name and a cute icon. The recipe for success in getting that far was to override python 2.6's default behavior in OS X and force it to run in 32-bit mode using the "defaults write....." command in Apple's python man page. However, the output .app runs ONLY on the system on which it was created. Taking it to another OS-X box (also Intel architecture, also running the same level of OS X (10.6.3), and also running python2.6, but as it came from Apple (still 64-bit default), the .app won't run. The error message in the system log isn't crystal clear - at least to me. It is (this is a direct cut and paste) : 5/27/10 1:25:48 PM EthernetError[5822] 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 where "EthernetError" is the name of the application bundle that I'm trying to launch. The error message does indeed say "A Python runtime could be located" (which I'd not think represented an error). When I look at the plist file I see: PyRuntimeLocations @executable_path/../Frameworks/Python.framework/Versions/2.6/Python /System/Library/Frameworks/Python.framework/Versions/2.6/Python which looks ok, at least to me (who doesn't know what to look for). I'm guessing that the error message should have been: "A Python runtime could NOT be located." Since the output bundle that py2app created was only 283kB (which seems small to me if it really contains a universal binary of the python interpreter), this would be sort of self-consistent. I know from reading other py2app exchanges on this list that I can't distribute Apple's binary, and eventually I'll have to replace it with one from python.org, but I'd like to get py2app running before I tackle that hurdle. What am I missing? Can anyone please help? Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: From jriordanzoom at verizon.net Fri May 28 20:00:39 2010 From: jriordanzoom at verizon.net (John Riordan) Date: Fri, 28 May 2010 14:00:39 -0400 Subject: [Pythonmac-SIG] Python 3. OS/X 10.6 Ipython Message-ID: <4C0004C7.3080401@verizon.net> I am trying to get IPython running with Python 3.1 on OS/X 10.6.3. The install script for IPython configures it to run with Python 2.6. Is there a way around this? From Chris.Barker at noaa.gov Sat May 29 19:30:22 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Sat, 29 May 2010 10:30:22 -0700 Subject: [Pythonmac-SIG] py2app query from a naif In-Reply-To: <62958350-BE0E-4CDD-9C1A-3FEB6E27E2A1@me.com> References: <62958350-BE0E-4CDD-9C1A-3FEB6E27E2A1@me.com> Message-ID: <4C014F2E.8040107@noaa.gov> William R. Wing (Bill Wing) wrote: > I know from reading other py2app exchanges on this list that I can't > distribute Apple's binary, and eventually I'll have to replace it with > one from python.org, but I'd like to get py2app running before I tackle > that hurdle. > What am I missing? Can anyone please help? partly because of the re-distribution issue, Py2app is set up NOT to bundle Apple's Python, so trying to get py2app working with Apple's python is a waste of time, if what you want is a bundle with Python included. If you want a re-distributable app bundle, install the Python2.6 from Python org, install all the packages you need, get your app running there, install py2app into that Python, then build away. That's really the way to do it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From rsgames at inbox.com Sun May 30 03:51:54 2010 From: rsgames at inbox.com (RSGames Support) Date: Sat, 29 May 2010 17:51:54 -0800 Subject: [Pythonmac-SIG] Py2App Problems Message-ID: Hey, I am having some issues building my program with Py2App. My program makes use of the PyTTSX package (http://pypi.python.org/pypi/pyttsx/1.0). I know there are 2 arguments in Py2App that may need to be used (-i and -p). Since PyTTSX is a package, I first tried the -p parameter. Here is the output for that: running py2app *** using recipe: virtualenv *** *** using recipe: pygame *** *** filtering dependencies *** 581 total 60 filtered 5 orphaned 521 remaining Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 589, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 659, in run_normal pkgdirs = self.collect_packagedirs() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 637, in collect_packagedirs for pkg in self.packages File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.4.3-py2.6.egg/py2app/build_app.py", line 1045, in get_bootstrap bootstrap = imp_find_module(bootstrap)[1] File "build/bdist.macosx-10.3-fat/egg/modulegraph/util.py", line 13, in imp_find_module result = imp.find_module(name, path) ImportError: No module named pyttsx > /Users/MacAdmin/Desktop/RSG/zgp/src/build/bdist.macosx-10.3-fat/egg/modulegraph/util.py(13)imp_find_module() -> result = imp.find_module(name, path) (Pdb) I'm really unsure why it can't find pyttsx. I can easily import pyttsx, look: >>> import pyttsx >>> pyttsx After this, I wondered what would happen if I used the -i argument, instead of -p. Here is the output from that: Traceback (most recent call last): File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/__boot__.py", line 137, in _run('zgp.py') File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/__boot__.py", line 134, in _run execfile(path, globals(), globals()) File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/zgp.py", line 18, in main() File "/Users/MacAdmin/Desktop/RSG/zgp/src/dist/zgp.app/Contents/Resources/zgp.py", line 13, in main output.setup() File "output.pyc", line 36, in setup File "build/bdist.macosx-10.6-universal/egg/pyttsx/__init__.py", line 39, in init File "build/bdist.macosx-10.6-universal/egg/pyttsx/engine.py", line 45, in __init__ File "build/bdist.macosx-10.6-universal/egg/pyttsx/driver.py", line 64, in __init__ ImportError: No module named drivers.nsss 2010-05-21 07:08:28.986 zgp[41405:10b] zgp Error 2010-05-21 07:08:29.443 zgp[41405:10b] zgp Error An unexpected error has occurred during execution of the main script ImportError: No module named drivers.nsss I assume I'm supposed to be using the -p argument, can anyone provide some insight as to why it is not working? Thank you in advance. -Ryan ____________________________________________________________ Send any screenshot to your friends in seconds... Works in all emails, instant messengers, blogs, forums and social networks. TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if2 for FREE From hraban at fiee.net Sun May 30 11:15:15 2010 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sun, 30 May 2010 11:15:15 +0200 Subject: [Pythonmac-SIG] Py2App Problems In-Reply-To: References: Message-ID: <337BC06B-3440-485B-B4F9-A20441493221@fiee.net> Am 2010-05-30 um 03:51 schrieb RSGames Support: > I'm really unsure why it can't find pyttsx. I can easily import > pyttsx, look: >>>> import pyttsx >>>> pyttsx > 2.6/lib/python2.6/site-packages/pyttsx-1.0.egg/pyttsx/__init__.pyc'> I'm not sure if that's your problem, but last time I checked, py2app didn't support zipped eggs. Did you install your pyttsx egg unzipped? Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From mjldehoon at yahoo.com Sun May 30 04:00:06 2010 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Sat, 29 May 2010 19:00:06 -0700 (PDT) Subject: [Pythonmac-SIG] Python 2.7b2 framework install Message-ID: <98045.15111.qm@web62404.mail.re1.yahoo.com> Hi everybody, When I try to install Python as a framework: ./configure --enable-framework make make install then Python gets installed under /Library/Frameworks/Python.framework/Versions/2.7, but it doesn't seem to function as a framework: >>> import MacOS >>> MacOS.WMAvailable() False >>> Python 2.6.5 installed as a framework returns True here. With Python 2.7b2, my extension module (the MacOSX backend for matplotlib) doesn't interact correctly with the window manager; it works fine with Python 2.6.5. Did anything change in the installation of frameworks between Python 2.6.5 and 2.7b2? Thanks, --Michiel. From ronaldoussoren at mac.com Sun May 30 17:59:01 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 30 May 2010 17:59:01 +0200 Subject: [Pythonmac-SIG] Python 2.7b2 framework install In-Reply-To: <98045.15111.qm@web62404.mail.re1.yahoo.com> References: <98045.15111.qm@web62404.mail.re1.yahoo.com> Message-ID: <02EED74D-F7CB-4B1F-8975-1D8ECFBF1B32@mac.com> On 30 May, 2010, at 4:00, Michiel de Hoon wrote: > Hi everybody, > > When I try to install Python as a framework: > > ./configure --enable-framework > make > make install > > then Python gets installed under /Library/Frameworks/Python.framework/Versions/2.7, but it doesn't seem to function as a framework: > >>>> import MacOS >>>> MacOS.WMAvailable() > False Odd. This works for me using a universal build. >>>> > > Python 2.6.5 installed as a framework returns True here. > > With Python 2.7b2, my extension module (the MacOSX backend for matplotlib) doesn't interact correctly with the window manager; it works fine with Python 2.6.5. > > Did anything change in the installation of frameworks between Python 2.6.5 and 2.7b2? The python/pythonw command's got replaced by a slightly more useful implementation. Which version of OSX are you on? Ronald > > Thanks, > --Michiel. > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From mjldehoon at yahoo.com Mon May 31 03:56:58 2010 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Sun, 30 May 2010 18:56:58 -0700 (PDT) Subject: [Pythonmac-SIG] Python 2.7b2 framework install In-Reply-To: <02EED74D-F7CB-4B1F-8975-1D8ECFBF1B32@mac.com> Message-ID: <139619.75558.qm@web62403.mail.re1.yahoo.com> Thanks for your reply. > >>>> import MacOS > >>>> MacOS.WMAvailable() > > False > > Which version of OSX are you on? I see this behavior with both Mac OS X 10.4 and 10.5 (I don't have access to 10.6, so I haven't tried there). Thanks, --Michiel. From johan.gyllenspetz at gmail.com Mon May 31 23:25:50 2010 From: johan.gyllenspetz at gmail.com (Johan Gyllenspetz) Date: Mon, 31 May 2010 23:25:50 +0200 Subject: [Pythonmac-SIG] py2app, snow leopard, x86_64, ports Message-ID: Hi, What is the status on py2app -> snow leopard -> x86_64 and ports. Do I really need to build all port packages with the flag +universal, it seems like it seems the application when inspected returns. file dist/dog.app/Contents/MacOS/dog dist/dog.app/Contents/MacOS/dog: Mach-O universal binary with 2 architectures dist/dog.app/Contents/MacOS/dog (for architecture i386): Mach-O executable i386 dist/dog.app/Contents/MacOS/dog (for architecture ppc): Mach-O executable ppc Is there a way to tell py2app to build the app for x86_64 instead thus solving the issue with having to build all port packages with the universal flag (which can be quite tricky). /Johan