[Zope] Sum up a property from several objects
ender
kthangavelu@earthlink.net
Mon, 9 Jul 2001 06:04:09 -0700
On Monday 09 July 2001 07:58, Gitte Wange wrote:
>>Now I have the nicests stats of my computers at my website :-)))
>>
>>I have been wondering if it is possible in python to make system calls (I
>> did it with PHP). But it was only for the machine that the script ran on.
yes, although personally i'm not a big fan of forking processes from zope,
if you want examples in existing products, ZCVSMixin does this to wrap the
commandline cvs and probably PHPObject.
check out the popen(1-2-3) commands in the python lib reference on python.org
>>
>>It found the machines uptime and printed it out.
>>
>>Could I - just philosophy - in python, write a script that calls different
>>machines (perhaps via SNMP) and gets their uptime, hard ware numbers (such
>> as RAM, CPU, Harddisk etc) ???
yes, this is probably more elegant. there are three python snmp libraries, of
which two are being developed, i think their all hosted on sourceforge, none
of them support v3 afaik. if you're going to poll you should make your
connections volatile attributes (start names with _v_) or you'll run afoul of
persistence semantics.
btw. there was a paper on using the www.sf.net/projects/pysnmp project at
python9.org
cheers
kapil
cheers
kapil