当前位置: 首页>>代码示例>>Python>>正文


Python Properties.save方法代码示例

本文整理汇总了Python中properties.Properties.save方法的典型用法代码示例。如果您正苦于以下问题:Python Properties.save方法的具体用法?Python Properties.save怎么用?Python Properties.save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在properties.Properties的用法示例。


在下文中一共展示了Properties.save方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: addLibrariesToProject

# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import save [as 别名]
 def addLibrariesToProject(self, libs):
     if self.main:
         path = self.mainPath()
         mkPath = os.path.join(path, "mk.cfg")
         props = Properties(mkPath)
         lst = props.get("LINK_LIBS").split(",")
         lst = [x for x in lst if len(x) > 0]
         for l in libs:
             lst.append(l)
         props.assign("LINK_LIBS", ",".join(lst))
         props.save(mkPath)
         self.depsChanged.emit(path)
开发者ID:amirgeva,项目名称:coide,代码行数:14,代码来源:workspace.py

示例2: editDependencies

# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import save [as 别名]
 def editDependencies(self):
     item = self.currentItem()
     path = item.data(0, DirectoryRole).toString()
     mkPath = os.path.join(path, "mk.cfg")
     props = Properties(mkPath)
     libs = re.split("\W+", props.get("LINK_LIBS"))
     d = DependenciesDialog(libs)
     if d.exec_():
         props.assign("LINK_LIBS", ",".join(d.libs))
         props.save(mkPath)
         self.depsChanged.emit(path)
         return True
     return False
开发者ID:amirgeva,项目名称:coide,代码行数:15,代码来源:workspace.py

示例3: editDebugSettings

# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import save [as 别名]
 def editDebugSettings(self):
     item = self.currentItem()
     path = item.data(0, DirectoryRole).toString()
     mkPath = os.path.join(path, "mk.cfg")
     props = Properties(mkPath)
     d = uis.loadDialog("debug_settings")
     d.cwdEdit.setText(props.get("DEBUG_CWD"))
     d.paramsEdit.setText(props.get("DEBUG_PARAMS"))
     d.browseDirButton.clicked.connect(lambda: utils.browseDirectory(d.cwdEdit))
     if d.exec_():
         props.assign("DEBUG_CWD", d.cwdEdit.text())
         props.assign("DEBUG_PARAMS", d.paramsEdit.text())
         self.debug = (d.cwdEdit.text(), d.paramsEdit.text())
         props.save(mkPath)
开发者ID:amirgeva,项目名称:coide,代码行数:16,代码来源:workspace.py

示例4: save

# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import save [as 别名]
 def save(self, path):
     props = Properties(path)
     for (name, tab) in self.tabs:
         tab.save(props)
     props.save(path)
开发者ID:amirgeva,项目名称:coide,代码行数:7,代码来源:buildsettings.py


注:本文中的properties.Properties.save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。