本文整理汇总了Python中spyderlib.widgets.externalshell.baseshell.ExternalShellBase.get_options_menu方法的典型用法代码示例。如果您正苦于以下问题:Python ExternalShellBase.get_options_menu方法的具体用法?Python ExternalShellBase.get_options_menu怎么用?Python ExternalShellBase.get_options_menu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类spyderlib.widgets.externalshell.baseshell.ExternalShellBase
的用法示例。
在下文中一共展示了ExternalShellBase.get_options_menu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_options_menu
# 需要导入模块: from spyderlib.widgets.externalshell.baseshell import ExternalShellBase [as 别名]
# 或者: from spyderlib.widgets.externalshell.baseshell.ExternalShellBase import get_options_menu [as 别名]
def get_options_menu(self):
ExternalShellBase.get_options_menu(self)
self.interact_action = create_action(self, _("Interact"))
self.interact_action.setCheckable(True)
self.debug_action = create_action(self, _("Debug"))
self.debug_action.setCheckable(True)
self.args_action = create_action(self, _("Arguments..."),
triggered=self.get_arguments)
self.post_mortem_action = create_action(self, _("Post Mortem Debug"))
self.post_mortem_action.setCheckable(True)
run_settings_menu = QMenu(_("Run settings"), self)
add_actions(run_settings_menu,
(self.interact_action, self.debug_action, self.args_action,
self.post_mortem_action))
self.cwd_button = create_action(self, _("Working directory"),
icon=get_std_icon('DirOpenIcon'),
tip=_("Set current working directory"),
triggered=self.set_current_working_directory)
self.env_button = create_action(self, _("Environment variables"),
icon=get_icon('environ.png'),
triggered=self.show_env)
self.syspath_button = create_action(self,
_("Show sys.path contents"),
icon=get_icon('syspath.png'),
triggered=self.show_syspath)
actions = [run_settings_menu, self.show_time_action, None,
self.cwd_button, self.env_button, self.syspath_button]
if self.menu_actions is not None:
actions += [None]+self.menu_actions
return actions