##// END OF EJS Templates
make `ipython -i script.py` match `%run script.py`...
MinRK -
Show More
@@ -287,6 +287,13 b' class InteractiveShellApp(Configurable):'
287 self._run_startup_files()
287 self._run_startup_files()
288 self._run_exec_lines()
288 self._run_exec_lines()
289 self._run_exec_files()
289 self._run_exec_files()
290
291 # Hide variables defined here from %who etc.
292 if self.hide_initial_ns:
293 self.shell.user_ns_hidden.update(self.shell.user_ns)
294
295 # command-line execution (ipython -i script.py, ipython -m module)
296 # should *not* be excluded from %whos
290 self._run_cmd_line_code()
297 self._run_cmd_line_code()
291 self._run_module()
298 self._run_module()
292
299
@@ -294,10 +301,6 b' class InteractiveShellApp(Configurable):'
294 sys.stdout.flush()
301 sys.stdout.flush()
295 sys.stderr.flush()
302 sys.stderr.flush()
296
303
297 # Hide variables defined here from %who etc.
298 if self.hide_initial_ns:
299 self.shell.user_ns_hidden.update(self.shell.user_ns)
300
301 def _run_exec_lines(self):
304 def _run_exec_lines(self):
302 """Run lines of code in IPythonApp.exec_lines in the user's namespace."""
305 """Run lines of code in IPythonApp.exec_lines in the user's namespace."""
303 if not self.exec_lines:
306 if not self.exec_lines:
General Comments 0
You need to be logged in to leave comments. Login now