Skip to main content

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)

Uploaded Source

Built Distribution

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

printer_easy-0.0.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for printer_easy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d81034a65543de2bad136275dfddbf907c2a5e6bd04227c9f3362b8753fcedc6
MD5 26ab4dc8d52b94575d05245d1482196f
BLAKE2b-256 8521939e9d2f9bb523b76c4c6b7d1857bb06170d4373d19963959d52f9158e5f

See more details on using hashes here.

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

Hashes for printer_easy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f1302b01fa503ecae5820602451aaaba4d0bdc19e62b583f0bd4807d9fbb6aaa
MD5 47f841ce9ec68cd1720a28fc05bbf9da
BLAKE2b-256 49b281b3cc0946e3c7c922e5d612ead32246b11b14f2ea2c241fd7154732cdf8

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 Sentry Error logging StatusPage Status page