CJK Format
This Python 3 module provides utility functions for formatting fixed-width CJK strings. One of the most important features of tihs module is to align Latin and CJK characters using %{width}s specifiers. For example, the following lines
print('%-10s|%-10s|' % ('ab', 'cd'))
print('%-10s|%-10s|' % ('가나다라', '마바사아'))
will print misaligned lines between Latin and CJK characters even with the %-10s specifiers.
Now, using this module's f() function, the above example would be
from cjkformat import f
print(f('%-10s|%-10s|', 'ab', 'cd'))
print(f('%-10s|%-10s|', '가나다라', '마바사아'))
which will print nicely aligned output.
The module also defines a shortcut function printf() to minic the same function in the C language. For example,
from cjkformat import printf
printf('%-10s|%-10s|\n', 'ab', 'cd')
printf('%-10s|%-10s|\n', '가나다라', '마바사아')
For more information, please visit the GitHub repository.
Metadata
Release files for cjkformat 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cjkformat-0.1.1.tar.gz | 2.8 kB | Without provenance | Details for cjkformat-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cjkformat-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for cjkformat-0.1.1-py3-none-any.whl |
Total release size: 18.4 kB
Release files / cjkformat-0.1.1.tar.gz
| Download URL | cjkformat-0.1.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
856ad7d7adc1806643d9f6b7bd33fc3a6e527e37235e29483ec03a9cee878ab3
|
|
BLAKE2b-256 checksum How to use checksums |
b00b6ee8994104d82a3629ca9a5c47c37eef4588cc5a55c10ca17145723c84f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.2
|
Release files / cjkformat-0.1.1-py3-none-any.whl
| Download URL | cjkformat-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4598b06fd76a8b305d0f5b7639c66dbc9a8326334e41e6377edbdda80f182d85
|
|
BLAKE2b-256 checksum How to use checksums |
4bafed336e4f0a89b99bb6b00cac22fc9c13937f97c1c84cf6384ad2155bad1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.2
|
Security for cjkformat 0.1.1
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.