Show More
@@ -646,7 +646,9 b' python-profiler package from non-free.""")' | |||
|
646 | 646 | return |
|
647 | 647 | arg_lst = [modpath] + arg_lst |
|
648 | 648 | try: |
|
649 | filename = file_finder(arg_lst[0]) | |
|
649 | fpath = None # initialize to make sure fpath is in scope later | |
|
650 | fpath = arg_lst[0] | |
|
651 | filename = file_finder(fpath) | |
|
650 | 652 | except IndexError: |
|
651 | 653 | warn('you must provide at least a filename.') |
|
652 | 654 | print('\n%run:\n', oinspect.getdoc(self.run)) |
@@ -656,6 +658,9 b' python-profiler package from non-free.""")' | |||
|
656 | 658 | msg = str(e) |
|
657 | 659 | except UnicodeError: |
|
658 | 660 | msg = e.message |
|
661 | import re | |
|
662 | if os.name == 'nt' and re.match(r"^'.*'$",fpath): | |
|
663 | warn('For Windows, use double quotes to wrap a filename: %run "mypath\\myfile.py"') | |
|
659 | 664 | error(msg) |
|
660 | 665 | return |
|
661 | 666 |
General Comments 0
You need to be logged in to leave comments.
Login now