Skip to content

Commit da6ca18

Browse files
authored
Simple changes made in code
simple changes mad in code for user interaction via terminal
1 parent c1f6d15 commit da6ca18

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dir_test.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
# Description : Tests to see if the directory testdir exists, if not it will create the directory for you
99

1010
import os # Import the OS module
11-
12-
if not os.path.exists('testdir'): # Check to see if it exists
13-
os.makedirs('testdir') # Create the directory
11+
DirCheck = raw_input("Please enter directory name to check : ")
12+
print
13+
print "There was no directory under the name " +DirCheck
14+
print
15+
print "So, a new directory under the name " +DirCheck + " has been created!"
16+
if not os.path.exists(DirCheck): # Check to see if it exists
17+
os.makedirs(DirCheck) # Create the directory

0 commit comments

Comments
 (0)