Show More
@@ -187,11 +187,15 b' class InteractiveShellApp(Configurable):' | |||||
187 | self.shell.showtraceback() |
|
187 | self.shell.showtraceback() | |
188 |
|
188 | |||
189 | def _exec_file(self, fname): |
|
189 | def _exec_file(self, fname): | |
190 | full_filename = filefind(fname, [u'.', self.ipython_dir]) |
|
190 | try: | |
|
191 | full_filename = filefind(fname, [u'.', self.ipython_dir]) | |||
|
192 | except IOError as e: | |||
|
193 | self.log.warn("File not found: %r"%fname) | |||
|
194 | return | |||
191 | # Make sure that the running script gets a proper sys.argv as if it |
|
195 | # Make sure that the running script gets a proper sys.argv as if it | |
192 | # were run from a system shell. |
|
196 | # were run from a system shell. | |
193 | save_argv = sys.argv |
|
197 | save_argv = sys.argv | |
194 | sys.argv = sys.argv[sys.argv.index(fname):] |
|
198 | sys.argv = [full_filename] + self.extra_args[1:] | |
195 | try: |
|
199 | try: | |
196 | if os.path.isfile(full_filename): |
|
200 | if os.path.isfile(full_filename): | |
197 | if full_filename.endswith('.ipy'): |
|
201 | if full_filename.endswith('.ipy'): |
General Comments 0
You need to be logged in to leave comments.
Login now