how to locate folder that a pytgon scripts is executing from code example
Example: python reference script directory
>>> import os
>>> print(os.path.dirname(os.path.realpath(__file__)))
C:\File\Location # Does not contain filename
>>> import os
>>> print(os.path.dirname(os.path.realpath(__file__)))
C:\File\Location # Does not contain filename