![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
RJxiaowu
这个作者很懒,什么都没留下…
展开
-
python 调用系统命令并获得标准输出,错误输出
转自: http://reader.youdao.com/sharelite?itemId=-447170961514257704&method=viewSharedItemThroughLink&sharedBy=-1137845767117085734 import subprocesscmd_res = {}res = subprocess.Popen(cmd,shell...原创 2012-11-27 15:48:22 · 1240 阅读 · 0 评论 -
python文件操作
#获取当前文件的全路径 os.path.realpath(__file__) #获取当前文件所在目录和文件名 realpath = os.path.realpath(__file__) #pwd是目录,fileName是文件名 [pwd, fileName] = os.path.split(realpath) ...2012-11-29 18:11:47 · 98 阅读 · 0 评论