forked from VimPlug/jedi
Add a print_to_stderr function in compatibility
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user