![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
Purple_dandelion
这个作者很懒,什么都没留下…
展开
-
python-获取当前工作路径
sys.argv[0]import sysprint sys.argv[0]#获得的是当前执行脚本的位置(若在命令行执行的该命令,则为空)运行结果(在python脚本中执行的结果): F:/SEG/myResearch/myProject_2/test.pyos模块import osprint os.getcwd()#获得当前工作目录print os.path.abspath('.')#获原创 2017-01-03 08:53:06 · 103515 阅读 · 2 评论 -
[python]在ubuntu下使用matplotlib绘图---问题
ImportError: No module named _tkinter, please install the python-tk package解决: 1.使用pip不行,找不到包 2.使用apt-get install python-tk原创 2017-04-20 16:13:02 · 2252 阅读 · 0 评论 -
ElementTree
来源:https://docs.python.org/2/library/xml.etree.elementtree.html19.7. xml.etree.ElementTree — The ElementTree XML API¶New in version 2.5.Source code: Lib/xml/etree/ElementTree.pyThe Element type is a f转载 2017-04-25 18:59:20 · 614 阅读 · 0 评论 -
【python】ConfigParser---读写配置文件
转发自:http://www.cnblogs.com/victorwu/p/5762931.htmlPython 标准库的 ConfigParser 模块提供一套 API 来读取和操作配置文件。 配置文件的格式a) 配置文件中包含一个或多个 section, 每个 section 有自己的 option;b) section 用 [sect_name] 表示,每个option是一个键值对,使转载 2017-04-26 18:35:55 · 353 阅读 · 0 评论