本文整理匯總了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})