本文整理汇总了Python中ipython_view.IPythonView方法的典型用法代码示例。如果您正苦于以下问题:Python ipython_view.IPythonView方法的具体用法?Python ipython_view.IPythonView怎么用?Python ipython_view.IPythonView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ipython_view
的用法示例。
在下文中一共展示了ipython_view.IPythonView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _start_shell
# 需要导入模块: import ipython_view [as 别名]
# 或者: from ipython_view import IPythonView [as 别名]
def _start_shell(self, dummy_button):
if self.shell_window is not None:
self.shell_window.present()
return
self.shell_window = gtk.Window()
self.shell_window.set_size_request(750,550)
self.shell_window.set_resizable(True)
scrolled_window = gtk.ScrolledWindow()
scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
ipython = ipython_view.IPythonView()
ipython.modify_font(pango.FontDescription(SHELL_FONT))
ipython.set_wrap_mode(gtk.WRAP_CHAR)
ipython.show()
scrolled_window.add(ipython)
scrolled_window.show()
self.shell_window.add(scrolled_window)
self.shell_window.show()
self.shell_window.connect('destroy', self._on_shell_window_destroy)
self._update_ipython_selected_node()
__IPYTHON__.user_ns['viz'] = self
示例2: _start_shell
# 需要导入模块: import ipython_view [as 别名]
# 或者: from ipython_view import IPythonView [as 别名]
def _start_shell(self, dummy_button):
if self.shell_window is not None:
self.shell_window.present()
return
self.shell_window = gtk.Window()
self.shell_window.set_size_request(750,550)
self.shell_window.set_resizable(True)
scrolled_window = gtk.ScrolledWindow()
scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
self.ipython = ipython_view.IPythonView()
self.ipython.modify_font(pango.FontDescription(SHELL_FONT))
self.ipython.set_wrap_mode(gtk.WRAP_CHAR)
self.ipython.show()
scrolled_window.add(self.ipython)
scrolled_window.show()
self.shell_window.add(scrolled_window)
self.shell_window.show()
self.shell_window.connect('destroy', self._on_shell_window_destroy)
self._update_ipython_selected_node()
self.ipython.updateNamespace({'viz': self})