Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rackodo/PyLayoutTools

Open more actions menu

Repository files navigation

pylayouttools

PyLayoutTools (PLT)

Simple library for organising text into boxes and tables.

Boxes

Wrap strings of text in a simple ASCII box. Define the max width to have the text automatically confine to any terminal width.

Example Code

from PyLayoutTools import pltBox

box = pltBox(
  "This is a box.",
  "It holds a lot of text.",
  "If the text is wider than the maxwidth limit (default 80) it'll wrap the text.",
  "Neat, huh?")
box.maxwidth = 40

print(box())
carbon

Tables

Collate data into a table, with headers.

Example Code

from PyLayoutTools import pltTable

tbl = pltTable(["First Name", "Last Name", "Employee", "Salary"],
  ["Bart", "Simpson", "12345", "$4,500"], 
  ["John", "Smith", "12346", "$5,000"], 
  ["Steven", "Goldfish", "12347", "$5,000"],
  ["Paula", "Brown", "12348", "$3,500"],
  ["James", "Smith", "12349", "$4,500"])

print(tbl())
carbon-2

About

Library for Python Layouts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.