Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82243

Solution to a problem,write terminal output to file

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cloverobert@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.050
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'output': 0.05; 'subject:file': 0.07; 'python': 0.11; 'programmatic': 0.16; 'thankfull': 0.16; 'all,': 0.19; 'coding': 0.22; 'script.': 0.24; 'subject:problem': 0.24; 'file.': 0.24; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'that.': 0.31; 'file': 0.32; 'run': 0.32; 'linux': 0.33; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'machine.': 0.36; 'server': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'signal': 0.60; 'you.': 0.62; 'provide': 0.64; 'subject:,': 0.80; 'subject:Solution': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=eEI6y4B/wItg/MPbUKnlmPJwPRAokUOUlrcXt3IyF4M=; b=iwbndDNRvc/GomI1WTz5Ufa30A49FG+GnzVWZbeIevjxQ2GyoZlEE9U9dxcB0YkQjw LJmrpk1Ssoh8N2ygO8hrDtnP+GjG6PSPsEPtbPVAjnSs6cWVUjDVYTLjHHLHWeKv/e8Q GVyFTacfTg0qY8zz/mjHmtjX3ZrOmjAlB4+33uATRzVKiixSRzbX+zp0dBPCVI7zKlDl GTuIid3lweNyfVuQjOL/JITN/Ih3GlXD0xjeS8VRWVndaVmoYSaZHOY9V2cvvieqh6Mc BII+zAcxcKPv+9bnlj7sq010MFxVS8gbpKMS8KVgjA71tTtuXhlLq3QDNz5mdf/qd+1L CRIw==
MIME-Version 1.0
X-Received by 10.182.130.162 with SMTP id of2mr2632628obb.52.1418145064018; Tue, 09 Dec 2014 09:11:04 -0800 (PST)
Date Tue, 9 Dec 2014 22:41:03 +0530
Subject Solution to a problem,write terminal output to file
From Robert Clove <cloverobert@gmail.com>
To python-list@python.org
Content-Type multipart/alternative; boundary=089e013cbb2cc7e8d20509cba054
X-Mailman-Approved-At Tue, 09 Dec 2014 18:42:37 +0100
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16774.1418146959.18130.python-list@python.org> (permalink)
Lines 57
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418146959 news.xs4all.nl 2913 [2001:888:2000:d::a6]:46260
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82243

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Solution to a problem,write terminal output to file Robert Clove <cloverobert@gmail.com> - 2014-12-09 22:41 +0530

csiph-web