##// END OF EJS Templates
%profile points to application value, not shell value...
MinRK -
Show More
@@ -527,7 +527,11 b' Currently the magic system has the following functions:\\n"""'
527 527
528 528 def magic_profile(self, parameter_s=''):
529 529 """Print your currently active IPython profile."""
530 print self.shell.profile
530 from IPython.core.application import BaseIPythonApplication
531 if BaseIPythonApplication.initialized():
532 print BaseIPythonApplication.instance().profile
533 else:
534 error("profile is an application-level value, but you don't appear to be in an IPython application")
531 535
532 536 def magic_pinfo(self, parameter_s='', namespaces=None):
533 537 """Provide detailed information about an object.
@@ -64,6 +64,7 b' class Kernel(Configurable):'
64 64
65 65 shell = Instance('IPython.core.interactiveshell.InteractiveShellABC')
66 66 session = Instance(Session)
67 profile_dir = Instance('IPython.core.profiledir.ProfileDir')
67 68 shell_socket = Instance('zmq.Socket')
68 69 iopub_socket = Instance('zmq.Socket')
69 70 stdin_socket = Instance('zmq.Socket')
@@ -106,7 +107,9 b' class Kernel(Configurable):'
106 107 atexit.register(self._at_shutdown)
107 108
108 109 # Initialize the InteractiveShell subclass
109 self.shell = ZMQInteractiveShell.instance(config=self.config)
110 self.shell = ZMQInteractiveShell.instance(config=self.config,
111 profile_dir = self.profile_dir,
112 )
110 113 self.shell.displayhook.session = self.session
111 114 self.shell.displayhook.pub_socket = self.iopub_socket
112 115 self.shell.display_pub.session = self.session
@@ -739,16 +742,16 b' class IPKernelApp(KernelApp, InteractiveShellApp):'
739 742 self.init_code()
740 743
741 744 def init_kernel(self):
742 kernel_factory = Kernel
743 745
744 746 if self.pylab:
745 747 gui, backend = pylabtools.find_gui_and_backend(self.pylab)
746 748
747 kernel = kernel_factory(config=self.config, session=self.session,
749 kernel = Kernel(config=self.config, session=self.session,
748 750 shell_socket=self.shell_socket,
749 751 iopub_socket=self.iopub_socket,
750 752 stdin_socket=self.stdin_socket,
751 753 log=self.log,
754 profile_dir=self.profile_dir,
752 755 )
753 756 self.kernel = kernel
754 757 kernel.record_ports(self.ports)
General Comments 0
You need to be logged in to leave comments. Login now