less imports at function level, add a CHANGELOG entry - i guess

there are not many win32/python2.4 users anymore these days.

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-06-09 12:07:12 +02:00
parent 4437ecb385
commit d83bf93154
2 changed files with 3 additions and 4 deletions

View File

@@ -226,6 +226,8 @@ class WriteFile(object):
if win32_and_ctypes:
TerminalWriter = Win32ConsoleWriter
import ctypes
from ctypes import wintypes
# ctypes access to the Windows console
STD_OUTPUT_HANDLE = -11
@@ -242,17 +244,13 @@ if win32_and_ctypes:
BACKGROUND_INTENSITY = 0x0080 # background color is intensified.
def GetStdHandle(kind):
import ctypes
return ctypes.windll.kernel32.GetStdHandle(kind)
def SetConsoleTextAttribute(handle, attr):
import ctypes
ctypes.windll.kernel32.SetConsoleTextAttribute(
handle, attr)
def _getdimensions():
import ctypes
from ctypes import wintypes
SHORT = ctypes.c_short
class COORD(ctypes.Structure):