摘要:        
本文最初发表于恋花蝶的博客(http://blog.csdn.net/lanphaday),欢迎转载,但必须保留此声明且不得用于商业目的。谢谢。引子我热情地邀请大家猜测下面这段程序的输出:class A(object):def __init__(self):self.__private()self.public()def __private(self):print 'A.__private()'def public(self):print 'A.public()'class B(A):def __private(self):print 'B.__priv    阅读全文
posted @ 2012-09-10 17:23
balaamwe
阅读(215)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1.读取配置文件-read(filename)直接读取ini文件内容-sections()得到所有的section,并以列表的形式返回-options(section)得到该section的所有option-items(section)得到该section的所有键值对-get(section,option)得到section中option的值,返回为string类型-getint(section,option)得到section中option的值,返回为int类型2.写入配置文件-add_section(section)添加一个新的section-set( section, option, v    阅读全文
posted @ 2012-09-10 17:08
balaamwe
阅读(227)
评论(0)
推荐(0)
        
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号