python how to get script directory

32

>>> import os
>>> print(os.path.dirname(os.path.realpath(__file__))) 
C:\File\Location # Does not contain filename

Comments

Submit
0 Comments