Drag and dropable scripts on NT
Bill Wilkinson
yopen at my-deja.com
Sat Jun 26 16:58:36 EDT 1999
There are several ways to do this, here is one:
make a .bat file that says this:
"c:\program files\python\python.exe" c:\temp\drag.py %1
use the correct path to your python.exe. replace drag.py with your
script name.
make a shortcut on your desktop that points to your .bat file.
use sys.argv[1] to get the name of the file to be acted on.
For example, this script:
import sys
a = sys.argv[1]
print a
will return the name of the file dragged onto the icon.
Hope this helps
Bill Wilkinson
In article <376F5312.C404B9E0 at arch.sel.sony.com>,
Peter <peterb at arch.sel.sony.com> wrote:
> I'm interested in packaging up some Python code such that I can drop a
> file
> onto the script icon and have it do it's thing...
>
> I have the script working fine. Don't know where to turn to figure out
> the
> next step.
>
> Thanks -
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
More information about the Python-list
mailing list