[Zope] Newbie phthon scripting import q

Dieter Maurer dieter at handshake.de
Sat Mar 20 15:19:19 EST 2004


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



More information about the Zope mailing list