Show More
@@ -231,7 +231,7 b' class MainWindow(QtGui.QMainWindow):' | |||
|
231 | 231 | |
|
232 | 232 | """ |
|
233 | 233 | if not name: |
|
234 |
name=str('n |
|
|
234 | name=str('kernel '+str(self.tabWidget.count())) | |
|
235 | 235 | self.tabWidget.addTab(frontend,name) |
|
236 | 236 | self.updateTabBarVisibility() |
|
237 | 237 | frontend.exit_requested.connect(self.closeTab) |
@@ -823,20 +823,21 b' class IPythonQtConsoleApp(BaseIPythonApplication):' | |||
|
823 | 823 | self.kernel_manager.start_channels() |
|
824 | 824 | |
|
825 | 825 | def createTabWithNewFrontend(self): |
|
826 | """ Create new tab attached to new kernel, launched on localhost. | |
|
827 | """ | |
|
826 | 828 | kernel_manager = QtKernelManager( |
|
827 |
shell_address=( |
|
|
828 |
sub_address=( |
|
|
829 |
stdin_address=( |
|
|
830 |
hb_address=( |
|
|
829 | shell_address=(LOCALHOST,0 ), | |
|
830 | sub_address=(LOCALHOST, 0), | |
|
831 | stdin_address=(LOCALHOST, 0), | |
|
832 | hb_address=(LOCALHOST, 0), | |
|
831 | 833 | config=self.config |
|
832 | 834 | ) |
|
833 | 835 | # start the kernel |
|
834 | if not self.existing: | |
|
835 | kwargs = dict(ip=self.ip, ipython=not self.pure) | |
|
836 | kwargs['extra_arguments'] = self.kernel_argv | |
|
837 | kernel_manager.start_kernel(**kwargs) | |
|
836 | kwargs = dict(ip=LOCALHOST, ipython=not self.pure) | |
|
837 | kwargs['extra_arguments'] = self.kernel_argv | |
|
838 | kernel_manager.start_kernel(**kwargs) | |
|
838 | 839 | kernel_manager.start_channels() |
|
839 |
local_kernel = (not |
|
|
840 | local_kernel = (not False) or self.ip in LOCAL_IPS | |
|
840 | 841 | widget = self.widget_factory(config=self.config, |
|
841 | 842 | local_kernel=local_kernel) |
|
842 | 843 | widget.kernel_manager = kernel_manager |
@@ -846,16 +847,16 b' class IPythonQtConsoleApp(BaseIPythonApplication):' | |||
|
846 | 847 | self.window.addTabWithFrontend(widget) |
|
847 | 848 | |
|
848 | 849 | def createTabAttachedToCurrentTabKernel(self): |
|
849 | currentWidget=self.window.tabWidget.currentWidget() | |
|
850 | currentWidgetIndex=self.window.tabWidget.indexOf(currentWidget) | |
|
851 | ckm=currentWidget.kernel_manager; | |
|
852 |
c |
|
|
850 | currentWidget = self.window.tabWidget.currentWidget() | |
|
851 | currentWidgetIndex = self.window.tabWidget.indexOf(currentWidget) | |
|
852 | currentWidget.kernel_manager = currentWidget.kernel_manager; | |
|
853 | currentWidgetName = self.window.tabWidget.tabText(currentWidgetIndex); | |
|
853 | 854 | kernel_manager = QtKernelManager( |
|
854 | shell_address=ckm.shell_address, | |
|
855 | sub_address=ckm.sub_address, | |
|
856 | stdin_address=ckm.stdin_address, | |
|
857 | hb_address=ckm.hb_address, | |
|
858 | config=self.config | |
|
855 | shell_address = currentWidget.kernel_manager.shell_address, | |
|
856 | sub_address = currentWidget.kernel_manager.sub_address, | |
|
857 | stdin_address = currentWidget.kernel_manager.stdin_address, | |
|
858 | hb_address = currentWidget.kernel_manager.hb_address, | |
|
859 | config = self.config | |
|
859 | 860 | ) |
|
860 | 861 | kernel_manager.start_channels() |
|
861 | 862 | local_kernel = (not self.existing) or self.ip in LOCAL_IPS |
@@ -864,7 +865,7 b' class IPythonQtConsoleApp(BaseIPythonApplication):' | |||
|
864 | 865 | widget._confirm_exit=True; |
|
865 | 866 | widget._may_close=False; |
|
866 | 867 | widget.kernel_manager = kernel_manager |
|
867 |
self.window.addTabWithFrontend(widget,name=str('('+c |
|
|
868 | self.window.addTabWithFrontend(widget,name=str('('+currentWidgetName+') slave')) | |
|
868 | 869 | |
|
869 | 870 | def init_qt_elements(self): |
|
870 | 871 | # Create the widget. |
General Comments 0
You need to be logged in to leave comments.
Login now