Skip to main content

Simple things that python should have out of the box.

Project description

power_terminal

Things Python should have out of the box.

This package was created when I realised that github copilot was writing most of the code for a terminal controller I was writing by itself. I realised that developers were writing this things by hand.

Usage

Usage

Reference

terminal.introduction(name, version, author)

A short introduction for whatever program you're making.

name: The name of the program.

version: The version of the program.

author: The author of the program, though, when left empty, will use the name of the creator of the package.

terminal.clear()

Clears the terminal, it's the equivalent of 'cls' on Windows' PowerShell or 'clear' in Bash.

terminal.clear() example

terminal.statement(string)

Prints a string in green letters.

terminal.debug(string)

Prints a string in bright yellow, preceded by the "DEBUG: " prefix.

terminal.error(string)

Prints a string in bright red, preceded by the "ERROR: " prefix.

terminal.restart()

Restart's the program. It may be quite useful to avoid the use of while loops in CLI programs.

terminal.progress(done, total, length, string, fill, empty)

Prints a progress bar to the terminal.

done: The number (int) of actions that have been done up to this point.

total: The total number of actions to be done during the execution of the progress bar.

length: The width (in characters, assuming your terminal uses a monospace font) of the progress bar. It's not obligatory.

string: A string to be displayed right below the bar. It's not obligatory.

fill: The character the will fill up the progress bar. By default, it's the "█" character.

empty: The character that will represent the "empty space" yet to be filled in the progress bar. By default, it's an empty string with a space. (" ")

terminal.countdown(string, millisecons)

Counts down in milliseconds.

terminal.confirm(string, error_string)

Asks the user to confirm or deny an action (Y/n).

Credits

Created by Matheus Goulart.

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

powerterminal-0.0.6.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

powerterminal-0.0.6-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file powerterminal-0.0.6.tar.gz.

File metadata

  • Download URL: powerterminal-0.0.6.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.62.3 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for powerterminal-0.0.6.tar.gz
Algorithm Hash digest
SHA256 08b5afbf83214d847faa9da78a91b12865a94bd878aacb5bf62aa03d1e82f3a9
MD5 8e2fe9da850217a23afe10328b3d30eb
BLAKE2b-256 8fd10f724669e3a04874d13b403fb2f10cb247a59d6518e2db6a23580c9a0174

See more details on using hashes here.

File details

Details for the file powerterminal-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: powerterminal-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.62.3 importlib-metadata/4.0.1 keyring/23.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for powerterminal-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2e7b0668ae967f50773fc890e1414f194f3ccec2bb357d11054bfa6b6514d886
MD5 57bd63e2aa0af04c9f53d249c3478a7f
BLAKE2b-256 60a2bf2734e209e084d5ee0c2e6aac229d946e29dbad63e7b4967187493d8782

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