diff --git a/jedi/_compatibility.py b/jedi/_compatibility.py index 64417b7e..828a32a4 100644 --- a/jedi/_compatibility.py +++ b/jedi/_compatibility.py @@ -291,6 +291,13 @@ def no_unicode_pprint(dct): print(re.sub("u'", "'", s)) +def print_to_stderr(string): + if is_py3: + eval("print(string, file=sys.stderr)") + else: + print >> sys.stderr, string + + def utf8_repr(func): """ ``__repr__`` methods in Python 2 don't allow unicode objects to be