No activity today, make something!
Simplest Python python file

20141124020813 guodepei  

python file

  • create:
open(file, mode='r', buffering=-1, encoding=None, errors=None,
    newline=None, closefd=True) 
  • write
with open('spam.txt', 'w') as file:
    file.write('Spam and eggs!')
  • read: read()
  • close: close()
  • delete: os.remove(path)
  • copy:
    • shutil.copy(src, dst)
    • os.rename(ff, fd)"
  • attr: os.stat(path)