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

@ -24,6 +24,7 @@ Bug fixes / Maintenance
- don't print empty lines when showing junitxml-filename - don't print empty lines when showing junitxml-filename
- fix py.code.compile(source) to generate unique filenames - fix py.code.compile(source) to generate unique filenames
- add optional boolean ignore_errors parameter to py.path.local.remove - add optional boolean ignore_errors parameter to py.path.local.remove
- fix terminal writing on win32/python2.4
Changes between 1.3.0 and 1.3.1 Changes between 1.3.0 and 1.3.1
================================================== ==================================================

View File

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