2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -0,0 +1,17 @@
|
|||
from ctypes import *
|
||||
|
||||
STD_OUTPUT_HANDLE = -11
|
||||
|
||||
class COORD(Structure):
|
||||
pass
|
||||
|
||||
COORD._fields_ = [("X", c_short), ("Y", c_short)]
|
||||
|
||||
def print_at(r, c, s):
|
||||
h = windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
|
||||
windll.kernel32.SetConsoleCursorPosition(h, COORD(c, r))
|
||||
|
||||
c = s.encode("windows-1252")
|
||||
windll.kernel32.WriteConsoleA(h, c_char_p(c), len(c), None, None)
|
||||
|
||||
print_at(6, 3, "Hello")
|
||||
Loading…
Add table
Add a link
Reference in a new issue