moved the TINY_STEP variable to the module level

This commit is contained in:
Thomas Nagy 2014-01-01 19:59:59 +01:00
parent d74a2900a3
commit 80bc0a65ce
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,8 @@ console commands.
import sys, os, re, threading
TINY_STEP = 3000
try:
if not (sys.stderr.isatty() and sys.stdout.isatty()):
raise ValueError('not a tty')
@ -241,7 +243,6 @@ else:
if isinstance(txt, _type):
writeconsole = windll.kernel32.WriteConsoleW
TINY_STEP = 3000
for x in range(0, len(txt), TINY_STEP):
# According MSDN, size should NOT exceed 64 kb (issue #746)
tiny = txt[x : x + TINY_STEP]