Sep-20-2020, 01:31 AM
What kind of object are you passing into the function?
os.path.exists() should have no problems with files outside your current directory.
os.path.exists() should have no problems with files outside your current directory.
>>> import os >>> os.path.exists("/var/tmp") True >>> os.path.exists("/etc/fstab") True