[Tutor] Getting the directory the program is in
greenbergj at wit.edu
Mon Dec 11 18:19:41 CET 2006
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
from os.path import abspath
from sys import argv
More information about the Tutor