A Python library for making printing cooler with colours and loading bars.
Project description
NonStdOut
(nonstandard output)
by Sushii64
library for making printing cooler
haha get it
Installation
Install using pip like so:
pip install nonstdout
Optionally, clone this repository in the folder of the project and import it locally:
git clone https://github.com/Sushii64/nonstdout
Usage
Import everything from the library:
from nonstdout import *
Each command in the library has docstrings, refer to those to learn how to use the library.
Example Program
from nonstdout import *
clear()
print("-- Text Styling --\n")
print("print()")
print(" normal text")
print("printd()")
printd(" debug text!")
print("printe()")
printe(" error text!")
print("printw()")
printw(" warning text!")
print("prints()")
prints(" success text!")
print()
pause()
clear()
print("-- Loading Bars --\n")
load(15, beg="loading - ")
pause()
load(12, "#", ".", "Loading... [", "]")
pause()
load(5, "O", "o", "im a ghost ", " >:3", 0.3)
pause()
clear()
print("-- Loading Spinners --\n")
spinner(5, before_text="loading ")
pause()
print()
spinner(before_text="downloading 'real' drivers ")
time.sleep(3)
stop_spinner(before_text="downloading 'real' drivers ")
spinner(before_text="installing 'real' drivers ")
time.sleep(2)
stop_spinner(before_text="installing 'real' drivers ")
spinner(before_text="setting up images ")
time.sleep(1)
stop_spinner(before_text="setting up images ")
spinner(before_text="crying in the corner ")
time.sleep(4)
stop_spinner(before_text="crying in the corner ")
spinner(before_text="verifying 'real' drivers ")
time.sleep(2)
stop_spinner(before_text="verifying 'real' drivers ")
spinner(before_text="finalising ")
time.sleep(2)
stop_spinner(before_text="finalising ")
pause()
clear()
print("All done!")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonstdout-1.0.4.tar.gz.
File metadata
- Download URL: nonstdout-1.0.4.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
743a8c0ae4759edfbc34c14a947942a92b83b34a589c96be18109cdca3c17373
|
|
| MD5 |
a326191bebe9f8e3548213bbdb8afb45
|
|
| BLAKE2b-256 |
0a16189655f04cae46d6c2efbb28ad06fc601aaa7e8c96d36e0422b8062d88d3
|
File details
Details for the file nonstdout-1.0.4-py3-none-any.whl.
File metadata
- Download URL: nonstdout-1.0.4-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa0861d342cbe5622b8685d52fb0765fbf3d79dd0f575be338753242c82e25a1
|
|
| MD5 |
c6800410aeb3253cd83b2b9076654595
|
|
| BLAKE2b-256 |
0dce333e477dd9ac51cfe9cf87d0ea9f5f6e578f157759bceeffc287323c5f3f
|