mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-10 22:12:24 +08:00
Merge pull request #365 from blink1073/dev
Allow Jedi to be imported from a REPL on Windows
This commit is contained in:
@@ -1,11 +1,16 @@
|
|||||||
from jedi._compatibility import u, encoding, is_py3k
|
from jedi._compatibility import u, encoding, is_py3k
|
||||||
import inspect
|
import inspect
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Use colorama for nicer console output.
|
if not os.name == 'nt':
|
||||||
from colorama import Fore, init
|
# Use colorama for nicer console output.
|
||||||
init()
|
from colorama import Fore, init
|
||||||
|
init()
|
||||||
|
# does not work on Windows, as pyreadline and colorama interfere
|
||||||
|
else:
|
||||||
|
raise ImportError
|
||||||
except ImportError:
|
except ImportError:
|
||||||
class Fore(object):
|
class Fore(object):
|
||||||
RED = ''
|
RED = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user