METADATA 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. Metadata-Version: 2.0
  2. Name: termcolor
  3. Version: 1.1.0
  4. Summary: ANSII Color formatting for output in terminal.
  5. Home-page: http://pypi.python.org/pypi/termcolor
  6. Author: Konstantin Lepa
  7. Author-email: konstantin.lepa@gmail.com
  8. License: MIT
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Environment :: Console
  12. Classifier: Intended Audience :: Developers
  13. Classifier: License :: OSI Approved :: MIT License
  14. Classifier: Operating System :: OS Independent
  15. Classifier: Programming Language :: Python
  16. Classifier: Topic :: Terminals
  17. Example
  18. =======
  19. ::
  20. import sys
  21. from termcolor import colored, cprint
  22. text = colored('Hello, World!', 'red', attrs=['reverse', 'blink'])
  23. print(text)
  24. cprint('Hello, World!', 'green', 'on_red')
  25. print_red_on_cyan = lambda x: cprint(x, 'red', 'on_cyan')
  26. print_red_on_cyan('Hello, World!')
  27. print_red_on_cyan('Hello, Universe!')
  28. for i in range(10):
  29. cprint(i, 'magenta', end=' ')
  30. cprint("Attention!", 'red', attrs=['bold'], file=sys.stderr)
  31. Text Properties
  32. ===============
  33. Text colors:
  34. - grey
  35. - red
  36. - green
  37. - yellow
  38. - blue
  39. - magenta
  40. - cyan
  41. - white
  42. Text highlights:
  43. - on_grey
  44. - on_red
  45. - on_green
  46. - on_yellow
  47. - on_blue
  48. - on_magenta
  49. - on_cyan
  50. - on_white
  51. Attributes:
  52. - bold
  53. - dark
  54. - underline
  55. - blink
  56. - reverse
  57. - concealed
  58. Terminal properties
  59. ===================
  60. ============ ======= ==== ========= ========== ======= =========
  61. Terminal bold dark underline blink reverse concealed
  62. ------------ ------- ---- --------- ---------- ------- ---------
  63. xterm yes no yes bold yes yes
  64. linux yes yes bold yes yes no
  65. rxvt yes no yes bold/black yes no
  66. dtterm yes yes yes reverse yes yes
  67. teraterm reverse no yes rev/red yes no
  68. aixterm normal no yes no yes yes
  69. PuTTY color no yes no yes no
  70. Windows no no no no yes no
  71. Cygwin SSH yes no color color color yes
  72. Mac Terminal yes no yes yes yes yes
  73. ============ ======= ==== ========= ========== ======= =========
  74. CHANGES
  75. =======
  76. 1.1.0 (13.01.2011)
  77. ------------------
  78. - Added cprint function.
  79. 1.0.1 (13.01.2011)
  80. ------------------
  81. - Updated README.rst.
  82. 1.0.0 (13.01.2011)
  83. ------------------
  84. - Changed license to MIT.
  85. - Updated copyright.
  86. - Refactored source code.
  87. 0.2 (07.09.2010)
  88. ----------------
  89. - Added support of Python 3.x.
  90. 0.1.2 (04.06.2009)
  91. ------------------
  92. - Fixed bold characters. (Thanks Tibor Fekete)
  93. 0.1.1 (05.03.2009)
  94. ------------------
  95. - Some refactoring.
  96. - Updated copyright.
  97. - Fixed reset colors.
  98. - Updated documentation.
  99. 0.1 (09.06.2008)
  100. ----------------
  101. - Initial release.