(s='', newline=True, stream=sys.stdout.write)
| 33 | |
| 34 | |
| 35 | def puts(s='', newline=True, stream=sys.stdout.write): |
| 36 | assert not IS_PY2 or ( |
| 37 | isinstance(s, unicode) or isinstance(s, colored.ColoredString)) |
| 38 | |
| 39 | if IS_PY2: |
| 40 | s = s.encode(ENCODING, errors='ignore') |
| 41 | clint_puts(s, newline=newline, stream=stream) |
| 42 | |
| 43 | |
| 44 | # Stdout |