Advertisement
Guest User

Untitled

a guest
May 28th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import os
  2. import datetime
  3. print("Importing Files...")
  4. print("DevDiary Under Operation...")
  5. print("""Select your Operation
  6. 1.) Read Diary
  7. 2.) Write Today's Diary
  8. 3.) Exit
  9.  
  10. """)
  11. curdir = os.getcwd()
  12. curdir = str(curdir)
  13. option = input("> ")
  14. if option == '1':
  15. print("Select the file to open from the diary")
  16. list = []
  17. list = str(os.listdir(".data/"))
  18. for i in list:
  19. print(list[i])
  20. print(mainDir)
  21. selFile = input("> ")
  22. direc = ".data/%s.txt" % selFile
  23. fileOpen = open(direc,'r')
  24. dat = fileOpen.read()
  25. print(dat)
  26. fileOpen.close()
  27. elif option == '2':
  28. print("Writing")
  29. else:
  30. exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement