Re: Is it possible to get the name of an application ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stef Mientki

    #1

    Re: Is it possible to get the name of an application ?

    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.basenam e(sys.argv[0]) is probably what you want.
    >
    Thanks,
    Gary M. Josack
Working...