refine win32 checks to also work on top of jython/win32

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-04-20 10:45:41 -07:00
parent 7cd899fd3c
commit 536252cb2e
4 changed files with 8 additions and 6 deletions

View File

@@ -133,7 +133,8 @@ def ansi_print(text, esc, file=None, newline=True, flush=False):
def should_do_markup(file):
return hasattr(file, 'isatty') and file.isatty() \
and os.environ.get('TERM') != 'dumb'
and os.environ.get('TERM') != 'dumb' \
and not (os._name == 'nt' and sys.platform.startswith('java'))
class TerminalWriter(object):
_esctable = dict(black=30, red=31, green=32, yellow=33,

View File

@@ -5,7 +5,7 @@ import sys, os, stat, re, atexit
import py
from py._path import common
iswin32 = sys.platform == "win32"
iswin32 = sys.platform == "win32" or (os._name == 'nt')
class Stat(object):
def __getattr__(self, name):