20 Mar
2004
20 Mar
'04
8:19 p.m.
Sid Hegde wrote at 2004-3-19 22:22 -0800:
I have to do this college project on Zope and Python, so I was just messing with ZMI. I am trying to create a new Python script, but I get this error
Error Type: ImportError Error Value: import of "yy" from "DateTime" is unauthorized. You are not allowed to access yy in this context The script that causes this error is below from DateTime import yy
"yy" is a method of "DateTime" instances. It is not found in the "DateTime" package. To use "yy", you would do something like: from DateTime import DateTime # the "DateTime" class myDate = DateTime(...) # create a "DateTime" instance ... myDate.yy() ... # access the intance's "yy" method -- Dieter