rspolib 0.1.0

Creator: bradpython12

Last updated:

0 purchases

rspolib 0.1.0 Image
rspolib 0.1.0 Images

Languages

Categories

Add to Cart

Description:

rspolib 0.1.0

rspolib

Python bindings for the Rust crate rspolib. Check the reference for more information.
Install

pip install rspolib

Usage
Read and save a PO file
import rspolib

try:
po = rspolib.pofile("path/to/file.po")
except rspolib.SyntaxError as e:
print(e)
exit(1)

for entry in po:
print(entry.msgid)

po.save("path/to/other/file.po")

Read and save a MO file
import rspolib

try:
mo = rspolib.mofile("path/to/file.mo")
except rspolib.IOError as e:
print(e)
exit(1)

for entry in mo:
print(entry.msgid)

mo.save("path/to/other/file.mo")

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.