摘要:
# import collections import os def readFile(file,modle): #判断文件是否存在 if os.path.exists(file) : bf = open(file,modle) res = bf.read() bf.close() return r 阅读全文
posted @ 2017-12-06 17:58
上官_延
阅读(129)
评论(0)
推荐(1)
摘要:
使用flag标识符,跳出外层循环 阅读全文
posted @ 2017-12-06 17:36
上官_延
阅读(131)
评论(0)
推荐(1)
摘要:
sys模块 sys.path():打印python的环境变量 sys.avgs():打印当前文件,所在位置(相对位置) 需要注意的是,import sys模块的时候,自己的文件名不能和模块名一样,要不python默认就是找当前目录下的自己的这个文件了 os模块 os.popen():接受输入的命令: 阅读全文
posted @ 2017-12-06 16:46
上官_延
阅读(167)
评论(0)
推荐(0)

浙公网安备 33010602011771号