Show More
@@ -2750,7 +2750,7 b' class InteractiveShell(SingletonConfigurable, Magic):' | |||||
2750 |
|
2750 | |||
2751 | A string specifying code to retrieve. This will be tried respectively |
|
2751 | A string specifying code to retrieve. This will be tried respectively | |
2752 | as: ranges of input history (see %history for syntax), url, |
|
2752 | as: ranges of input history (see %history for syntax), url, | |
2753 | correspnding .py file,filename, or an expression evaluating to a |
|
2753 | correspnding .py file, filename, or an expression evaluating to a | |
2754 | string or Macro in the user namespace. |
|
2754 | string or Macro in the user namespace. | |
2755 |
|
2755 | |||
2756 | raw : bool |
|
2756 | raw : bool | |
@@ -2772,8 +2772,8 b' class InteractiveShell(SingletonConfigurable, Magic):' | |||||
2772 | utarget = unquote_filename(target) |
|
2772 | utarget = unquote_filename(target) | |
2773 | if utarget.startswith(('http://', 'https://')): |
|
2773 | if utarget.startswith(('http://', 'https://')): | |
2774 | return openpy.read_py_url(utarget, skip_encoding_cookie=True) |
|
2774 | return openpy.read_py_url(utarget, skip_encoding_cookie=True) | |
2775 | except: |
|
2775 | except UnicodeDecodeError: | |
2776 |
raise ValueError(("'%s' |
|
2776 | raise ValueError(("'%s' seem to be unredable.") % utarget) | |
2777 |
|
2777 | |||
2778 | try : |
|
2778 | try : | |
2779 | pyfile = get_py_filename(target) |
|
2779 | pyfile = get_py_filename(target) |
@@ -2265,8 +2265,8 b' Currently the magic system has the following functions:\\n"""' | |||||
2265 | def magic_loadpy(self, arg_s): |
|
2265 | def magic_loadpy(self, arg_s): | |
2266 | """Alias of `%load` |
|
2266 | """Alias of `%load` | |
2267 |
|
2267 | |||
2268 | `%loadpy` has gain some flexibility and drop the requirement of `.py` |
|
2268 | `%loadpy` has gained some flexibility and droped the requirement of a `.py` | |
2269 | extension. So it has been rename simply into %load. You can look at |
|
2269 | extension. So it has been renamed simply into %load. You can look at | |
2270 | `%load`'s docstring for more info. |
|
2270 | `%load`'s docstring for more info. | |
2271 | """ |
|
2271 | """ | |
2272 | self.magic_load(arg_s) |
|
2272 | self.magic_load(arg_s) | |
@@ -2281,11 +2281,11 b' Currently the magic system has the following functions:\\n"""' | |||||
2281 |
|
2281 | |||
2282 | Options: |
|
2282 | Options: | |
2283 | -------- |
|
2283 | -------- | |
2284 | -y : Don't ask confirmation for loading source above 200 000 caracters. |
|
2284 | -y : Don't ask confirmation for loading source above 200 000 characters. | |
2285 |
|
2285 | |||
2286 | This magic command can either take a local filename, a URL, an history |
|
2286 | This magic command can either take a local filename, a URL, an history | |
2287 | range (see %history) or a macro as argument, it will prompt for |
|
2287 | range (see %history) or a macro as argument, it will prompt for | |
2288 | confirmation before loading source with more than 200 000 caracters, unless |
|
2288 | confirmation before loading source with more than 200 000 characters, unless | |
2289 | -y flag is passed or if the frontend does not support raw_input:: |
|
2289 | -y flag is passed or if the frontend does not support raw_input:: | |
2290 |
|
2290 | |||
2291 | %load myscript.py |
|
2291 | %load myscript.py | |
@@ -2303,7 +2303,7 b' Currently the magic system has the following functions:\\n"""' | |||||
2303 | # so in average, more than 5000 lines |
|
2303 | # so in average, more than 5000 lines | |
2304 | if l > 200000 and 'y' not in opts: |
|
2304 | if l > 200000 and 'y' not in opts: | |
2305 | try: |
|
2305 | try: | |
2306 | ans = self.shell.ask_yes_no(("The text you'r trying to load seem pretty big"\ |
|
2306 | ans = self.shell.ask_yes_no(("The text you're trying to load seems pretty big"\ | |
2307 | " (%d characters). Continue (y/[N]) ?" % l), default='n' ) |
|
2307 | " (%d characters). Continue (y/[N]) ?" % l), default='n' ) | |
2308 | except StdinNotImplementedError: |
|
2308 | except StdinNotImplementedError: | |
2309 | #asume yes if raw input not implemented |
|
2309 | #asume yes if raw input not implemented |
@@ -6,7 +6,6 b' Much of the code is taken from the tokenize module in Python 3.2.' | |||||
6 | """ |
|
6 | """ | |
7 | from __future__ import absolute_import |
|
7 | from __future__ import absolute_import | |
8 |
|
8 | |||
9 | import __builtin__ |
|
|||
10 | import io |
|
9 | import io | |
11 | from io import TextIOWrapper |
|
10 | from io import TextIOWrapper | |
12 | import re |
|
11 | import re |
General Comments 0
You need to be logged in to leave comments.
Login now