本文整理汇总了Python中spyderlib.widgets.externalshell.baseshell.ExternalShellBase.get_toolbar_buttons方法的典型用法代码示例。如果您正苦于以下问题:Python ExternalShellBase.get_toolbar_buttons方法的具体用法?Python ExternalShellBase.get_toolbar_buttons怎么用?Python ExternalShellBase.get_toolbar_buttons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类spyderlib.widgets.externalshell.baseshell.ExternalShellBase
的用法示例。
在下文中一共展示了ExternalShellBase.get_toolbar_buttons方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_toolbar_buttons
# 需要导入模块: from spyderlib.widgets.externalshell.baseshell import ExternalShellBase [as 别名]
# 或者: from spyderlib.widgets.externalshell.baseshell.ExternalShellBase import get_toolbar_buttons [as 别名]
def get_toolbar_buttons(self):
ExternalShellBase.get_toolbar_buttons(self)
if self.namespacebrowser_button is None and self.stand_alone is not None:
self.namespacebrowser_button = create_toolbutton(
self,
text=_("Variables"),
icon=get_icon("dictedit.png"),
tip=_("Show/hide global variables explorer"),
toggled=self.toggle_globals_explorer,
text_beside_icon=True,
)
if self.terminate_button is None:
self.terminate_button = create_toolbutton(
self,
text=_("Terminate"),
icon=get_icon("stop.png"),
tip=_(
"Attempts to stop the process. The process\n"
"may not exit as a result of clicking this\n"
"button (it is given the chance to prompt\n"
"the user for any unsaved files, etc)."
),
)
buttons = []
if self.namespacebrowser_button is not None:
buttons.append(self.namespacebrowser_button)
buttons += [self.run_button, self.terminate_button, self.kill_button, self.options_button]
return buttons