~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to terminal.py

  • Committer: Aaron Bentley
  • Date: 2008-05-30 02:46:25 UTC
  • Revision ID: aaron@aaronbentley.com-20080530024625-anlzob2j6z2s7ebv
Remove references to PyBaz

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    # XXX See terminfo(5) for all the gory details.
28
28
    if sys.platform == "win32":
29
29
        return False
30
 
    if not sys.stdout.isatty():
31
 
        return False
32
30
    import curses
33
 
    try:
34
 
        curses.setupterm()
35
 
    except curses.error:
36
 
        return False
 
31
    curses.setupterm()
37
32
    return bool(curses.tigetstr('setaf'))
38
33
 
39
34
colors = {