摘要: import subprocessret = subprocess.call(['ls', '-l'])print(ret) #执行成功返回0try: ret = subprocess.check_call(['mv', './ab ./cd']) print(ret)except subproce 阅读全文
posted @ 2020-02-12 18:07 眼镜儿 阅读(414) 评论(0) 推荐(0) 编辑
摘要: from optparse import OptionParseroptParser = OptionParser()optParser.add_option('-f', '--file', action='store', type='string', dest='filename')optPars 阅读全文
posted @ 2020-02-12 17:31 眼镜儿 阅读(2344) 评论(0) 推荐(0) 编辑