[egenix-users] mxDateTime and Script(python) in Zope 2.5.1
robin abbi
rra42 at yahoo.co.uk
Tue Mar 30 16:50:01 CEST 2004
> > Is it possible to access mxDateTime from a
> > Script(Python) or must I use External Methods?
>
> Yes, you can make any kind of Python module
> available to your scripts. See
> the README in the PythonScripts folder.
>
1. in $ZOPEDIR/lib/python/Products/ created
GlobalModules
2. created __init__.py with
allow_modules('mx.DateTime')
3. restarted zope
4. created python script:
from mx.DateTime import mxDateTime
eod=mxDateTime.now()
print eod
return printed
5. Called script.
Error: You are not allowed to access now in this
context.
I've tried a wide range of variations on the
allow_modules argument
: 'mx', 'mx.DateTime', 'mx.DateTime.mxDateTime'
including combinations of the above, with restarts and
enough deliberate errors to know that the __init__.py
script is being read.
I must be overlooking something obvious.
Any help gratefully received.
Thanks,
rob
________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.
Go to: http://in.insurance.yahoo.com/licspecial/index.html
More information about the egenix-users
mailing list