Skip to content
Myr

Fix clear() on win, colorama

Before adoption: this commit came in with the history the project adopted, so no landing records it.

win10, python2.7, installed click, colorama python >>>import click;click.clear() [2J[1;1H>>>

authored by luw2007 · committed by luw2007 · parent 61de694 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:click/termui.py+1 added-1 removed
295 unmodified lines
296 return297 # If we're on Windows and we don't have colorama available, then we298 # clear the screen by shelling out. Otherwise we can use an escape299 # sequence.300 if WIN and colorama is None:300 if WIN:301 os.system('cls')302 else:303 sys.stdout.write('\033[2J\033[1;1H')304
214 unmodified lines