Gary M. Josack wrote:
thanks Gary,
That's exactly what I was looking for.
cheers,
Stef
Stef Mientki wrote:
>
Is sys.argv[0] what you want?
>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
>>
>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?
That's exactly what I was looking for.
cheers,
Stef
If so, then os.path.basenam e(sys.argv[0]) is probably what you want.
>
Thanks,
Gary M. Josack
>
Thanks,
Gary M. Josack