mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Add __future__ imports to simple repl
This commit is contained in:
parent
23e2dbae65
commit
238c0c6c33
@ -169,8 +169,10 @@ def simple_repl(user_ns={}):
|
||||
for x in ('os', 'sys', 're'):
|
||||
user_ns[x] = user_ns.get(x, globals().get(x, locals().get(x)))
|
||||
user_ns['exit'] = Exit()
|
||||
import code
|
||||
code.interact(BANNER + 'Use exit to quit', raw_input, user_ns)
|
||||
from code import InteractiveConsole
|
||||
console = InteractiveConsole(user_ns)
|
||||
console.runsource('from __future__ import (unicode_literals, division, absolute_import, print_function)')
|
||||
console.interact(BANNER + 'Use exit to quit')
|
||||
|
||||
|
||||
def ipython(user_ns=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user