On Jun 3, 11:04 pm, [EMAIL PROTECTED] wrote: > I'm trying to perform following type of operation from inside a python > script. > 1. Open an application shell (basically a tcl ) > 2. Run some commands on that shell and get outputs from each command > 3. Close the shell [...] > Following is my code: > > from subprocess import * > p2 = Popen('qdl_tcl',stdin=PIPE,stdout=PIPE) > o,e = p2.communicate(input='qdl_help \n qdl_read \n > qdl_reg_group_list ') > > Please suggest a way to perform it interactively with killing the > process each time I want to communicate with it.
Here's what you need: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 Cheers, Nicola Musatti -- http://mail.python.org/mailman/listinfo/python-list