Re: [Pythonmac-SIG] controlling iTunes with appscript

2006-12-04 Thread Craig Amundsen
Hi - On Fri, Dec 01, 2006 at 07:45:38PM -0800, Craig Amundsen wrote: > >>> t.location.set(f) Yeah, you can't do this. If you look in the dictionary (for example, opening it in Script Editor), you'll see: location (alias, r/o) : the location of the file represented by th

Re: [Pythonmac-SIG] controlling iTunes with appscript

2006-12-01 Thread Craig Amundsen
Hi - I finally had time to play around with appscript, and can now get the list of tracks. For reasons I don't understand, if I try to get all the file_tracks in the library, iTunes shoots up to about 80% CPU utilization and never comes back, even if I set the timeout to 15 minutes. But if I put a

Re: [Pythonmac-SIG] controlling iTunes with appscript

2006-11-28 Thread Craig Amundsen
Hi - I've had an iTunes appscript question nagging at me, so I'll add another question... I've moved a bunch of my files around and rather than do the 1 at a time showing iTunes the new location, I'd like to use appscript to set the location of the moved songs to the new value. Based on my read

Re: [Pythonmac-SIG] MySQLdb Lib Help

2006-01-16 Thread Craig Amundsen
Hi - > >>> import MySQLdb > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named MySQLdb What is the output from ls /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/ That's where you should find the MySQLdb directory if it got

Re: [Pythonmac-SIG] inputing multi-digit numbers

2005-11-10 Thread Craig Amundsen
Hi - > > Thank you. That gives me something closer to a list, but the output is now: > > ['939\n', '936\n', '937\n', '885\n', '886\n', '887\n', '171\n', '19\n', ...] You could do: inf = open(fileName) numbers = inf.read().splitlines() splitlines() is smarter than readlines() - Craig _

Re: [Pythonmac-SIG] Python 2.4.1 not replacing earlier versions.

2005-08-31 Thread Craig Amundsen
Hi - > Or I can just invoke the /usr/local/bin version explicitly, yes? Seems > to work... > > How do I specify that in a shebang line? I tried "#!/usr/local/bin > python", but I got a "bad interpreter: Permission denied" error > message. Did you mean #! /usr/local/bin/python or

Re: [Pythonmac-SIG] Python 2.4.1 not replacing earlier versions.

2005-08-30 Thread Craig Amundsen
Hi - On 8/30/05, Simon Brunning <[EMAIL PROTECTED]> wrote: > I think that may be something to do with the fact that the original > version of Python that came with the machine is still 'in charge'. > Starting Python on the command line gives me version 2.3.5 - and when > I installed appscript, it

Re: [Pythonmac-SIG] building rpy

2005-07-10 Thread Craig Amundsen
Hi - I've built R and rpy on a couple of Macs using a bashed together combination of the instructions in http://rpy.sourceforge.net/faq.html and http://www.economia.unimi.it/R/RMACOSX-FAQ.html The key bit is that R needs to be built as a shared library. >From the rpy FAQ: ./configure --enable

Re: [Pythonmac-SIG] building non-Framework Python 2.4.1 on Tiger

2005-05-04 Thread Craig Amundsen
Hi - > However, I suppose that a straight build > from the Python sources will yield just what you want, it's probably > the Framework build that requires special action. That is correct. I built 2.4 from source and had to do a bit of command-line jiggling to get the Framework build instead of th