17 May
2001
17 May
'01
10:25 a.m.
I followed an sample from "Chapter 12: Extending Zope" of Zope Book however the following pythonscripts didn't work. ================================================== ## Script (Python) "isHungry" ## """ Returns true if the animal hasn't eaten in over 8 hours """ from DateTime import DateTime if (DateTime().timeTime() - self.last_meal_time.timeTime() > 60 * 60 * 8): return 1 else: return 0 ================================================== The problem: "self" not found! I've tried "container", "context" and other possible mixes and still don't have any clue to get it work. Please help. Thank you. Roger.
9091
Age (days ago)
9091
Last active (days ago)
0 comments
1 participants
participants (1)
-
Roger Lam