On 12/11/06, Toon Pieton <[EMAIL PROTECTED]> wrote:
> Hey friedly users!
>
> I was wondering: how can I get the directory the program is in? For example
> "C:\Python Programs\Calculator\".

>>> os.path.split.__doc__
'Split a pathname.  Returns tuple "(head, tail)" where "tail" is\n
everything after the final slash.  Either part may be empty.'

The full pathname is in sys.argv[0]
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to