摘要: f = open(r"E:\workspace\test\test2\tttttt.txt","w+")print(f.tell()) #告诉我们当前位置f.write("test line 1\n") #13个字节 \n算2个f.flush() #刷新文件内部缓冲区,让文件直接写入print(f. 阅读全文
posted @ 2019-05-06 09:51 不不田鼠 阅读(509) 评论(0) 推荐(0) 编辑
摘要: path = r"E:\workspace\test\test2\tttttt.txt"path1 = "d:" 1.os.getcwd print(os.getcwd())#当前路径 2.os.listdirprint(os.listdir()) #列出路径下的文件,默认是当前路径print(os 阅读全文
posted @ 2019-05-06 09:29 不不田鼠 阅读(117) 评论(0) 推荐(0) 编辑