> [EMAIL PROTECTED] On Behalf Of Igor Stroh
> Jaroslav Lukesh wrote:
> > import cStringIO
> > import mimetools
> > import binascii
> [...]
> <dtml-var "'YWxla2liYW5nb0B6dWcuY3o=\n'.decode('base64')">

Thank you - it is exact what I need, but it does not have rights to make
that conversion - see bottom. So only way is now to add this rights into
dtml - via external method only, because in Python script it gives me the
same guard error.


import cStringIO
import mimetools
xe=xemail + '=\n'
print xe.decode('base64')
return printed

Thanks, many thanks, I was little to learn how to use python scripts in zope

So I dive into external method.

Many thanks,JL.

Error from DTML:

  Sorry, a site error occurred.<p>
Traceback (innermost last):
  File D:\zope\251\lib\python\ZPublisher\Publish.py, line 150, in
  File D:\zope\251\lib\python\ZPublisher\Publish.py, line 114, in publish
  File D:\zope\251\lib\python\Zope\__init__.py, line 159, in
    (Object: zzzkusebni)
  File D:\zope\251\lib\python\ZPublisher\Publish.py, line 98, in publish
  File D:\zope\251\lib\python\ZPublisher\mapply.py, line 88, in mapply
    (Object: test)
  File D:\zope\251\lib\python\ZPublisher\Publish.py, line 39, in call_object
    (Object: test)
  File D:\zope\251\lib\python\OFS\DTMLMethod.py, line 127, in __call__
    (Object: test)
  File D:\zope\251\lib\python\DocumentTemplate\DT_String.py, line 473, in
    (Object: test)
  File D:\zope\251\lib\python\DocumentTemplate\DT_Util.py, line 159, in eval
    (Object: 'YWxla2liYW5nb0B6dWcuY3o=\n'.decode('base64'))
  File &lt;string&gt;, line 1, in f
  File D:\zope\251\lib\python\AccessControl\DTML.py, line 29, in
    (Object: test)
  File D:\zope\251\lib\python\AccessControl\ZopeGuards.py, line 47, in
AttributeError: decode

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to