Solution to a problem,write terminal output to file
Robert Clove
cloverobert at gmail.com
Tue Dec 9 12:11:03 EST 2014
Hi All,
I am facing a problem in python coding that is
I have a client server program(programs a re in c code and client and
server are its executable) on Linux machine.
To run client i do this ./strace -c client and to run server i type this
./strace -c server
When i give ctrl+c to client i see some output on the terminal, i want that
output in the file i mean i want to send the ctrl+c signal programmatic
ally to client after a minute and write the output in the file.
if i use subprocess.Popen to execute ./strace -c client and give ctrl+c
signal i don''t see any output on the terminal but if i see os.system to
execute ./strace -c client i see the output on terminal.Now i want to send
the ctrl+c signal to os.system and write the terminal output into a file.
Please help me to do that.
Can you provide a pseudo script.
I will be very thankfull to you.
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141209/a021e2c7/attachment.html>
More information about the Python-list
mailing list