Riju21

20_os_basic

Mar 29th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. # os
  2. import os
  3.  
  4. # current dir
  5. #-----------------
  6. # print(os.getcwd())
  7.  
  8. # change dir
  9. # -----------------
  10. # chdir('path')
  11.  
  12. # make dir with sublevel
  13. # ---------------------------
  14. # print(os.makedirs('advance'))
  15.  
  16. # make dir without sublevel
  17. # mkdir()
  18.  
  19. # remove dir
  20. # --------------
  21. #  rmdir()
  22.  
  23. # remove dir wit sublevel
  24. # --------------
  25. #  rmdirs()
  26.  
  27. # all files & folders
  28. # ---------------------
  29. # print(os.listdir())
Advertisement
Add Comment
Please, Sign In to add comment