Merge branch 'tweaks' of git://github.com/Code0x58/colout into develop
This commit is contained in:
commit
cb790b3089
2 changed files with 4 additions and 2 deletions
|
|
@ -31,6 +31,8 @@ signal.signal( signal.SIGPIPE, signal.SIG_DFL )
|
|||
# Global variable(s)
|
||||
###############################################################################
|
||||
|
||||
PY2 = sys.version_info.major == 2
|
||||
|
||||
context = {}
|
||||
debug = False
|
||||
|
||||
|
|
@ -753,7 +755,7 @@ def write(colored, stream = sys.stdout):
|
|||
"""
|
||||
Write "colored" on sys.stdout, then flush.
|
||||
"""
|
||||
if six.PY2: # If Python 2.x: force unicode
|
||||
if PY2: # If Python 2.x: force unicode
|
||||
if isinstance(colored, unicode):
|
||||
colored = colored.encode('utf-8')
|
||||
try:
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -14,7 +14,7 @@ if sys.argv[-1] == 'publish':
|
|||
|
||||
packages = ['colout']
|
||||
|
||||
requires = ['argparse', 'pygments', 'babel']
|
||||
requires = ['argparse; python_version < "2.7"', 'pygments', 'babel']
|
||||
|
||||
setup(
|
||||
name='colout',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue