Whenever I call os.path.exists(variable) it will return false but if I call os.path.exists('/this/is/my/path') it will return true.
import os
import sys
test = None
print("Test directory")
test= sys.stdin.readline()
test.strip('\n')
print(os.path.exists(test))
I know that os.path.exists can return false if there is a permissions error but the directories I reference have no restrictions. Sometimes my paths have spaces in them. I have tries passing the path as both '/this\ is/my/path' and '/this is/my/path with the same results.