Package pysql :: Module pysqlcolor
[hide private]
[frames] | no frames]

Source Code for Module pysql.pysqlcolor

 1  #!/usr/bin/python 
 2  # -*- coding: utf-8 -*- 
 3   
 4  """ANSI terminal color code 
 5  @author: Sébastien Renard (sebastien.renard@digitalfox.org) 
 6  @license: GNU GPL V3 
 7  """ 
 8   
 9  # Python imports: 
10  import os 
11  import sys 
12   
13  if os.name == 'posix' and \ 
14     os.getenv("PYDEVDEBUG", "0") == "0" and \ 
15     sys.stdin.isatty() and \ 
16     sys.stdout.isatty(): 
17      BOLD = '\033[01m' 
18      RED = '\033[31m' 
19      GREEN = '\033[32m' 
20      ORANGE = '\033[33m' 
21      BLUE = '\033[34m' 
22      PURPLE = '\033[35m' 
23      CYAN = '\033[36m' 
24      GREY = '\033[37m' 
25      RESET = '\033[0;0m' 
26  else: 
27      BOLD = '' 
28      RED = '' 
29      GREEN = '' 
30      ORANGE = '' 
31      BLUE = '' 
32      PURPLE = '' 
33      CYAN = '' 
34      GREY = '' 
35      RESET = '' 
36