示例#1
0
def puts(s='', newline=True, stream=sys.stdout.write):
    assert not IS_PY2 or (isinstance(s, unicode)
                          or isinstance(s, colored.ColoredString))

    if IS_PY2:
        s = s.encode(ENCODING, errors='ignore')
    clint_puts(s, newline=newline, stream=stream)
示例#2
0
文件: pprint.py 项目: sdg-mit/gitless
def puts(s='', newline=True, stream=sys.stdout.write):
  assert not IS_PY2 or (
      isinstance(s, unicode) or isinstance(s, colored.ColoredString))

  if IS_PY2:
    s = s.encode(ENCODING, errors='ignore')
  clint_puts(s, newline=newline, stream=stream)