File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -186,10 +186,10 @@ def run_user_init_file(self):
186
186
187
187
def execute (self , text ):
188
188
try :
189
- # ooh, look at the hack:
190
- code = self .compile (text , '<input >' , 'single' )
189
+ # ooh, look at the hack:
190
+ code = self .compile (text , '<stdin >' , 'single' )
191
191
except (OverflowError , SyntaxError , ValueError ):
192
- self .showsyntaxerror ("<input >" )
192
+ self .showsyntaxerror ("<stdin >" )
193
193
else :
194
194
self .runcode (code )
195
195
if sys .stdout and not sys .stdout .closed :
Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ def run_multiline_interactive_console(mainmodule=None):
39
39
import code
40
40
import __main__
41
41
mainmodule = mainmodule or __main__
42
- console = code .InteractiveConsole (mainmodule .__dict__ )
42
+ console = code .InteractiveConsole (mainmodule .__dict__ , filename = '<stdin>' )
43
43
44
44
def more_lines (unicodetext ):
45
45
# ooh, look at the hack:
46
46
src = "#coding:utf-8\n " + unicodetext .encode ('utf-8' )
47
47
try :
48
- code = console .compile (src , '<input >' , 'single' )
48
+ code = console .compile (src , '<stdin >' , 'single' )
49
49
except (OverflowError , SyntaxError , ValueError ):
50
50
return False
51
51
else :
You can’t perform that action at this time.
0 commit comments