Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
Python is that refactoring is usually really easy. thats a good thing to know. i was originally going to just start out the naive way and refactor as python became more familiar. i think that approach may work best for me - take baby steps and refactor as i my knowledge and experience grows.

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread Tim Golden
mark.a.brand wrote: > Hi Tim: > > Thanks, that was what I was after, but maybe you are right a couple of extra > for loops is not looking too bad after all. The code looks a little scary at first sight but it's not that bad ;) It's one of those things everyone learns to weigh up when they're put

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
Hi Tim: Thanks, that was what I was after, but maybe you are right a couple of extra for loops is not looking too bad after all. Cheers Mark On 11/03/2008, Tim Golden <[EMAIL PROTECTED]> wrote: > > Tim Golden wrote: > [... snip Elixir-based solution ...] > > I realise, rereading my post that it

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
Hi Tim: So what you are saying is that it would be perfectly acceptable to have a "for loop" for each Win32_* query and that there is no good way to generalise that behaviour. eg. class Process() ... class Product() ... class Event() ... class Service() if __name__ == '__main__'

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread Tim Golden
Tim Golden wrote: [... snip Elixir-based solution ...] I realise, rereading my post that it doesn't really solve your concern about multiple loops etc. I doubt it's really a problem, but in the spirit of the question, here's a raw sqlite solution, again Noddy and untested. You've said you're newi

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread Tim Golden
mark.a.brand wrote: > sorry - client as in customer Ah. I see. (Didn't think of that :) > i will try and explain better, but its not quite clear in my mind what is > achievable ... > > so to build up these database tables, i have to have some queries happening > of the form : > > for list in Wi

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
> > hi: > > > Not that it's necessarily wrong, but it's not clear why you're bothering > to pull server information from each client separately. It's not as > though the services running on Server S1 will appear different when > queried from client C1 and C2. But maybe there's something I'm missin

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread Tim Golden
mark.a.brand wrote: > 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. Welcome to the wonderful world of Python :) > purpose of this program: > is to retrieve and store (for historical purposes) system-inf

[python-win32] advice on architecting or program design in python:

2008-03-10 Thread mark.a.brand
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<