GithubHelp home page GithubHelp logo

dc7303 / pyprnt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kevink1103/pyprnt

0.0 1.0 0.0 36 KB

Python Pretty Printer

Home Page: https://pypi.org/project/pyprnt/

License: MIT License

Python 96.28% Shell 3.72%

pyprnt's Introduction

PyPrnt

PyPI version

PyPrnt helps you to print a list or a dictionary in an organized table form.
Just try it out!
Don't use print() anymore. Use prnt() for the rest of your life :)

How to install

# If you have both Python 2 and 3,
pip3 install pyprnt
# If you only have Python 3,
pip install pyprnt

How to use

from pyprnt import prnt

creation = ["Adam", "Eve"]
menu = {
    "Kimchi": 5000,
    "Ice Cream": 100
}
prnt(creation)
prnt(menu)

You should see this...

┌─┬────┐
│0│Adam│
│1│Eve │
└─┴────┘
┌─────────┬────┐
│Kimchi   │5000│
│Ice Cream│100 │
└─────────┴────┘

And more...

enable: bool (default: True)

Enable prnt() form.

prnt(creation, enable=False)
['Adam', 'Eve']

both: bool (default: False)

Print in both original print() form and prnt() form.

prnt(creation, both=True)
['Adam', 'Eve']
┌─┬────┐
│0│Adam│
│1│Eve │
└─┴────┘

sep: str (default: '')

Put a separator between each input.

prnt("010", "8282", "8282", sep="-")
010-8282-8282

end: str (default: '\n')

Put at the end of an output.

prnt(creation, end="")
prnt("The force is with me")
┌─┬────┐
│0│Adam│
│1│Eve │
└─┴────┘The force is with me

Author

Kevin Kim
Website GitHub LinkedIn

pyprnt's People

Contributors

kevink1103 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.