getting the script name

Henk Henk
Wed Oct 9 05:41:51 EDT 2002


On Wed, 09 Oct 2002 09:28:17 GMT, Padraig Brady <Padraig at Linux.ie>
wrote:

>Henk wrote:
>> Hi,
>> 
>> Is there any way to retrieve the name of the running script from
>> within this running script?
>
>import sys
>sys.argv[0]

Thanks,

However, I need to refine my question: my script is launched from
within a C++ app (using IActiveScriptingEngine and that kind of
stuff). Using your solution gives me the exe, not the script name. Any
idea?

Henk

>




More information about the Python-list mailing list