Python printer configurations.
Project description
In development
In the mean time, here are some tips to help you get started:
from confprint import prefix_printer
p_test1 = prefix_printer(prefix="test1")
p_test1("Preset")
p_test2 = prefix_printer(prefix="test2", upper=False)
p_test2("unaltered text")
p_test3 = prefix_printer(prefix="test3", stderr=True)
p_test3("using sys.stderr.write as the print function")
p_test4 = prefix_printer(prefix="test4", click=True)
p_test4("using click.echo as the print function")
p_test5 = prefix_printer(prefix="test5", frame_left="( ", frame_right=" )")
p_test5("using custom frame characters")
p_test1(
"""With new lines in strings the text is converted
to multiline, then all but the first are
indented to line up with therest."""
)
p_test1(
"The next example wil not be ending with a `:`, "
"since it has no input.\nAnd as you can see, this is also a multiline text."
)
p_done()
Output:
[TEST1]: Preset
[test2]: unaltered text
[TEST3]: using sys.stderr.write as the print function
[TEST4]: using click.echo as the print function
( TEST5 ): using custom frame characters
[TEST1]: With new lines in strings the text is converted
to multiline, then all but the first are
indented to line up with therest.
[TEST1]: The next example wil not be ending with a `:`, since it has no input.
And as you can see, this is also a multiline text.
[DONE]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
confprint-0.1.1.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for confprint-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb763d87ecce0238d2019ee4fe05e1f44e2c8bde88b207ccc4e2b0f71cb400a4 |
|
MD5 | a0edcb0c82e8b903731ddbc91673e672 |
|
BLAKE2b-256 | 907894acb7a59cfce49650297541f22ab36ec8d22ae936ae38354e7e7593b80a |