I am trying to design a block of code that checks if a user inputted directory exists, prints if it does, and if it does not.
import os
foldername = raw_input ("Please enter the name of your desired folder: ")
if os.path.exists(foldername):
print "Yes, your folder exists!"
else:
print "Please re-enter your folder directory as it does not exist."
The abov is what I have, but it consistently outputs that the directory does not exists, despite me knowing that it does.
Insights?