本文整理匯總了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)