Michael Malinowski schrieb:
> Is there a way to read the directory that the currently running python file
> is located in?
Hi Mike!
To get the started program:
sys.argv[0]
Don“t use ``os.curdir``.
To get the filename, of the current module:
__file__
To get the directory:
os.path.split(sys.argv[0])[0]
os.path.split(__file__)[0]
Regards,
Gerold
:-)
--
________________________________________________________________________
Gerold Penz - bcom - Programmierung
[EMAIL PROTECTED] | http://gerold.bcom.at | http://sw3.at
Ehrliche, herzliche Begeisterung ist einer der
wirksamsten Erfolgsfaktoren. Dale Carnegie
--
http://mail.python.org/mailman/listinfo/python-list