Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

exec_files works when specified in config file

also don't treat IOError (file not found) as an unknown failure.

closes gh-566
  • Loading branch information...
commit d306e585bb37e4d1143598903e96abb386b222be 1 parent 26addb0
@minrk minrk authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 IPython/core/
8 IPython/core/
@@ -187,11 +187,15 @@ def _run_exec_lines(self):
def _exec_file(self, fname):
- full_filename = filefind(fname, [u'.', self.ipython_dir])
+ try:
+ full_filename = filefind(fname, [u'.', self.ipython_dir])
+ except IOError as e:
+ self.log.warn("File not found: %r"%fname)
+ return
# Make sure that the running script gets a proper sys.argv as if it
# were run from a system shell.
save_argv = sys.argv
- sys.argv = sys.argv[sys.argv.index(fname):]
+ sys.argv = [full_filename] + self.extra_args[1:]
if os.path.isfile(full_filename):
if full_filename.endswith('.ipy'):
Please sign in to comment.
Something went wrong with that request. Please try again.