Skip to main content

screenwriter

Python Library for writing progress texts, echo messages, warnings and errors to standard output

Examples:

1 - Default prefix

from screenwriter import Screenwriter

sw = Screenwriter ()
sw.echo ('my output')
Output:
2019-07-26-11:16:04 my output

2 - Date Time parts in prefix

from screenwriter import Screenwriter

sw = Screenwriter ('%Y-%m-%d %H:%M:%S.%f ')
sw.echo ('my output')
Output:
2019-07-26 11:16:04 my output

3 - Error, Warning & Info standard prefixes

from screenwriter import Screenwriter

sw = Screenwriter ()
sw.error ('an error message')
sw.warn  ('a warming message')
sw.info  ('an informational message')
Output:
2019-07-29-11:39:00 ERROR: an error message
2019-07-29-11:39:00 WARN:  a warming message
2019-07-29-11:39:00 INFO:  an informational message

4 - Trimming content length

By default, log strings are trimmed to 120 chars. You can change this setting:

from screenwriter import Screenwriter

sw = Screenwriter ()
sw.set_maxlen (80) #Set maximum length to 80

5 - Dynamically toggele output

You can toggle the output between ON and OFF.

from screenwriter import Screenwriter

sw = Screenwriter ()
sw.echo ('print this line')
sw.set_verbose (False)
sw.echo ('do not print this line')
sw.set_verbose (True)
sw.echo ('print this line')
Output:
2019-10-05-20:09:10 print this line
2019-10-05-20:09:10 print this line

For format options, see http://strftime.org/

Metadata

Release files for screenwriter 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for screenwriter 1.0.4
File Size Uploaded Provenance Actions
screenwriter-1.0.4.tar.gz 2.1 kB Without provenance Details for screenwriter-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for screenwriter 1.0.4
File Interpreter ABI Platform Actions
screenwriter-1.0.4-py3-none-any.whl Python 3 none any Details for screenwriter-1.0.4-py3-none-any.whl

Total release size: 5.4 kB

Release files / screenwriter-1.0.4.tar.gz

Download URL screenwriter-1.0.4.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
46b20e80d9e2fbf4d1891b48dbe7fbcd545097317c441d9664a33f403dd01745
BLAKE2b-256 checksum
How to use checksums
2b63f9924d6ac04f83579dec820cc630de45b34f5333e0081f8a38a2fde3261c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6

Release files / screenwriter-1.0.4-py3-none-any.whl

Download URL screenwriter-1.0.4-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
215ec30e55f35f393aa9da8e8bae8b1b65d2826e9fe4a1ea846f02abd06b524d
BLAKE2b-256 checksum
How to use checksums
daca1e73a6858340177bb8edb0e1ed71a8b8ef6dbfe500bdadcdec4dcb6e8ffd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6

Security for screenwriter 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page