how to get directory of python package using console code example Example: python how to get directory of script import os print(os.path.abspath(''))