current path in os.path, py code example
Example 1: get path to current directory python
import os
os.path.abspath(os.getcwd())
Example 2: python get path of current file
import pathlib
pathlib.Path(__file__).parent.absolute()
import os
os.path.abspath(os.getcwd())
import pathlib
pathlib.Path(__file__).parent.absolute()