To get current directory as a variable in your running script, you need to use
__file__ constant. Please check the code snippet below:
import os cur_path = os.path.dirname( os.path.realpath(__file__) )
In this snippet;
realpath gets full path to the file with symbolic links removed. Afterwards,
dirname function extracts directory portion from full file name.
You can check python os.path documentation for further details.