##// END OF EJS Templates
Add "something_to_run" flag which is set to True if there is a module, file, or code to run.
Bradley M. Froehle -
Show More
@@ -265,6 +265,8 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):'
265 265 self.interact = True
266 266
267 267 def _file_to_run_changed(self, name, old, new):
268 if new:
269 self.something_to_run = True
268 270 if new and not self.force_interact:
269 271 self.interact = False
270 272 _code_to_run_changed = _file_to_run_changed
@@ -272,7 +274,7 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):'
272 274
273 275 # internal, not-configurable
274 276 interact=Bool(True)
275
277 something_to_run=Bool(False)
276 278
277 279 def parse_command_line(self, argv=None):
278 280 """override to allow old '-pylab' flag with deprecation warning"""
@@ -307,7 +309,7 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):'
307 309 if not self.ignore_old_config:
308 310 check_for_old_config(self.ipython_dir)
309 311 # print self.extra_args
310 if self.extra_args and not self.module_to_run:
312 if self.extra_args and not self.something_to_run:
311 313 self.file_to_run = self.extra_args[0]
312 314 # create the shell
313 315 self.init_shell()
General Comments 0
You need to be logged in to leave comments. Login now