In this tutorial, we will introduce how to get the absolute path of current python script, it is very useful for you when you are operating files. You can get pathes of other files based on it.
Get the absolute path of current python script
absolute_path = os.getcwd() print('your script is located at "' + absolute_path + '"')
The absolute path is:
your script is located at "E:\workspace-nlp\Example"
Then if you want to get directory, file name and file extension, you can read this tutorial.