Function to retrieve running script
Mike Meyer
mwm at mired.org
Sat Dec 3 23:51:38 EST 2005
"Harlin Seritt" <harlinseritt at yahoo.com> writes:
> Is there a function that allows one to get the name of the same script
> running returned as a string?
The questions a little ambiguous, but one answer might be:
import sys
myname = sys.argv[0]
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list
mailing list