Console Printer
The easiest way to print in the console and in a file.
Functionality
Now its very easy to write messages in the console or in a file to have them as a log.
Usage
Here you have some examples:
# Activate it to print and log
printer = ConsolePrinter(
do_print = True,
do_write_file = True
)
# Will just print something
printer.print(33)
printer.deactivate_print()
# Will not print it
printer.print('message')
# Will not print but log in file
printer.print('in file', 'file.txt')
printer.deactivate_write()
# Will not print nor log it
printer.print('in file', 'file.txt')
# Is singleton, this will work also
ConsolePrinter().activate_write()
# This code below would do the same
# printer.activate_write()
ConsolePrinter().activate_print()
# This will reset the singleton instance
ConsolePrinter(
do_print = True,
do_write_file = True
)
# Will print and log in the file
ConsolePrinter().print('in file', 'file.txt')
# This code below would do the same
# printer.print('in file', 'file.txt')
You can see and try the tests with more examples.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
printer_easy-0.0.2.tar.gz
(4.0 kB
view details)
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 printer_easy-0.0.2.tar.gz.
File metadata
- Download URL: printer_easy-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d81034a65543de2bad136275dfddbf907c2a5e6bd04227c9f3362b8753fcedc6
|
|
| MD5 |
26ab4dc8d52b94575d05245d1482196f
|
|
| BLAKE2b-256 |
8521939e9d2f9bb523b76c4c6b7d1857bb06170d4373d19963959d52f9158e5f
|
File details
Details for the file printer_easy-0.0.2-py3-none-any.whl.
File metadata
- Download URL: printer_easy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1302b01fa503ecae5820602451aaaba4d0bdc19e62b583f0bd4807d9fbb6aaa
|
|
| MD5 |
47f841ce9ec68cd1720a28fc05bbf9da
|
|
| BLAKE2b-256 |
49b281b3cc0946e3c7c922e5d612ead32246b11b14f2ea2c241fd7154732cdf8
|