python-termstyle


Namepython-termstyle JSON
Version 0.1.10 PyPI version JSON
download
home_pagehttp://gfxmonk.net/dist/0install/python-termstyle.xml
Summaryconsole colouring for python
upload_time2013-07-18 22:21:06
maintainer
docs_urlNone
authorUNKNOWN
requires_pythonNone
licenseBSD
keywords output colour console ansi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: http://gfxmonk.net/dist/status/project/termstyle.png

=========
termstyle
=========

termstyle is a simple python library for adding coloured output to
terminal (console) programs.  The definitions come from ECMA-048_, the
"Control Functions for Coded Character Sets" standard.


Example Usage:
--------------
::

	from termstyle import *
	print "%s:%s" % (red('Hey'), green('how are you?'))
	print blue('How ', bold('you'), ' doin?')

or, you can use a colour just as a string::

	print "%sBlue!%s" % (blue, reset)

Styles:
-------
::

	reset or default (no colour / style)

colour::

	black
	red
	green
	yellow
	blue
	magenta
	cyan
	white

background colour::

	bg_black
	bg_red
	bg_green
	bg_yellow
	bg_blue
	bg_magenta
	bg_cyan
	bg_white
	bg_default

In terminals supporting transparency ``bg_default`` is often used to set
the background to transparent [#]_.

weight::

	bold
	inverted

style::

	italic
	underscore

Controls:
---------
::

	auto() - sets colouring on only if sys.stdout is a terminal
	disabe() - disable colours
	enable() - enable colours

.. [#] Supporting terminals include rxvt-unicode_, and Eterm_.

.. _ECMA-048: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf
.. _rxvt-unicode: http://software.schmorp.de/
.. _Eterm: http://www.eterm.org/
.. _zero-install: http://0install.net/
            

Raw data

            {
    "_id": null,
    "home_page": "http://gfxmonk.net/dist/0install/python-termstyle.xml",
    "name": "python-termstyle",
    "maintainer": "",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "",
    "keywords": "output colour console ansi",
    "author": "UNKNOWN",
    "author_email": "UNKNOWN",
    "download_url": "https://files.pythonhosted.org/packages/b3/b0/97086bb087d660cbdb9c0b0dbaa0548ebd9ba9d5e4701bc09b862228110d/python-termstyle-0.1.10.tar.gz",
    "platform": "UNKNOWN",
    "description": ".. image:: http://gfxmonk.net/dist/status/project/termstyle.png\r\n\r\n=========\r\ntermstyle\r\n=========\r\n\r\ntermstyle is a simple python library for adding coloured output to\r\nterminal (console) programs.  The definitions come from ECMA-048_, the\r\n\"Control Functions for Coded Character Sets\" standard.\r\n\r\n\r\nExample Usage:\r\n--------------\r\n::\r\n\r\n\tfrom termstyle import *\r\n\tprint \"%s:%s\" % (red('Hey'), green('how are you?'))\r\n\tprint blue('How ', bold('you'), ' doin?')\r\n\r\nor, you can use a colour just as a string::\r\n\r\n\tprint \"%sBlue!%s\" % (blue, reset)\r\n\r\nStyles:\r\n-------\r\n::\r\n\r\n\treset or default (no colour / style)\r\n\r\ncolour::\r\n\r\n\tblack\r\n\tred\r\n\tgreen\r\n\tyellow\r\n\tblue\r\n\tmagenta\r\n\tcyan\r\n\twhite\r\n\r\nbackground colour::\r\n\r\n\tbg_black\r\n\tbg_red\r\n\tbg_green\r\n\tbg_yellow\r\n\tbg_blue\r\n\tbg_magenta\r\n\tbg_cyan\r\n\tbg_white\r\n\tbg_default\r\n\r\nIn terminals supporting transparency ``bg_default`` is often used to set\r\nthe background to transparent [#]_.\r\n\r\nweight::\r\n\r\n\tbold\r\n\tinverted\r\n\r\nstyle::\r\n\r\n\titalic\r\n\tunderscore\r\n\r\nControls:\r\n---------\r\n::\r\n\r\n\tauto() - sets colouring on only if sys.stdout is a terminal\r\n\tdisabe() - disable colours\r\n\tenable() - enable colours\r\n\r\n.. [#] Supporting terminals include rxvt-unicode_, and Eterm_.\r\n\r\n.. _ECMA-048: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf\r\n.. _rxvt-unicode: http://software.schmorp.de/\r\n.. _Eterm: http://www.eterm.org/\r\n.. _zero-install: http://0install.net/",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "console colouring for python",
    "version": "0.1.10",
    "project_urls": {
        "Download": "http://gfxmonk.net/dist/0install/impl/python-termstyle/python-termstyle-0.1.10.tgz#md5=1ffe4a4fa86448f2a5fec0036ae21802",
        "Homepage": "http://gfxmonk.net/dist/0install/python-termstyle.xml"
    },
    "split_keywords": [
        "output",
        "colour",
        "console",
        "ansi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3b097086bb087d660cbdb9c0b0dbaa0548ebd9ba9d5e4701bc09b862228110d",
                "md5": "1b227cebbeda209029252420af72e5c7",
                "sha256": "f42a6bb16fbfc5e2c66d553e7ad46524ea833872f75ee5d827c15115fafc94e2"
            },
            "downloads": -1,
            "filename": "python-termstyle-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "1b227cebbeda209029252420af72e5c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4131,
            "upload_time": "2013-07-18T22:21:06",
            "upload_time_iso_8601": "2013-07-18T22:21:06.262126Z",
            "url": "https://files.pythonhosted.org/packages/b3/b0/97086bb087d660cbdb9c0b0dbaa0548ebd9ba9d5e4701bc09b862228110d/python-termstyle-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3ec47c1b7b91e948cc67e23bd496225f80ff8896d4fa82800cadb3674068dd8",
                "md5": "1ffe4a4fa86448f2a5fec0036ae21802",
                "sha256": "6faf42ba42f2826c38cf70dacb3ac51f248a418e48afc0e36593df11cf3ab1d2"
            },
            "downloads": -1,
            "filename": "python-termstyle-0.1.10.tgz",
            "has_sig": false,
            "md5_digest": "1ffe4a4fa86448f2a5fec0036ae21802",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2903,
            "upload_time": "2013-07-18T22:13:46",
            "upload_time_iso_8601": "2013-07-18T22:13:46.512517Z",
            "url": "https://files.pythonhosted.org/packages/d3/ec/47c1b7b91e948cc67e23bd496225f80ff8896d4fa82800cadb3674068dd8/python-termstyle-0.1.10.tgz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2013-07-18 22:21:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "python-termstyle"
}
        
Elapsed time: 3.21116s