Re: [Tutor] droplet like behaviour in Python

2009-08-10 Thread Alan Gauld
"pedro" wrote Well I made a script called droplet.py which looks like this: #!/usr/bin/env python # encoding: utf-8 import sys theFilePath = sys.argv[1] print theFilePath But when I try to drop something on it nothing happens. Sorry I guess there is something fundamental that I am missing.

Re: [Tutor] droplet like behaviour in Python

2009-08-10 Thread Wayne
On Mon, Aug 10, 2009 at 2:52 AM, Alan Gauld wrote: > "pedro" wrote > >> Well I made a script called droplet.py which looks like this: >> >> #!/usr/bin/env python >> # encoding: utf-8 >> import sys >> theFilePath = sys.argv[1] >> print theFilePath >> >> >> But when I try to drop something on it no

Re: [Tutor] droplet like behaviour in Python

2009-08-10 Thread bob gailer
Alan Gauld wrote: "pedro" wrote Well I made a script called droplet.py which looks like this: #!/usr/bin/env python # encoding: utf-8 import sys theFilePath = sys.argv[1] print theFilePath But when I try to drop something on it nothing happens. Sorry I guess there is something fundamental t

[Tutor] MySQLdb field type

2009-08-10 Thread Rick Pasotto
After executing a query that returns values, cursor.description contains a list of tuples, one tuple for each field. Each tuple has seven values consisting of (name,type_code,display_size,internal_size,precision,scale,null_ok). Where can I find a listing of what the various type_codes are? Do I n

Re: [Tutor] MySQLdb field type

2009-08-10 Thread Kent Johnson
On Mon, Aug 10, 2009 at 1:08 PM, Rick Pasotto wrote: > After executing a query that returns values, cursor.description contains > a list of tuples, one tuple for each field. Each tuple has seven values > consisting of > (name,type_code,display_size,internal_size,precision,scale,null_ok). > > Where

Re: [Tutor] MySQLdb field type

2009-08-10 Thread Rick Pasotto
On Mon, Aug 10, 2009 at 02:50:01PM -0400, Kent Johnson wrote: > On Mon, Aug 10, 2009 at 1:08 PM, Rick Pasotto wrote: > > After executing a query that returns values, cursor.description contains > > a list of tuples, one tuple for each field. Each tuple has seven values > > consisting of > > (name,

[Tutor] Tutorial update

2009-08-10 Thread Alan Gauld
Just a note to say that the v3.1 version of my tutor has reached another milestone. I just uploaded the last topic in the Basics section which means the tutorial is now sufficiently complete that it could be used by a beginner to learn V3 Python. It hasn't had enough traffic to call it good qu

Re: [Tutor] Tutorial update

2009-08-10 Thread Alan Gauld
"Alan Gauld" wrote I just uploaded the last topic in the Basics section which means the tutorial is now sufficiently complete that it could be used by a beginner to learn V3 Python. And the v3 url is, of course: -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/

[Tutor] Fixing "nearly ASCII" data file?

2009-08-10 Thread Allen Fowler
Hello, I have some CSV data from Office / OpenOffice in "nearly ASCII" format. This is just basic text but it it stored as UTF-8, and has curly quotes, etc. Is there a way to easily read the file as ASCII by forcing these to the standard ASCII equivalents? Thank you ___

Re: [Tutor] Fixing "nearly ASCII" data file?

2009-08-10 Thread John Krukoff
On Mon, 2009-08-10 at 15:34 -0700, Allen Fowler wrote: > Hello, > > I have some CSV data from Office / OpenOffice in "nearly ASCII" format. This > is just basic text but it it stored as UTF-8, and has curly quotes, etc. > > Is there a way to easily read the file as ASCII by forcing these to the

Re: [Tutor] Fixing "nearly ASCII" data file?

2009-08-10 Thread Alan Gauld
"Allen Fowler" wrote I have some CSV data from Office / OpenOffice in "nearly ASCII" format. This is just basic text but it it stored as UTF-8, and has curly quotes, etc. Is there a way to easily read the file as ASCII by forcing these to the standard ASCII equivalents? You should be abl

Re: [Tutor] MySQLdb field type

2009-08-10 Thread Kent Johnson
On Mon, Aug 10, 2009 at 3:52 PM, Rick Pasotto wrote: > Not exactly what I'm looking for. > > The type_code in the tuple is a number. For one of my tables I see the > following numbers: 1, 2, 10, 252, 253, 254. What I wanted was a listing > telling me which number was which type_code. Ah, right. I

Re: [Tutor] monitor number of files in a folder

2009-08-10 Thread Jeff Younker
On Aug 7, 2009, at 9:29 AM, pedro wrote: On my machine (a Mac), os.listdir does include files that begin with "." Having the while loop timeout after 10 or 20 times through as was suggested a couple posts back will work fine for my particular situation. Thanks Yes, it does include files

Re: [Tutor] droplet like behaviour in Python

2009-08-10 Thread Dave Angel
bob gailer wrote: Alan Gauld wrote: "pedro" wrote Well I made a script called droplet.py which looks like this: #!/usr/bin/env python # encoding: utf-8 import sys theFilePath = sys.argv[1] print theFilePath But when I try to drop something on it nothing happens. Sorry I guess there is some

Re: [Tutor] droplet like behaviour in Python

2009-08-10 Thread pedro
On 2009-08-10 22:40:14 -0400, Dave Angel said: bob gailer wrote: Alan Gauld wrote: "pedro" wrote Well I made a script called droplet.py which looks like this: #!/usr/bin/env python # encoding: utf-8 import sys theFilePath = sys.argv[1] print theFilePath But when I try to drop something o

[Tutor] run python script on another computer's terminal (LAN)

2009-08-10 Thread pedro
Hi, does anyone know how to send a command that is within a python script to another computer's terminal. This is what it looks like in Applescript. tell application "Terminal" of machine "eppc://USERNAME:passw...@computer2.local" do script "ls"