[Zope] Base64 - Encoding/Decoding without external method
Dragos Chirila
d.chirila at finsiel.ro
Fri Feb 4 08:04:33 EST 2005
Hi
You are not allowed to access base64 modules from python scripts.
A solution for this is to write a small product. In your Products folder
add a folder called let's say GiveAccess and inside add a file __init__.py
The body of the file is:
from AccessControl import allow_module
allow_module('base64')
Restart your Zope. Now you can use base64 in python scripts.
Regards,
Dragos
Andrea Lombardoni wrote:
>
> Hello.
>
> I would like to decode/encode data in base64 without resorting to an
> external Python method.
>
> Every function that I tried to use in a Python script, such as
> mimetools.[encode|decode], binascii.[a2b_base64|b2a_base64],
> base64.[b64encode|b64decode] returns an
> error:
>
> Error Type: Unauthorized
> Error Value: You are not allowed to access encode in this context
>
> Does anyone know a way to do this?
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
More information about the Zope
mailing list