[Zope] Zope QuotaFolder -- scripting API ?

cmulcahy@avenirsolutions.com cmulcahy@avenirsolutions.com
Mon, 03 Feb 2003 15:16:14 -0500


Ivo, 

I love your QuotaFolder product and I would like to user it in a python 
script. ( Please forgive me, I am new to zope ) 

I installed QuotaFolder and I can create new QuotaFolder objects from the 
ZMI,
but I would like to use it in a script like: 

try:
  context.manage_addQuotaFolder(username,"Portfolio of %s" % 
username,quota_bytes=10485760,quota_objects=1000,quota_maxsize=0,REQUEST=Non 
e)
except Exception, e:
  print "Create folder failed : %s" % e
  return printed 

or: 

try:
  context.manage_addQuotaFolder(username,"Portfolio of %s" % 
username,10485760,1000,0)
except Exception, e:
  print "Create folder failed in first exception: %s" % e
  return printed 

etc. etc. 

but in every case the script fails to do anything, the 'try' fails and 
throws an Excpetion 'e' that stringifies to "manage_addQuotaFolder" 

Can this be done?  ( I must apologize, my Zope knowledge is at a very early 
stage )  I love the ZMI, but my main interest in Zope is as a Python 
platform. 

tks, 

mulc