Re: [Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread Bob Ippolito
On Jan 18, 2006, at 9:10 PM, David Warde-Farley wrote: > > On 18-Jan-06, at 2:55 PM, Bob Ippolito wrote: > >> It's fine, unless you want to create redistributable applications. >> If you build an app with a vendor Python, it will only reliably work >> on that version of the OS. Future versions o

Re: [Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread David Warde-Farley
On 18-Jan-06, at 2:55 PM, Bob Ippolito wrote: > It's fine, unless you want to create redistributable applications. > If you build an app with a vendor Python, it will only reliably work > on that version of the OS. Future versions of Mac OS X will > absolutely throw away Python 2.3 for Python 2.

Re: [Pythonmac-SIG] Resource forks and HFS-metadata

2006-01-18 Thread Bob Ippolito
The popen call in the below example is bad -- don't use that, it will totally explode if either path has spaces in it. You want to use the subprocess module instead. It comes with Python 2.4, but you can just copy subprocess.py over if you're using Python 2.3. The subprocess module avoid

Re: [Pythonmac-SIG] Resource forks and HFS-metadata

2006-01-18 Thread Dimi Shahbaz
Yes, I think I'm going to have to do this. One question though, since you are using an external process to fix the metadata anyway, why not just use ditto again to unzip, so you could avoid the extra unzip step? -Dimi On Jan 18, 2006, at 8:40 AM, Charles Chandler wrote: > I use ditto to cr

Re: [Pythonmac-SIG] Building extensions on 10.4 that can be used on 10.3?

2006-01-18 Thread Ronald Oussoren
On 17-jan-2006, at 22:13, Russell E. Owen wrote: > Are there any tips or tricks to building 3rd party python > extensions on > MacOS X 10.4 in such a way that 10.3 users can use them? Building them on 10.3 is the easiest way to get 10.3 compatible extensions. You'll have to test them on 10.3

Re: [Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread Bob Ippolito
On Jan 18, 2006, at 11:25 AM, Russell E. Owen wrote: > In article > <[EMAIL PROTECTED]>, > Chris Porter <[EMAIL PROTECTED]> wrote: > >> Hello, complete python newbie here. >> >> I've got: >> >> OSX 10.4.3 >> Python 2.3.5 >> MySQL 4.1.15-standard >> (of course, all pre-installed, except for MySQL

Re: [Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread Bob Ippolito
On Jan 18, 2006, at 11:28 AM, Russell E. Owen wrote: > In article <[EMAIL PROTECTED]>, > David Warde-Farley <[EMAIL PROTECTED]> wrote: > >> ... >> The MySQLdb module doesn't come standard. And seeing as how I can't >> get it to build properly with Apple's Python (and Apple's Python is >> kind of

Re: [Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, David Warde-Farley <[EMAIL PROTECTED]> wrote: >... > The MySQLdb module doesn't come standard. And seeing as how I can't > get it to build properly with Apple's Python (and Apple's Python is > kind of icky anyway), here's the rundown: > > Firstly, you'll proba

Re: [Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Chris Porter <[EMAIL PROTECTED]> wrote: > Hello, complete python newbie here. > > I've got: > > OSX 10.4.3 > Python 2.3.5 > MySQL 4.1.15-standard > (of course, all pre-installed, except for MySQL) > > I don't seem to have the right python module that will allow

Re: [Pythonmac-SIG] Building multiple command-line( ( CLI ) programs with py2app

2006-01-18 Thread Christopher Barker
Bob Ippolito wrote: >>I'd like to be able to install a complete Python >>distribution that has all the packages my apps need, all in one >>bundle. >>Does anyone else think this would be useful? > > Not really... this would require an installer, so you might as well > use a regular Python di

Re: [Pythonmac-SIG] Resource forks and HFS-metadata

2006-01-18 Thread Charles Chandler
I use ditto to create zips... openObj = popen2.Popen4('ditto -c -k --keepParent -sequesterRsrc ' + sourceFolderName + ' ' + targetZipName) ...then the zipfile method to unzip the files... data = theZipFile.read(relPathAndFileName) outfile = open(fullTargetName, "wb") outfile.write(data) outfile.

Re: [Pythonmac-SIG] Building multiple command-line( ( CLI ) programs with py2app

2006-01-18 Thread Read Roberts
One good reason for a stand-alone Python is when the distribution contains third=-party extension modules, which are of necessity bound to a particular version of Python, and the interval between updates is likely to be several years. However, the need can be met with a py2app program which just

Re: [Pythonmac-SIG] Resource forks and HFS-metadata

2006-01-18 Thread Henning Hraban Ramm
Am 2006-01-18 um 02:01 schrieb Dimi Shahbaz: > My program deals with zip transferring archives. I'm curious as to > whether Python (namely the 'zip' and 'zipfile') modules can be made > to be aware of resource forks and HFS-metadata? Or is this a > limitation of the zip format itself? According

Re: [Pythonmac-SIG] appscript: selecting many songs in iTunes

2006-01-18 Thread Niko Matsakis
> Still sounds very slow. What OS & iTunes versions; how big's the > playlist and what % is duplicates? I mocked up a 550-item playlist > containing 500 duplicates and my script took 50 secs to get through > that (iTunes 6.0.1; OS 10.4.3); 10 secs if I close the playlist > window first so i

Re: [Pythonmac-SIG] appscript: selecting many songs in iTunes

2006-01-18 Thread has
Niko Matsakis wrote: >>Well, I'll benchmark the two approaches against my full library and >>report back on the results :). The question is whether having more >>AppleEvents will be slower than selecting way too much data. >> > >Neither is stupendously fast; the bottleneck is definitely issuing t

Re: [Pythonmac-SIG] appscript: selecting many songs in iTunes

2006-01-18 Thread Niko Matsakis
> Well, I'll benchmark the two approaches against my full library and > report back on the results :). The question is whether having more > AppleEvents will be slower than selecting way too much data. > Neither is stupendously fast; the bottleneck is definitely issuing the individual delete co

Re: [Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread David Warde-Farley
On 16-Jan-06, at 11:44 AM, Chris Porter wrote: > Hello, complete python newbie here. > > I've got: > > OSX 10.4.3 > Python 2.3.5 > MySQL 4.1.15-standard > (of course, all pre-installed, except for MySQL) > > I don't seem to have the right python module that will allow python > to interact with m

[Pythonmac-SIG] MySQLdb lib help

2006-01-18 Thread Chris Porter
Hello, complete python newbie here. I've got: OSX 10.4.3 Python 2.3.5 MySQL 4.1.15-standard (of course, all pre-installed, except for MySQL) I don't seem to have the right python module that will allow python to interact with my MySQL databases. I am completely not a programmer, but I can fol