WMI in Python

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Fri Sep 17 03:47:22 CEST 2010

In message
<257b2d99-03d4-491b-8f8b-dccd2bc102a7 at p22g2000pre.googlegroups.com>, alex23 

> Lawrence D'Oliveiro <l... at geek-central.gen.new_zealand> wrote:
>> Why not just call Scriptomatic directly from within the Python script,
>> then?
> Because Scriptomatic _generates scripts to access WMI_, that's what it
> _does_.

Precisely why I suggested running it on the fly. Because machine-generated 
code has no place in a source file to be maintained by a human.

> Are you _seriously_ advocating writing Python code to fire up
> a Windows application, programmatically manipulating a GUI to generate
> more Python code for your original script to import or exec?

If that’s the only way you can use Scriptomatic, then the stupidity lies 
with the one who suggested using such a brain-dead tool in the first place.

> As you've made your disdain for Windows _perfectly_ clear through your
> incessant sniping on this list, I think I'm pretty safe in saying you
> have no idea of the quality of Scriptomatic's output.

The quality of the output is not at issue here. The point is that it is 
machine-generated from an input command, therefore it makes sense from a 
maintenance viewpoint to keep the input command, not the machine-generated 
output, in the source file, and simply generate the latter from the former 
as part of the build process.

Unfortunately, as you have made abundantly clear above, Scriptomatic is a 
GUI-only tool, totally unsuited to this sort of use.

More information about the Python-list mailing list