Re: First python script in zope - import problem (permissions)
22 Dec
2001
22 Dec
'01
6:39 a.m.
Joshua Lanza wrote:
I have created a new script object called get_timestamp. I put the following code in there:
import time return int(time.time())
When I try to test it, I get user and password prompt and Unauthorized. Something else I need to do?=20
I don't think you can do time-based stuff in a Python script in Zope. On p. 153 of the Zope Book, it outlines the fairly tight restrictions on what you can import into Python from inside Zope and the time stuff is not listed. You _can_ do this with an External Method, assuming you have proper access rights to the outside-Zope portion of your server. -- Dan Shafer, Author-Consultant http://www.danshafer.com http://www.shafermedia.com
8870
Age (days ago)
8870
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dan Shafer