[Pythonmac-SIG] droplet?
Anthony M. Ingraldi
A.M.INGRALDI@larc.nasa.gov
Fri, 26 Nov 1999 08:22:53 -0500
On 11/25/99 8:50 PM, Dante wrote:
> I'm new to Python and looking for a way to get the path of a file I
> drop on to my python applet.
The file paths of dropped files are available to droplets in sys.argv. Try
this:
import sys
# the first arg will be the path to the droplet itself.
for arg in sys.argv:
print arg
# this is just to keep the console from going away.
sys.stdin.readline()
--
Tony Ingraldi
A.M.INGRALDI@LaRC.NASA.GOV
Phone : (757) 864-3039
Fax : (757) 864-7892