Strings that ignore part of themselves.
from ghostr import ANSISGRGhoStr as gstr
test = '\x1b[38;5;6mHello\x1b[38;5;10m there! Th\x1b[38;5;9mis is \x1b[7ma {0} demon\x1b[90mstration of the libr\x1b[0mary\'s \x1b[38;5;12m\x1b[4mcapabilities\x1b[0m!'
print('1)', test)
test = gstr(test).format('\x1b[3m\x1b[38;5;11mcool')
print('2)', test)
test = gstr(test)[:21] + gstr(test)[45:]
print('3)', test)
Installing
pip3 install survey
Links
Check out the documentation for more info.
Metadata
Release files for ghostr 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ghostr-0.1.2.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ghostr-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.6 kB
Release files / ghostr-0.1.2.tar.gz
| Download URL | ghostr-0.1.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8d1f09d22b80bea108f6e5d695846b3b50be8ae0d6cd14caafc0a47e0b315c9
|
|
BLAKE2b-256 checksum How to use checksums |
a1ca1425b20966182a4f4f254bf7526b2f11190be9ddbf1621b69d45609c018a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Release files / ghostr-0.1.2-py3-none-any.whl
| Download URL | ghostr-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d226143f1ba430a44c7e8d33cf31264e9055138d96488dcdcfb3f5d2a800c4c
|
|
BLAKE2b-256 checksum How to use checksums |
c2ded1f75c9b950126584c655d1c630f97e3822c9f891abb2d892f1fbaddb37b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|