摘要: import os'''os:包含了普遍的操作系统的功能'''#获取操作系统类型 nt->windows posix->Linux、Unix或Mac OS Xprint(os.name)#打印操作系统详细的信息(windows不支持)#print(os.uname())'''posix.uname_ 阅读全文
posted @ 2020-02-06 17:20 i勤能补拙 阅读(295) 评论(0) 推荐(0) 编辑
摘要: import pickle #数据持久性模块myList = (1,2,3,4,5,"sunck is a good man")path = r"C:\Users\xlg\Desktop\Python-1704\day08\1-文件读写\file6.txt"f = open(path, "wb")p 阅读全文
posted @ 2020-02-06 17:15 i勤能补拙 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #编码path = r"C:\Users\xlg\Desktop\Python-1704\day08\1-文件读写\file5.txt"with open(path, "wb") as f1: str = "sunck is a good man凯" f1.write(str.encode("utf 阅读全文
posted @ 2020-02-06 17:13 i勤能补拙 阅读(203) 评论(0) 推荐(0) 编辑
摘要: import timepath = r"C:\Users\xlg\Desktop\Python-1704\day08\1-文件读写\file2.txt"f = open(path, "a")#写文件#1、将信息写入缓冲区f.write("sunck in")#2、刷新缓冲区#直接把内部缓冲区的数据立 阅读全文
posted @ 2020-02-06 16:40 i勤能补拙 阅读(226) 评论(0) 推荐(0) 编辑