Gary M. Josack wrote:
Stef Mientki wrote:
hello,
for a general debug routine,
written in some module.
I want to write the information to a file,
with name derived from the main python file.
Is it possible to get the name of the python script started first ?
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
Is sys.argv[0] what you want?
thanks Gary,
That's exactly what I was looking for.
cheers,
Stef
If so, then os.path.basename(sys.argv[0]) is probably what you want.
Thanks,
Gary M. Josack
--
http://mail.python.org/mailman/listinfo/python-list