本文整理汇总了Python中Plugins.updateRcFile方法的典型用法代码示例。如果您正苦于以下问题:Python Plugins.updateRcFile方法的具体用法?Python Plugins.updateRcFile怎么用?Python Plugins.updateRcFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugins
的用法示例。
在下文中一共展示了Plugins.updateRcFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: showChooseIDELanguage
# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import updateRcFile [as 别名]
def showChooseIDELanguage(editor):
dlg = LanguageSelectDlg(editor, lang=Preferences.i18nLanguage,
boaLangs=langs)
try:
if dlg.ShowModal() == wx.ID_OK:
lang, ident = dlg.GetLanguageInfo()
Preferences.i18nLanguage = lang
Plugins.updateRcFile('prefs.rc.py', 'i18nLanguage', 'wx.'+ident)
finally:
dlg.Destroy()
示例2: openPyInterpChooser
# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import updateRcFile [as 别名]
def openPyInterpChooser(editor):
dlg = PyInterpreterChooserDlg(editor, Preferences.pythonInterpreterPath)
try:
if dlg.ShowModal() != wx.ID_OK:
return
pyIntpPath = dlg.txtPyIntpPath.GetValue()
if pyIntpPath != Preferences.pythonInterpreterPath:
Plugins.updateRcFile('prefs.rc.py', 'pythonInterpreterPath', `pyIntpPath`)
for ver, path in dlg.installedPaths:
if path == pyIntpPath:
break
else:
for path in Preferences.picExtraPaths:
if path == pyIntpPath:
break
else:
Plugins.updateRcFile('prefs.plug-ins.rc.py', 'picExtraPaths',
`Preferences.picExtraPaths+[pyIntpPath]`)
finally:
dlg.Destroy()