[python-win32] Domain iteration (for the archive and general
knowledge).
Sean
null-python-win32 at tinfoilhat.ca
Thu Aug 28 10:45:08 EDT 2003
->Brilliant! It's running on my machine now with only a couple of changes:
->
->1) The final line is lacking a trailing
-> double-quote (cut-and-paste error?)
->2) The is_responding () call in the
-> preantepenultimate line (!) -- the fourth
-> from the bottom -- needs to be is_responding (machine)
->
I'm sure there was at least one error in that. :)
In my actual code base I put all this into a class and made sure to cache
the available hosts so multiple calls won't take years to run. I'm using
it to deal with more than 200 machines and a very dirty and unmaintained
"Server Manager" table so iterations are pretty darned slow (my best guess
is due to using popen("ping....) so often ).
It's been extremely helpful as of late when managment asks me how many
nVidia cards we have or how many machines have less than 2GB of RAM. Just
yesterday I used it to find out which machines had a drive incorrectly
mapped or not at all. By hand this would have taken our tech at least a
full day instead of five minutes by the script so I don't mind waiting for
it when the results are worth it. Not to mention our tech's work load is
more manageable.
->Thanks very much.
->
No problem, glad it helped though since it's in the archive some poor sap
like myself won't have to spend the day figuring this out. :)
I want to refine this more so if you can think of anything I should fix or
add let me know.
--
Sean
More information about the Python-win32
mailing list