Using python to call .bat files

Jürgen Hermann jh at web.de
Tue Jan 23 18:41:38 EST 2001


"James Lockley" <jpl at global.co.za> schrieb im Newsbeitrag
news:94l44i$10km$1 at news.adamastor.ac.za...
>         list=os.popen(path).readlines()

Try

cmd = os.popen(path)
list = cmd.readlines()
result = cmd.close() # This is the return code of the program!

Note that getting a return code implies the program is done. ;)





More information about the Python-list mailing list