ChinaUnix.net
相关文章推荐:

python ConfigParser 教學

抱歉這問題好像不太好不過我真的想知道 重點在模組運用嗎? 謝謝 [ 本帖最后由 shihyu 于 2007-4-10 11:43 编辑 ]

by shihyu - Python - 2007-04-10 12:03:43 阅读(2178) 回复(2)

相关讨论

python模块之configparser: 用python解析配置文件   在程序中使用配置文件来灵活的配置一些参数是一件很常见的事情,配置文件的解析并不复杂,在python里更是如此,在官方发布的库中就包含有做这件事情的库,那就是configparser,这里简单的做一些介绍。 configparser解析的配置文件的格式比较象ini的配置文件格式,就是文件中由多个section构成,每个section下又有多个配置项,比如: [db] db_host=127.0.0.1 db_port=33...

by lvxinzhi - Python文档中心 - 2008-02-04 15:13:04 阅读(1342) 回复(0)

scp = configparser.Safeconfigparser() # 配置文件分析对象 print("Debug--",fpCtrlFile, scp) scp.readfp(fpCtrlFile) #这一句一直报错,也不说为什么错了!郁闷 会的帮忙看一下吧。

by yangguosdxl - Python - 2009-04-28 17:21:28 阅读(1478) 回复(0)

刚开始学习还不太明白,谁Komodo-IDE-5.0.1 python日常用法?相关资料

by simon-zzm - Python - 2012-07-20 13:24:27 阅读(2338) 回复(1)

这个模块对要解析的配置文件的格式用求很严格. 1、配置文件格式细节: ·每行第一个字符不能是空白符; ·最好只用等号与冒号表示变量 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/72494/showart_1913802.html

by yangguosdxl - Python文档中心 - 2009-04-29 09:21:57 阅读(1553) 回复(0)

取自python 标准库附带示例代码,并且做了一些修改: [code] import configparser import sys config = configparser.configparser()# set a number of parameters config.add_section("book") config.set("book", "title", "the python standard library") config.set("book", "author", "fredrik lundh") config.add_section("ematter") config.set("ematter", "pages", 250)# write to screen config.add_section("ematter123")...

by converse - Python - 2009-11-22 09:40:32 阅读(3663) 回复(4)

configparser.py的第243和244行 [code] if '__name__' in opts: del opts['__name__'] [/code] 为什么必须删掉opts['__name__']呢?留着有啥坏处? 小问题,只是想不通为什么要这样。有人了解吗。

by 3751 - Python - 2006-03-16 08:28:10 阅读(1578) 回复(1)

好好学python,以后要养家吃饭的!!! 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/89259/showart_1885773.html

by mzlinux - Python文档中心 - 2009-03-31 11:10:31 阅读(1371) 回复(0)

www.okpython.com python中国 这里有

by xieaotian - Python - 2009-01-10 12:53:11 阅读(1629) 回复(0)

在系统管理技术手册(第二版)说得很清楚了,perl\python都是不错的啊,学哪个都一样,只要够用就行了,菜鸟学python算了,刚好本站里面又推荐了一本<python核心编程>所以说最好是根据现有的资料学,可能会更顺利些。

by yizuwei520 - C/C++ - 2008-11-24 02:06:34 阅读(1743) 回复(3)

matrix processing for python: NumPy and SciPy. optimized tools: NumPy 方括号[...]定义一个列表,圆括号(...)定义一个元组,花括号{...}定义一个字典: a = [ 1, 3.4, 'hello' ] # A list b = ( 10, 20, 30 ) # A tuple c = { 'a': 3, 'b':42 } # A dictionary 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/17420/showart_492068.html

by ariesjzj - Python文档中心 - 2008-03-08 17:35:52 阅读(1389) 回复(0)