mirror of https://gitlab.com/ita1024/waf.git
moved imports to the top
This commit is contained in:
parent
6055744a5f
commit
ecc1f63a63
|
@ -1,4 +1,18 @@
|
||||||
import sys, os
|
#!/usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Emulate a vt100 terminal in cmd.exe
|
||||||
|
|
||||||
|
By wrapping sys.stdout / sys.stderr with Ansiterm,
|
||||||
|
the vt100 escape characters will be interpreted and
|
||||||
|
the equivalent actions will be performed with Win32
|
||||||
|
console commands.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys, os, re, threading
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not (sys.stderr.isatty() and sys.stdout.isatty()):
|
if not (sys.stderr.isatty() and sys.stdout.isatty()):
|
||||||
raise ValueError('not a tty')
|
raise ValueError('not a tty')
|
||||||
|
@ -26,8 +40,6 @@ try:
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
import re, threading
|
|
||||||
|
|
||||||
is_vista = getattr(sys, "getwindowsversion", None) and sys.getwindowsversion()[0] >= 6
|
is_vista = getattr(sys, "getwindowsversion", None) and sys.getwindowsversion()[0] >= 6
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue