Potential PythonScript bug (was: Re: [Zope] question about
manipulating zcatalog query results)
Dieter Maurer
dieter at handshake.de
Mon Apr 4 13:48:45 EDT 2005
Ira Sher wrote at 2005-4-3 13:32 -0700:
> ... "NameError: global name _getiter_ not defined"...
>if sorton == 'id':
> res=[(row.id.split().pop(), row) for row in results]
>res.sort()
>return res
>
>This doesn't work, either, in zope 2.7.4 or 2.7.5 with python 2.3.4
>and 2.3.5 respectively, as far as I can see.
>
>Thanks for taking a look at things--I'll file a bug report (this is
>stopping me from migrating a site into 2.7) as you suggested
The strange thing is that I can do:
return [o.id for o in container.Catalog()]
without a problem.
However, I am still using Zope 2.7.2 -- the version
before the last security shakeup...
If your script does not need security checks, than
my "TrustedExecutables" might help you. It provides
"PythonScript"s without any security restrictions -- and
especially without the need for "_getiter_".
<http://www.dieter.handshake.de/pyprojects/zope>
--
Dieter
More information about the Zope
mailing list