Show More
@@ -29,7 +29,7 b' from IPython.config.application import boolean_flag' | |||||
29 | from IPython.config.configurable import Configurable |
|
29 | from IPython.config.configurable import Configurable | |
30 | from IPython.config.loader import Config |
|
30 | from IPython.config.loader import Config | |
31 | from IPython.utils.path import filefind |
|
31 | from IPython.utils.path import filefind | |
32 | from IPython.utils.traitlets import Unicode, Instance, List |
|
32 | from IPython.utils.traitlets import Unicode, Instance, List, Bool | |
33 |
|
33 | |||
34 | #----------------------------------------------------------------------------- |
|
34 | #----------------------------------------------------------------------------- | |
35 | # Aliases and Flags |
|
35 | # Aliases and Flags | |
@@ -133,6 +133,10 b' class InteractiveShellApp(Configurable):' | |||||
133 | code_to_run = Unicode('', config=True, |
|
133 | code_to_run = Unicode('', config=True, | |
134 | help="Execute the given command string." |
|
134 | help="Execute the given command string." | |
135 | ) |
|
135 | ) | |
|
136 | pylab_import_all = Bool(True, config=True, | |||
|
137 | help="""If true, an 'import *' is done from numpy and pylab, | |||
|
138 | when using pylab""" | |||
|
139 | ) | |||
136 | shell = Instance('IPython.core.interactiveshell.InteractiveShellABC') |
|
140 | shell = Instance('IPython.core.interactiveshell.InteractiveShellABC') | |
137 |
|
141 | |||
138 | def init_shell(self): |
|
142 | def init_shell(self): |
@@ -346,7 +346,10 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):' | |||||
346 | try: |
|
346 | try: | |
347 | self.log.info("Enabling GUI event loop integration, " |
|
347 | self.log.info("Enabling GUI event loop integration, " | |
348 | "toolkit=%s, pylab=%s" % (gui, self.pylab) ) |
|
348 | "toolkit=%s, pylab=%s" % (gui, self.pylab) ) | |
349 | activate(gui) |
|
349 | if self.pylab: | |
|
350 | activate(gui, import_all=self.pylab_import_all) | |||
|
351 | else: | |||
|
352 | activate(gui) | |||
350 | except: |
|
353 | except: | |
351 | self.log.warn("Error in enabling GUI event loop integration:") |
|
354 | self.log.warn("Error in enabling GUI event loop integration:") | |
352 | self.shell.showtraceback() |
|
355 | self.shell.showtraceback() |
@@ -623,10 +623,6 b' class IPKernelApp(KernelApp, InteractiveShellApp):' | |||||
623 | selecting a particular matplotlib backend and loop integration. |
|
623 | selecting a particular matplotlib backend and loop integration. | |
624 | """ |
|
624 | """ | |
625 | ) |
|
625 | ) | |
626 | pylab_import_all = Bool(True, config=True, |
|
|||
627 | help="""If true, an 'import *' is done from numpy and pylab, |
|
|||
628 | when using pylab""" |
|
|||
629 | ) |
|
|||
630 | def initialize(self, argv=None): |
|
626 | def initialize(self, argv=None): | |
631 | super(IPKernelApp, self).initialize(argv) |
|
627 | super(IPKernelApp, self).initialize(argv) | |
632 | self.init_shell() |
|
628 | self.init_shell() |
General Comments 0
You need to be logged in to leave comments.
Login now