printBuddies


NameprintBuddies JSON
Version 0.4.1 PyPI version JSON
download
home_page
SummaryHandful of utilities to do printing tricks to the terminal.
upload_time2023-01-18 22:57:53
maintainer
docs_urlNone
authorMatt Manes
requires_python>=3.6
license
keywords print printing progressbar terminal
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # printBuddies

A few utilities to do terminal printing tricks. <br>
Install with:
<pre>pip install printBuddies</pre>

Contains one class and three functions: ProgBar, printInPlace, ticker, and clear.<br>
<br>
ProgBar is a self-incrementing, dynamically sized progress bar.<br>
The progress counter and completion values can be manually overriden if desired.<br>
The width of the progress bar is set according to a ratio of the terminal width
so it will be resized automatically if the terminal width is changed.<br>
The display function has a 'returnObject' parameter, allowing ProgBar to be used in comprehensions.<br>
Basic usage:
<pre>
from printBuddies import ProgBar
total = 100
progBar = ProgBar(total=total-1)
for _ in range(total):
    progBar.display()
progBar.reset()
myList = [progBar.display(returnObject=i) for i in range(total)]
</pre>
<br>
printInPlace erases the current line in the terminal and then writes the value of 
the 'string' param to the terminal.<br>
<pre>
from printBuddies import printInPlace
import time
#This will print numbers 0-99 to the terminal with each digit overwriting the last.
for i in range(100):
    printInPlace(i)
    time.sleep(0.1)
</pre>
<br>
ticker prints a list of strings to the terminal with empty lines above and below
such that previous text in the terminal is no longer visible.<br>
Visually, It functions as a multi-line version of printInPlace.<br>
<pre>
from printBuddies import ticker
import time
#This will produce visually the same output as the above example
for i in range(100):
    ticker([i])
    time.sleep(0.1)
</pre>
<br>
A call to clear() simply clears the current line from the terminal.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "printBuddies",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "print,printing,progressbar,terminal",
    "author": "Matt Manes",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a2/66/e95d0b79527aecd95c67eac667673761891dc8c575ec34472903de8142b1/printbuddies-0.4.1.tar.gz",
    "platform": null,
    "description": "# printBuddies\n\nA few utilities to do terminal printing tricks. <br>\nInstall with:\n<pre>pip install printBuddies</pre>\n\nContains one class and three functions: ProgBar, printInPlace, ticker, and clear.<br>\n<br>\nProgBar is a self-incrementing, dynamically sized progress bar.<br>\nThe progress counter and completion values can be manually overriden if desired.<br>\nThe width of the progress bar is set according to a ratio of the terminal width\nso it will be resized automatically if the terminal width is changed.<br>\nThe display function has a 'returnObject' parameter, allowing ProgBar to be used in comprehensions.<br>\nBasic usage:\n<pre>\nfrom printBuddies import ProgBar\ntotal = 100\nprogBar = ProgBar(total=total-1)\nfor _ in range(total):\n    progBar.display()\nprogBar.reset()\nmyList = [progBar.display(returnObject=i) for i in range(total)]\n</pre>\n<br>\nprintInPlace erases the current line in the terminal and then writes the value of \nthe 'string' param to the terminal.<br>\n<pre>\nfrom printBuddies import printInPlace\nimport time\n#This will print numbers 0-99 to the terminal with each digit overwriting the last.\nfor i in range(100):\n    printInPlace(i)\n    time.sleep(0.1)\n</pre>\n<br>\nticker prints a list of strings to the terminal with empty lines above and below\nsuch that previous text in the terminal is no longer visible.<br>\nVisually, It functions as a multi-line version of printInPlace.<br>\n<pre>\nfrom printBuddies import ticker\nimport time\n#This will produce visually the same output as the above example\nfor i in range(100):\n    ticker([i])\n    time.sleep(0.1)\n</pre>\n<br>\nA call to clear() simply clears the current line from the terminal.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Handful of utilities to do printing tricks to the terminal.",
    "version": "0.4.1",
    "split_keywords": [
        "print",
        "printing",
        "progressbar",
        "terminal"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f85df3dbf7833487218ca09875a831f5495fe007057090eb41f9a57860e0255",
                "md5": "845a26014802b034855999ab7b322f86",
                "sha256": "74e9118149a0c936ed68409e125fc418e4efe9dfa5e1a57595461c27df407b32"
            },
            "downloads": -1,
            "filename": "printbuddies-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "845a26014802b034855999ab7b322f86",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5075,
            "upload_time": "2023-01-18T22:57:51",
            "upload_time_iso_8601": "2023-01-18T22:57:51.412686Z",
            "url": "https://files.pythonhosted.org/packages/4f/85/df3dbf7833487218ca09875a831f5495fe007057090eb41f9a57860e0255/printbuddies-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a266e95d0b79527aecd95c67eac667673761891dc8c575ec34472903de8142b1",
                "md5": "e14eb7a3ca674ffcdc2c88017d590678",
                "sha256": "48f282ed4c1c3e4dc3f82c3f7427e941abc98f41ca5cbbec8251f16123442cbe"
            },
            "downloads": -1,
            "filename": "printbuddies-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e14eb7a3ca674ffcdc2c88017d590678",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8231,
            "upload_time": "2023-01-18T22:57:53",
            "upload_time_iso_8601": "2023-01-18T22:57:53.319971Z",
            "url": "https://files.pythonhosted.org/packages/a2/66/e95d0b79527aecd95c67eac667673761891dc8c575ec34472903de8142b1/printbuddies-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-18 22:57:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "printbuddies"
}
        
Elapsed time: 0.05147s