To know the complete path to current file use the os module.
For example
>>> import os >>> print(os.path.realpath(__file__)) /home/ayush/qna/path.py
To know the complete path to current file use the os module.
>>> import os >>> print(os.path.realpath(__file__)) /home/ayush/qna/path.py