Skip to main content

Organize your terminal output.

Project description

termwriter-py

Organize your terminal output

Motivation

Dumping a ton of information to the terminal using print() can cause the data you want to see on the screen to scroll up, away from the visible terminal area. This can be particularly frustrating because today's monitors have a lot more horizontal screen space but the data scrolls away vertically. What if print() can better organize the output to maximize the screen real estate?

Example

See example.py for an example code. Below is its output.

================================ Example Output =================================
Some description goes here.

-------- My First Box -------- ----------------- My Second Box ------------------
This is a text box.            This is another text box.
                               You can have a second line
                               and it stays in the second box.

--------------- My Third Box ---------------- ---------- My Fourth Box ----------
This box is to the right of the second box.   This box stretches to fit the row
Unless you have a narrow screen --            because we draw SoftBreak()
then the box wraps to the next row

------- My Fifth Box -------- ------ My Sixth Box ------ ---- My First Table ----
Notice the rows are jusified. You can also have tables.    # First Name Last Name
                                                         --- ---------- ---------
                                                           1 John       Doe
                                                          10 Jane       Doe
                                                         100 John       Public

----- My Eighth Box -----
You can also nest boxes.
Below is a table box.

Name:  John Q. Public
Tel:   +1 111 555 3333
Email: nobody@nowhere.com

Documentation

See documentation.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termwriter-1.0.0.tar.gz (11.2 kB view details)

Uploaded Source

File details

Details for the file termwriter-1.0.0.tar.gz.

File metadata

  • Download URL: termwriter-1.0.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.9

File hashes

Hashes for termwriter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c36ca730c24fe305bdf6b71a2ac48913c79cf203760f76e1c9c7c744758ce56
MD5 f478c3751b758b7f9f9ecb6850323770
BLAKE2b-256 f617a041f1ffad9129e6b5e1c2c85c4c7ba8a3eefbfceb3fd8a534144790abbe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page