mirror of
https://github.com/kennethreitz/clint.git
synced 2026-06-05 23:00:18 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| faeacbbfad | |||
| 401344ff1e | |||
| 598deda4d9 | |||
| bf7b5d0930 | |||
| 6404b0e49c | |||
| b92f3204c9 | |||
| 61225d90e6 | |||
| 3688a2a67b |
@@ -1,6 +1,13 @@
|
||||
History
|
||||
-------
|
||||
|
||||
0.2.1 (2011-03-24)
|
||||
++++++++++++++++++
|
||||
|
||||
* Python 2.5 Support
|
||||
* List of available colors
|
||||
|
||||
|
||||
0.2.0 (2011-03-23)
|
||||
++++++++++++++++++
|
||||
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@ from .pipes import piped_in
|
||||
|
||||
|
||||
__title__ = 'clint'
|
||||
__version__ = '0.2.0'
|
||||
__build__ = 0x000200
|
||||
__version__ = '0.2.1'
|
||||
__build__ = 0x000201
|
||||
__author__ = 'Kenneth Reitz'
|
||||
__license__ = 'ISC'
|
||||
__copyright__ = 'Copyright 2011 Kenneth Reitz'
|
||||
|
||||
@@ -9,6 +9,7 @@ This module contains the helper functions for dealing with unix pipes.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import with_statement
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ This module contains all the application resource features of clint.
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import with_statement
|
||||
|
||||
import errno
|
||||
from os import remove, removedirs
|
||||
|
||||
@@ -8,8 +8,6 @@ This module provides the text output helper system.
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
from . import colored
|
||||
from .core import *
|
||||
from core import *
|
||||
|
||||
@@ -16,18 +16,18 @@ import sys
|
||||
|
||||
from ..packages import colorama
|
||||
|
||||
DISABLE_COLOR = False
|
||||
|
||||
if sys.stdout.isatty():
|
||||
colorama.init(autoreset=True)
|
||||
|
||||
|
||||
__all__ = (
|
||||
'red', 'green', 'yellow', 'blue',
|
||||
'black', 'magenta', 'cyan', 'white',
|
||||
'clean', 'disable'
|
||||
)
|
||||
|
||||
COLORS = __all__[:-2]
|
||||
DISABLE_COLOR = False
|
||||
|
||||
if sys.stdout.isatty():
|
||||
colorama.init(autoreset=True)
|
||||
|
||||
|
||||
class ColoredString(object):
|
||||
"""Enhanced string for __len__ operations on Colored output."""
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@ Various Python helpers used within clint.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import with_statement
|
||||
|
||||
import sys
|
||||
import errno
|
||||
@@ -28,7 +29,7 @@ def mkdir_p(path):
|
||||
"""Emulates `mkdir -p` behavior."""
|
||||
try:
|
||||
makedirs(path)
|
||||
except OSError as exc: # Python >2.5
|
||||
except OSError, exc: # Python >2.5
|
||||
if exc.errno == errno.EEXIST:
|
||||
pass
|
||||
else:
|
||||
|
||||
@@ -12,5 +12,5 @@ text = 'THIS TEXT IS COLORED %s!'
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
for color in colored.__all__:
|
||||
for color in colored.COLORS:
|
||||
print getattr(colored, color)(text % color.upper())
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
from clint import piped_in
|
||||
|
||||
@@ -6,6 +6,9 @@ import sys
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
import clint
|
||||
|
||||
|
||||
|
||||
def publish():
|
||||
"""Publish to PyPi"""
|
||||
@@ -19,7 +22,7 @@ required = []
|
||||
|
||||
setup(
|
||||
name='clint',
|
||||
version='0.2.0',
|
||||
version=clint.__version__,
|
||||
description='Python Command-line Application Tools',
|
||||
long_description=open('README.rst').read() + '\n\n' +
|
||||
open('HISTORY.rst').read(),
|
||||
@@ -29,7 +32,6 @@ setup(
|
||||
packages= [
|
||||
'clint',
|
||||
'clint.textui',
|
||||
|
||||
'clint.packages', 'clint.packages.colorama'
|
||||
],
|
||||
install_requires=required,
|
||||
@@ -40,7 +42,7 @@ setup(
|
||||
'Natural Language :: English',
|
||||
'License :: OSI Approved :: ISC License (ISCL)',
|
||||
'Programming Language :: Python',
|
||||
# 'Programming Language :: Python :: 2.5',
|
||||
'Programming Language :: Python :: 2.5',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
# 'Programming Language :: Python :: 3.0',
|
||||
|
||||
Reference in New Issue
Block a user