comparison mercurial/win32.py @ 12689:c52c629ce19e

termwidth: move to ui.ui from util
author Augie Fackler <durin42@gmail.com>
date Sun, 10 Oct 2010 10:06:36 -0500
parents 4cdaf1adafc8
children bf826c0b9537
comparison
equal deleted inserted replaced
12688:8c034a825cfe 12689:c52c629ce19e
179 win32gui.ShowWindow(hwnd, win32con.SW_HIDE) 179 win32gui.ShowWindow(hwnd, win32con.SW_HIDE)
180 180
181 pid = win32process.GetCurrentProcessId() 181 pid = win32process.GetCurrentProcessId()
182 win32gui.EnumWindows(callback, pid) 182 win32gui.EnumWindows(callback, pid)
183 183
184 def termwidth_(): 184 def termwidth():
185 try: 185 try:
186 # Query stderr to avoid problems with redirections 186 # Query stderr to avoid problems with redirections
187 screenbuf = win32console.GetStdHandle(win32console.STD_ERROR_HANDLE) 187 screenbuf = win32console.GetStdHandle(win32console.STD_ERROR_HANDLE)
188 try: 188 try:
189 window = screenbuf.GetConsoleScreenBufferInfo()['Window'] 189 window = screenbuf.GetConsoleScreenBufferInfo()['Window']