Python to open command script file

dave rose s_david_rose at
Thu Dec 11 19:04:27 CET 2008

Hello all
 I would like to know how to do the following.  I'd like to have a generic 
python program that the user will open a command-script file to do actions.

So, my python program will get a list of servers, enumerate them within a 
checklistbox in wxpython.  Then I want to open a command-file that will run 
against each selected server that will look like this:

copy from c:\source to u:\target
copy all     from c:\source to u:\target
unload netshld from server1
-------------------------END SAMPLE----------------------

(where I have a class serverfuncs, where I can:
s = serverfuncs()
s.unload('<module>', '<server>')

Really, I can do all the actions, but I don't know how to trigger them from an 
independent script file.


More information about the Python-list mailing list