Skip to content

Commit 7480882

Browse files
committed
Script to check users home directory, if the directory does not exist then create it under there
1 parent 8675659 commit 7480882

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

create_dir_if_not_there.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import os
2+
home=os.path.expanduser("~")
3+
print home
4+
if not os.path.exists(home+'/testdir'):
5+
os.makedirs(home+'/testdir')

0 commit comments

Comments
 (0)