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
评论列表
文章目录