[pology] pology.catalog.Catalog doubt
Chusslove Illich
caslav.ilic at gmx.net
Sat May 25 05:12:16 PDT 2013
> [: mvillarino :]
> Is there a way to merge_pofile a Catalog object, whose contents come from
> a StringIO (so no path on filesystem) with a pot file with path?
In principle it would be possible to add this capability, but since msgmerge
is used, it would anyway have to be implemented through temporary files. So
one might as well do it like that manually:
from tempfile import NamedTemporaryFile
...
cat = Catalog(...)
...
tmpf = NamedTemporaryFile(prefix="whatever", suffix=".po")
cat.sync(writefh=tmpf, force=True)
tmpf.close()
merge_pofile(tmpf.name, ...)
--
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.nedohodnik.net/pipermail/pology-nedohodnik.net/attachments/20130525/af404b0f/attachment-0002.pgp>
More information about the pology
mailing list