Skip to main content

Allows users customization of output colour, spacing, and more

Project description

My Output

An aesthetic replacement to print()


Development Status: Early Development

PyPI

About

MyOutput is a Python package that enables users to customize the appearance of standard output (print) and input prompts in the terminal. Currently, the available customization options include coloured text and additional linebreaks.

Supported colours:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

and their brighter version with the prefix bright and an underscore (ex. bright_black).

Installation

Use the package manager pip to install MyOutput.

pip install myoutput

Usage

import myoutput

# set print output to yellow
myoutput.set_print_colour("yellow")
print("Hello!")  # Output: (yellow text) Hello!

# set input prompts to red
myoutput.set_input_colour("red")
input("Enter your name: ")  # Prompt appears in red

# return current print output colour
print(myoutput.get_print_colour())  # Output: yellow

# return current input prompt colour
print(myoutput.get_input_colour())  # Output: red

# enable additional linebreak after each print
myoutput.set_linebreak(True)
print("Linebreak test")  # Output: (yellow text, with extra linebreak before)

# restore the original print and input function
myoutput.restore_output()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

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

myoutput-0.0.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myoutput-0.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file myoutput-0.0.2.tar.gz.

File metadata

  • Download URL: myoutput-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for myoutput-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8dde0545e9e1d0fe1460f4dfb9faaabbb681ce2b2d16d7dec1bc09e59c75a415
MD5 d2e020bb499eb1831ad1cac927c58369
BLAKE2b-256 65b9744d6449c6c5f9f00776ccfe2f15e5b4b3ecaaa4e772709d8eee9079445c

See more details on using hashes here.

File details

Details for the file myoutput-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: myoutput-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for myoutput-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7bdfdf2b64f72d55e6c1beb0d026004d37c7c6808ca45a6919028f05978e762c
MD5 9d9448c162380a250081077b4d640858
BLAKE2b-256 771147bc9a5a429d7a9cc4a3ab7066f53f774b9063b5cd2fdbfe06c25d034283

See more details on using hashes here.

Supported by

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