Show More
@@ -808,17 +808,17 b' class OSMagics(Magics):' | |||
|
808 | 808 | This magic command can either take a local filename, an url, |
|
809 | 809 | an history range (see %history) or a macro as argument :: |
|
810 | 810 | |
|
811 | If no parameter is given, prints out history of current session up to | |
|
812 | this point. | |
|
813 | ||
|
811 | 814 | %pycat myscript.py |
|
812 | 815 | %pycat 7-27 |
|
813 | 816 | %pycat myMacro |
|
814 | 817 | %pycat http://www.example.com/myscript.py |
|
815 | 818 | """ |
|
816 | if not parameter_s: | |
|
817 | raise UsageError('Missing filename, URL, input history range, ' | |
|
818 | 'or macro.') | |
|
819 | ||
|
820 | try : | |
|
821 | cont = self.shell.find_user_code(parameter_s, skip_encoding_cookie=False) | |
|
819 | try: | |
|
820 | cont = self.shell.find_user_code(parameter_s, | |
|
821 | skip_encoding_cookie=False) | |
|
822 | 822 | except (ValueError, IOError): |
|
823 | 823 | print("Error: no such file, variable, URL, history range or macro") |
|
824 | 824 | return |
General Comments 0
You need to be logged in to leave comments.
Login now