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.8.tar.gz (3.7 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.8-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerterminal-0.0.8.tar.gz
  • Upload date:
  • Size: 3.7 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.8.tar.gz
Algorithm Hash digest
SHA256 24ec1e2ebe71eff464d9abb1e047c3e2045582d6be9e15d00706eca73e2796e2
MD5 f0b6a6071e7546604631729f26859fbc
BLAKE2b-256 c9e962f523395df86bd93406dbab7b078d7fc69d711697dd31eb4ff2fdb23a3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerterminal-0.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 634dc178f308373c329791f67f505ad55046cb4c74d34e54b5bf8a37e5952ba3
MD5 f7a75424521ee04eeae03c383ef34333
BLAKE2b-256 4113ae26f72abc5db405022835973195881ffdfb2cb133acc5529d596b8d0b5d

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