Show More
@@ -680,9 +680,8 b' class ExecutionMagics(Magics):' | |||||
680 | fpath = arg_lst[0] |
|
680 | fpath = arg_lst[0] | |
681 | filename = file_finder(fpath) |
|
681 | filename = file_finder(fpath) | |
682 | except IndexError: |
|
682 | except IndexError: | |
683 |
|
|
683 | msg = 'you must provide at least a filename.' | |
684 | print('\n%run:\n', oinspect.getdoc(self.run)) |
|
684 | raise Exception(msg) | |
685 | return |
|
|||
686 | except IOError as e: |
|
685 | except IOError as e: | |
687 | try: |
|
686 | try: | |
688 | msg = str(e) |
|
687 | msg = str(e) | |
@@ -690,8 +689,7 b' class ExecutionMagics(Magics):' | |||||
690 | msg = e.message |
|
689 | msg = e.message | |
691 | if os.name == 'nt' and re.match(r"^'.*'$",fpath): |
|
690 | if os.name == 'nt' and re.match(r"^'.*'$",fpath): | |
692 | warn('For Windows, use double quotes to wrap a filename: %run "mypath\\myfile.py"') |
|
691 | warn('For Windows, use double quotes to wrap a filename: %run "mypath\\myfile.py"') | |
693 |
|
|
692 | raise Exception(msg) | |
694 | return |
|
|||
695 | except TypeError: |
|
693 | except TypeError: | |
696 | if fpath in sys.meta_path: |
|
694 | if fpath in sys.meta_path: | |
697 | filename = "" |
|
695 | filename = "" |
General Comments 0
You need to be logged in to leave comments.
Login now