[Tutor] droplet like behaviour in Python

Alan Gauld alan.gauld at btinternet.com
Sun Aug 9 01:34:44 CEST 2009


"pedro" <pedrooconnell at gmail.com> wrote 


> is one thing I am not really sure how to do. I want to be able to drop 
> a file onto a python script (or app I guess) and have the python script 
> use the path to the file that was dropped on it as sys.argv[1]

I may be wrong but I thought that, provided you had the path and 
shebang etc set up properly that it just happened. Have you tried 
a simpe script that just prints argv say?


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list