T tristan wheeler Honorable Feb 5, 2014 48 0 10,530 Nov 30, 2015 #1 Hi everyone. I'm stuck in a python coding lesson. I need to "use the os module and an if statement to determine if a directory exists and create a directory called... Also I have to use os.path.isdir
Hi everyone. I'm stuck in a python coding lesson. I need to "use the os module and an if statement to determine if a directory exists and create a directory called... Also I have to use os.path.isdir
Solution D D dudeman509 Nov 30, 2015 import os os.path.isdir (your directory here) will return a true/false statement. To create the directory if one does not exist: if not os.path.isdir (directory here): os.makedirs(new path here)
import os os.path.isdir (your directory here) will return a true/false statement. To create the directory if one does not exist: if not os.path.isdir (directory here): os.makedirs(new path here)
D dudeman509 Dignified Jan 23, 2015 4,076 35 17,040 Nov 30, 2015 Solution #2 import os os.path.isdir (your directory here) will return a true/false statement. To create the directory if one does not exist: if not os.path.isdir (directory here): os.makedirs(new path here) Upvote 0 Downvote Solution
import os os.path.isdir (your directory here) will return a true/false statement. To create the directory if one does not exist: if not os.path.isdir (directory here): os.makedirs(new path here)