David Bremner <[EMAIL PROTECTED]> writes: > Reading the output from the shell is not very elegant, to my perl > accustomed eyes. Oh well.
[...] > + elif cookie_type == 'shell': > + # warning, this was written by a perl programmer. > + field=""; > + fin, fout, ferr=os.popen3(cookie_option,"r") > + for line in fout.readlines(): > + line=line.splitlines()[0] > + if (len(field)>0): > + field = field + " " > + field+=line I rewrote this section to be a bit cleaner. Also, I raise an exception if the shell command fails instead of just adding the header with an empty value as yours did. _________________________________________________ tmda-workers mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-workers
