摘要: with如何工作? 阅读全文
posted @ 2018-03-06 16:37 foreverlove~ 阅读(173) 评论(0) 推荐(0) 编辑
摘要: python os.path模块常用方法详解 os.path模块主要用于文件的属性获取,在编程中经常用到,以下是该模块的几种常用方法。更多的方法可以去查看官方文档:http://docs.python.org/library/os.path.html 1.os.path.abspath(path)  阅读全文
posted @ 2018-03-06 16:03 foreverlove~ 阅读(115) 评论(0) 推荐(0) 编辑
摘要: os.popen() 功能强于os.system() , os.popen() 可以返回回显的内容,以文件描述符返回。举例: print os.popen("ping 172.17.0.1").read() 输出打印: 阅读全文
posted @ 2018-03-06 15:18 foreverlove~ 阅读(439) 评论(0) 推荐(0) 编辑