Zope: how far

Arkaitz Bitorika arkaitz at euskalcom.net
Wed May 23 13:17:43 EDT 2001


Hi,

You can't import arbitrary modules from Python Scripts in Zope. If you
want to do that you can use External methods or Python products.
This is very well explained in the Zope Book (look for it in
www.zope.org).
however, you can do what you want in a Python script without using the
time module. Use this:
    context.ZopeTime()
This will give you a Zope DateTime module.
If you have more questions, maybe the zope user mailing list is a better
place to ask, there are more zopistas there than here ;-).

Cheers,
arkaitz.

On 23 May 2001 13:09:08 +0000, Michele Beltrame wrote:
> Hello!
> 
> I'm using Zope and have a problem which makes me wonder how far I
> can go with scripts. OK, I created many "DTML Methods" and "Scripts
> (Python)" which work as long as I do not call something like:
> 
> time.gmtime()
> 
> In this case an "Unauthorized" error is reported when I browse/test
> the created object. An example which gives this error is:
> 
> ---
> import gmtime
> mygmt = time.gmtime(time.time())
> return mygmt
> ---
> 
> What's the problem?
> 
>        Thanks, Michele.
> 
> -- 
> Michele Beltrame
> mb at io.com
> http://www.io.com/~mick/
> ICQ# 76660101
> ==> Sito di it.comp.lang.perl: http://www.perl-it.org
> ==> Sei del triveneto e vuoi unirti ai Perl Mongers? Scrivimi!
> -- 
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list