本文整理汇总了Python中puddlestuff.puddleobjects.PuddleConfig.setSection方法的典型用法代码示例。如果您正苦于以下问题:Python PuddleConfig.setSection方法的具体用法?Python PuddleConfig.setSection怎么用?Python PuddleConfig.setSection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类puddlestuff.puddleobjects.PuddleConfig
的用法示例。
在下文中一共展示了PuddleConfig.setSection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: applySettings
# 需要导入模块: from puddlestuff.puddleobjects import PuddleConfig [as 别名]
# 或者: from puddlestuff.puddleobjects.PuddleConfig import setSection [as 别名]
def applySettings(self, control=None):
def checktoint(checkbox):
if checkbox.checkState() == Qt.Checked:
return 1
else:
return 0
cparser = PuddleConfig()
cparser.setSection('playlist', 'extinfo', checktoint(self.extinfo))
cparser.setSection('playlist', 'extpattern', unicode(self.extpattern.text()))
cparser.setSection('playlist', 'reldir', checktoint(self.reldir))
cparser.setSection('playlist', 'filepattern', unicode(self.filename.text()))
cparser.setSection('playlist', 'windows_separator', checktoint(self.windows_separator))
示例2: saveSettings
# 需要导入模块: from puddlestuff.puddleobjects import PuddleConfig [as 别名]
# 或者: from puddlestuff.puddleobjects.PuddleConfig import setSection [as 别名]
def saveSettings(self):
patterns = [unicode(self.listbox.item(row).text()) for row in xrange(self.listbox.count())]
cparser = PuddleConfig()
cparser.setSection('editor', 'patterns', patterns)