Python 文件目錄操做

# -*- coding:utf-8 -*- import os print os.name #系統環境變量 print os.environ #當前目錄 print os.getcwd() #當前目錄內容 print os.listdir('.') #刪除文件 #os.remove('file.txt') #建立目錄(1級) #os.mkdir('a') dirpath = 'a/b' if
相關文章
相關標籤/搜索