Re: [Pythonmac-SIG] Re-beginner's simple question
Charles, That seems normal. Here's a bash script I use for compiling my application. I don't mess with the setup.py once it's generated, and this bash script seems to do the trick. rm -r build rm -r dist py2applet --make-setup Decoder.py python setup.py py2app --include DUtils,LabVIEWWrapper --packages PyDrill,mx,Ft,ZODB,persistent,transaction,zope --resources config.xml,file1.xml,file2.xml,file3.xml,logs compile.log cp -r /usr/local/Zope-3.3.1-Python2.5/lib/python/zope/interface / Teledrill/Applications/Python/Decoder/dist/Decoder.app/Contents/ Resources/lib/pytho n2.5/zope/ The first two lines simply clean out the old build. The third line creates the setup.py file. The fourth line actually compiles the app. The include files are two .py files, local modules, that i need to include. The packages are python packages on the python path that I want to include for use. The resources are include files that my app needs, i've obscured their actual names, and the command dumps out to a log. The last line is a really silly way to correct a bug in py2app. When i tell it to include zope, it doesn't include the interface sub- module, so I forcefully copy it into the app. I'm not sure if this is the right way to do it, but it's worked for me so far. Good luck. Also feel free to ask any time. I ask questions all of the time. Regards, Kenneth Miller On Jan 19, 2008, at 6:59 PM, Charles Hartman wrote: Hm. I'm very puzzled. I tried python setup.py py2app -A and ended up with a tiny 192Kb application. It runs fine on my machine. But it surely doesn't have a Python built into it, at that size. (The regular python setup.py py2app produces a monstrous 40Mb file.) I don't mean to keep nagging you for help. Where's the best place to find an explanation of the details of this? Many thanks. Charles Hartman On Jan 19, 2008, at 6:19 PM, Kenneth Miller wrote: No, it bundles a python binary along with your source in a .app package. Regards, Kenneth Miller On Jan 19, 2008, at 4:55 PM, Charles Hartman [EMAIL PROTECTED] wrote: Thank you very much. Doesn't that depend on whatever Python is built-in on the end-user's machine? I'd have to do some testing (which I may not have properly equipped machines to do) to see what my app will work with . . . Best, Charles Hartman On Jan 19, 2008, at 4:20 PM, Kenneth Miller wrote: Check out py2applet, I use it all the time. Regards, Kenneth Miller On Jan 19, 2008 1:40 PM, Charles Hartman [EMAIL PROTECTED] wrote: I mean *really* simple: I've been away from Python programming for a couple of years, and I've just gotten a query about an old open- source program posted on my website. I may have a fix for the problem the user encountered, at least when I run from inside the Wing IDE. My question is, what is the current best/simplest way to build a freestanding application? I tried python setup.py with my old setup.py file, but I get an error: setuptools not found. Maybe I just need to fix my path? It's been a couple of systems (a couple of computers, for that matter) since I did this, and though I've kept up with current versions of Python (2.5), Wing, and wxPython (2.8.x), I've probably neglected some basic housekeeping. Pointers to a simple how-to-build-an-app doc would be welcome. Thanks for any help. Charles Hartman ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
On 19 Jan, 2008, at 21:43, [EMAIL PROTECTED] wrote: My Powerbook G4 is getting rather long-in-the-tooth. It's display is starting to act up, so I think I'm going to buy a new Mac something in the fairly near future, but I'm not yet sure what. To that end, I've started a table of pystone numbers for Macs on the Python wiki: http://wiki.python.org/moin/MacPython/MacModelPerformance If you could help by adding some rows to the table, especially for current MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd appreciate it. I've posted some numbers as well, which in itself doesn't warrent an e- mail. What is interesting though is the difference between 32-bit and 64-bit code: Python 2.5.2a0 (60124) 32-bit: 52083 64-bit: 60871 64-bit code is significantly faster here (all of this on a MacBook Pro 2.33Ghz/3GByte) Ronald Thanks, -- Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/ The major difference between Democrats and Republicans is that Republicans don't know that Randy Newman's lyrics are full of sarcasm. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
Ronald What is interesting though is the difference between 32-bit and Ronald 64-bit code: Ronald Python 2.5.2a0 (60124) Ronald 32-bit: 52083 Ronald 64-bit: 60871 Ronald 64-bit code is significantly faster here (all of this on a Ronald MacBook Pro 2.33Ghz/3GByte) Thanks. Is that something available on the entire line of Core 2 Duo CPUs? Is it something I can enable on my dual processor G5 or my G4 PowerBook? If so, let me know and I'll add more rows. Skip ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
On 20 Jan, 2008, at 16:27, [EMAIL PROTECTED] wrote: Ronald What is interesting though is the difference between 32- bit and Ronald 64-bit code: Ronald Python 2.5.2a0 (60124) Ronald 32-bit: 52083 Ronald 64-bit: 60871 Ronald 64-bit code is significantly faster here (all of this on a Ronald MacBook Pro 2.33Ghz/3GByte) Thanks. Is that something available on the entire line of Core 2 Duo CPUs? Is it something I can enable on my dual processor G5 or my G4 PowerBook? If so, let me know and I'll add more rows. All Core2 systems are capable of running 64-bit code. I currently build 64-bit interpreters using this command-line: ./configure --disable-toolbox-glue CFLAGS=-arch x86_64 LDFLAGS=- arch x86_64 OPT=-arch x86_64 -O3 -fwrapv (and then the make/make install dance). G4 systems cannot run 64-bit code, G5's are the only PPC systems capable of running 64-bit code. The framework that Apple ships with leopard is 64-bit as well, but they don't ship a 64-bit commandline interpreter with it. That's easy enough to fix, but I haven't managed to actually make time to do that. Another long term plan, but probably shorter-term now that I know how much difference running in 64-bit mode makes, is creating a patch for python-2.6 that makes is possible to do a 4-way universal build on Leopard systems. Ronald Skip smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
Am 2008-01-19 um 21:43 schrieb [EMAIL PROTECTED]: If you could help by adding some rows to the table, especially for current MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd appreciate it. I guess it doesn't really matter, but my trusty old steam powered G4/400 on OSX 10.4 gets... - 6112 with Apple's 2.3 - 7788 with 2.4.4 Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB RAM) and was a bit surprised to see little improvement over the Core Duo numbers. 63019.7 pystones/second I am assuming the GIL is limiting threading and therefore I am really running on one or two cores--hence the tangible improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth increase as well. This is the 32-bit number, I'll find some time to try 64-bit--but first want to make sure it doesn't mess up my system as I am using Apple Python 2.5.1 exclusively right now and want to avoid the split brain problem. Daniel On Jan 20, 2008, at 1:27 AM, Ronald Oussoren wrote: On 19 Jan, 2008, at 21:43, [EMAIL PROTECTED] wrote: My Powerbook G4 is getting rather long-in-the-tooth. It's display is starting to act up, so I think I'm going to buy a new Mac something in the fairly near future, but I'm not yet sure what. To that end, I've started a table of pystone numbers for Macs on the Python wiki: http://wiki.python.org/moin/MacPython/MacModelPerformance If you could help by adding some rows to the table, especially for current MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd appreciate it. I've posted some numbers as well, which in itself doesn't warrent an e-mail. What is interesting though is the difference between 32-bit and 64-bit code: Python 2.5.2a0 (60124) 32-bit: 52083 64-bit: 60871 64-bit code is significantly faster here (all of this on a MacBook Pro 2.33Ghz/3GByte) Ronald Thanks, -- Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/ The major difference between Democrats and Republicans is that Republicans don't know that Randy Newman's lyrics are full of sarcasm. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
Daniel I am assuming the GIL is limiting threading and therefore I am Daniel really running on one or two cores--hence the tangible Daniel improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a Daniel bit of the memory bandwidth increase as well. The GIL doesn't enter into things here. The pystones benchmark isn't multithreaded so even if Python was free-threaded the pystones benchmark wouldn't benefit from it. Skip ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
On 20-Jan-2008, at 19:23 , Daniel Lord wrote: I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB RAM) and was a bit surprised to see little improvement over the Core Duo numbers. 63019.7 pystones/second I am assuming the GIL is limiting threading and therefore I am really running on one or two cores--hence the tangible improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth increase as well. Interesting... My first generation quadcore at 2.6 Ghz clocks at 62578.2. So there's another limiting factor: from my machine to yours is a 15% speed bump, but only a 1% increase in pystone numbers. Somebody told me recently that MacOSX is not very good for fast task switching with multiprocessors, because apparently (his words, and possibly misrepresented by me) the implementation of semaphores sucks. This seems to corroborate that. Hmm, what is your bus speed? Mine is 1.33 Ghz, is yours that as well is it 1.5 Ghz? If the former it could be that semaphores somehow run at bus speed and semaphore overhead dwarves any processing done. If your bus runs at 1.5Ghz there must be yet another bottleneck... -- Jack Jansen, [EMAIL PROTECTED], http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
It would be interesting to see if that held up on ppc64. My guess is that it would benchmark slower in 64-bit mode than 32-bit mode on ppc. - Ian On Jan 20, 2008, at 2:27 AM, Ronald Oussoren wrote: On 19 Jan, 2008, at 21:43, [EMAIL PROTECTED] wrote: My Powerbook G4 is getting rather long-in-the-tooth. It's display is starting to act up, so I think I'm going to buy a new Mac something in the fairly near future, but I'm not yet sure what. To that end, I've started a table of pystone numbers for Macs on the Python wiki: http://wiki.python.org/moin/MacPython/MacModelPerformance If you could help by adding some rows to the table, especially for current MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd appreciate it. I've posted some numbers as well, which in itself doesn't warrent an e-mail. What is interesting though is the difference between 32-bit and 64-bit code: Python 2.5.2a0 (60124) 32-bit: 52083 64-bit: 60871 64-bit code is significantly faster here (all of this on a MacBook Pro 2.33Ghz/3GByte) Ronald Thanks, -- Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/ The major difference between Democrats and Republicans is that Republicans don't know that Randy Newman's lyrics are full of sarcasm. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
Ian It would be interesting to see if that held up on ppc64. My guess Ian is that it would benchmark slower in 64-bit mode than 32-bit mode Ian on ppc. I added a pystone entry to the table for my G5 with the Python 2.6a0 interpreter compiled with -fast -fPIC -fwrapv. I saw a reasonable speedup (35461 - 37313). Skip ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
On 20-Jan-2008, at 20:53 , [EMAIL PROTECTED] wrote: Daniel I am assuming the GIL is limiting threading and therefore I am Daniel really running on one or two cores--hence the tangible Daniel improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a Daniel bit of the memory bandwidth increase as well. The GIL doesn't enter into things here. The pystones benchmark isn't multithreaded so even if Python was free-threaded the pystones benchmark wouldn't benefit from it. Hmm, you're right. And there aren't any magic threads either (happens far too often nowadays, grmpf), I just checked that with gdb. So: any other speculations as to why 2.66Ghz-3.0Ghz gives only a 1% increase in pystones? I can't physically reach my Mac Pro for another week, but maybe someone else could try disabling three cores? If that increases the pystone number (in stead of decreasing it) this could point to a processor affinity problem in MacOSX. -- Jack Jansen, [EMAIL PROTECTED], http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
Hmm - that appears to be negligible if not within the bounds of statistical error. However, you're right - a small bump in speed. A Quick Aside: Benchmarking the diff routines on my app (Changes - http://changesapp.com/) showed a 10-15% performance increase going from 32-bit i386 to 64- bit x86-64. I'm pretty sure that this is due to vast architectural improvements in x86-64 vs. i386 (more GPRs, etc.). Unfortunately, due to bugs in 64-bit Cocoa, I can't ship a 64-bit binary. The results of benchmarking 32-bit ppc to 64-bit ppc64 showed a negligible/non- existent improvement. This app was implemented using C/C++ and ObjC. - Ian On Jan 20, 2008, at 1:16 PM, [EMAIL PROTECTED] wrote: Ian It would be interesting to see if that held up on ppc64. My guess Ian is that it would benchmark slower in 64-bit mode than 32-bit mode Ian on ppc. I added a pystone entry to the table for my G5 with the Python 2.6a0 interpreter compiled with -fast -fPIC -fwrapv. I saw a reasonable speedup (35461 - 37313). Skip ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
Jack So: any other speculations as to why 2.66Ghz-3.0Ghz gives only a 1% Jack increase in pystones? Maybe compilation flags. Skip ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
Jack, My bus is 1.33 GHz--I think the 2nd Gen Quad-cores are bumped to 1.5 GHz maybe. I'll see if there is anything I can do to bump the numbers. My system is just like yours but with a second Quad core chip that only a few apps can take advantage of. It helps me with Modo, Lightwave, Shake, Photoshop, and Final Cut Studio (which is why I got it in the first place) but not with Python and most other apps as well. Skip is right of course--the Global Interpreter Lock doesn't play here since the benchmark wasn't written to take advantage of multi-core machines--silly me I thought any good benchmark would be. In the end my error doesn't matter since, if one made the benchmark multi- threaded in the true sense of the term, the GIL would clamp down and limit the benefit anyway. Which is what I was alluding to and should have been more clear about. My point was that, as I understand it, thanks to the GIL--Python cannot easily take advantage of multi-cores period even when the program uses multiple threads--it it is a limitation of the implementation of the language interpreter. I guess that tells us we ought to write multi-core code in C/C++/ObjC instead. Either that or Python's implementation needs to embrace threading more expansively. Still Python is a great language as it is. No one language fits all-- as much as we'd like it to for simplicity's sake. Daniel On Jan 20, 2008, at 11:53 AM, Jack Jansen wrote: On 20-Jan-2008, at 19:23 , Daniel Lord wrote: I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB RAM) and was a bit surprised to see little improvement over the Core Duo numbers. 63019.7 pystones/second I am assuming the GIL is limiting threading and therefore I am really running on one or two cores--hence the tangible improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth increase as well. Interesting... My first generation quadcore at 2.6 Ghz clocks at 62578.2. So there's another limiting factor: from my machine to yours is a 15% speed bump, but only a 1% increase in pystone numbers. Somebody told me recently that MacOSX is not very good for fast task switching with multiprocessors, because apparently (his words, and possibly misrepresented by me) the implementation of semaphores sucks. This seems to corroborate that. Hmm, what is your bus speed? Mine is 1.33 Ghz, is yours that as well is it 1.5 Ghz? If the former it could be that semaphores somehow run at bus speed and semaphore overhead dwarves any processing done. If your bus runs at 1.5Ghz there must be yet another bottleneck... -- Jack Jansen, [EMAIL PROTECTED], http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pystone numbers for different Macs...
On 20 Jan, 2008, at 19:23, Daniel Lord wrote: I ran the test on my 1st Gen Quad Core ( 2 x Quad-core 3.0 GHz, 13GB RAM) and was a bit surprised to see little improvement over the Core Duo numbers. 63019.7 pystones/second I am assuming the GIL is limiting threading and therefore I am really running on one or two cores--hence the tangible improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a bit of the memory bandwidth increase as well. Pystone is completely single-threaded. Beyond that multi-threaded Python code cannot make optimal use from multiple CPU's unless most threads run C code (due to the GIL). This is the 32-bit number, I'll find some time to try 64-bit--but first want to make sure it doesn't mess up my system as I am using Apple Python 2.5.1 exclusively right now and want to avoid the split brain problem. That's easy enough: install the 64-bit version in a location that is not on your shell's search path, and don't install it as a framework. Ronald Daniel On Jan 20, 2008, at 1:27 AM, Ronald Oussoren wrote: On 19 Jan, 2008, at 21:43, [EMAIL PROTECTED] wrote: My Powerbook G4 is getting rather long-in-the-tooth. It's display is starting to act up, so I think I'm going to buy a new Mac something in the fairly near future, but I'm not yet sure what. To that end, I've started a table of pystone numbers for Macs on the Python wiki: http://wiki.python.org/moin/MacPython/MacModelPerformance If you could help by adding some rows to the table, especially for current MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd appreciate it. I've posted some numbers as well, which in itself doesn't warrent an e-mail. What is interesting though is the difference between 32-bit and 64-bit code: Python 2.5.2a0 (60124) 32-bit: 52083 64-bit: 60871 64-bit code is significantly faster here (all of this on a MacBook Pro 2.33Ghz/3GByte) Ronald Thanks, -- Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/ The major difference between Democrats and Republicans is that Republicans don't know that Randy Newman's lyrics are full of sarcasm. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig smime.p7s Description: S/MIME cryptographic signature ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig