[Zope] how to decode base64 in DTML?

Andreas Jung lists at zopyx.com
Thu May 4 14:59:16 EDT 2006



--On 4. Mai 2006 20:42:08 +0200 Jaroslav Lukesh <lukesh at seznam.cz> wrote:

> Hi all,
>
> Would you like to help me with decoding base64 string, please?
>
> I was try many ways (*), but no with success, but
>
> import cStringIO
> import mimetools
> import binascii
> binascii.a2b_base64('YWxla2liYW5nb0B6dWcuY3o=\n')
>
> in commandline python works OK.
>

Move such code inside a PythonScript..such code does not belong into DTML..
it just bad style.

-aj


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060504/3a648aaf/attachment.bin


More information about the Zope mailing list