Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: third_party/colorama/winterm.py

Issue 54603003: Update colorama from upstream to 5a3100113a3a. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/colorama/win32.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1 # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
2 from . import win32 2 from . import win32
3 3
4 4
5 # from wincon.h 5 # from wincon.h
6 class WinColor(object): 6 class WinColor(object):
7 BLACK = 0 7 BLACK = 0
8 BLUE = 1 8 BLUE = 1
9 GREEN = 2 9 GREEN = 2
10 CYAN = 3 10 CYAN = 3
11 RED = 4 11 RED = 4
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return 106 return
107 handle = win32.STDOUT 107 handle = win32.STDOUT
108 if on_stderr: 108 if on_stderr:
109 handle = win32.STDERR 109 handle = win32.STDERR
110 # here's where we'll home the cursor 110 # here's where we'll home the cursor
111 coord_screen = win32.COORD(0,0) 111 coord_screen = win32.COORD(0,0)
112 csbi = win32.GetConsoleScreenBufferInfo(handle) 112 csbi = win32.GetConsoleScreenBufferInfo(handle)
113 # get the number of character cells in the current buffer 113 # get the number of character cells in the current buffer
114 dw_con_size = csbi.dwSize.X * csbi.dwSize.Y 114 dw_con_size = csbi.dwSize.X * csbi.dwSize.Y
115 # fill the entire screen with blanks 115 # fill the entire screen with blanks
116 win32.FillConsoleOutputCharacter(handle, ord(' '), dw_con_size, coord_sc reen) 116 win32.FillConsoleOutputCharacter(handle, ' ', dw_con_size, coord_screen)
117 # now set the buffer's attributes accordingly 117 # now set the buffer's attributes accordingly
118 win32.FillConsoleOutputAttribute(handle, self.get_attrs(), dw_con_size, coord_screen ); 118 win32.FillConsoleOutputAttribute(handle, self.get_attrs(), dw_con_size, coord_screen );
119 # put the cursor at (0, 0) 119 # put the cursor at (0, 0)
120 win32.SetConsoleCursorPosition(handle, (coord_screen.X, coord_screen.Y)) 120 win32.SetConsoleCursorPosition(handle, (coord_screen.X, coord_screen.Y))
OLDNEW
« no previous file with comments | « third_party/colorama/win32.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698