Toon Pieton wrote: > Hey friedly users! > > I was wondering: how can I get the directory the program is in? For example > "C:\Python Programs\Calculator\". > > Thanks in advance for reading, > Toon Pieton >
Slightly hackish and nasty, but seems to do the trick. Someone'll probably suggest a better way, this is just the first thing I could come up with: from os.path import abspath from sys import argv print abspath(argv[0]) _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor