hi:

i am new to python and wish but am writing a program as both a learning
experience and which may even get used if it is any good.

purpose of this program:
is to retrieve and store (for historical purposes) system-info for multiple
clients about multiple windows servers using tim golden's
wmi<http://tgolden.sc.sabren.com/python/wmi.html>wrapper. broadly the
algorithm is something like this.

for each client
    for each server
        get-info(Win32_Process()))
        get-info(get-Win32_Service())
        ...
        ...
        write-system-info (to-a-db)
    endfor
endfor

a call to any of these Win32_* classes returns a list of 1..n instances
which have a varying number of attributes. eg Win32_Process will have
attributes about processes, and Win32_Service() will have attributes about
services.

i'am pretty sure i will need to have a seperate table for each server
component (eg a services table which contains historical info about
services, and a process table which contains historical info about
processes).

but is appears to me there is there is a lot of duplication as each class
always returns a list of instances - the only thing  different is the name
of the class (eg. Win32_Service() as opposed to Win32_Process()) and the
attributes returned by those classes.

so the things i am confused about:
* what would be an appropriate class structure
* is it possible to wrap somehow all the calls to the different Win32
classes and then do something with each different set of attributes that are
returned.

apologies - if this request seems vague, i can illuminate if asked specific
questions.

thanks
mark
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to