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


Groups > comp.lang.python > #83311

Playing with threads

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ganesh1pal@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.055
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'string': 0.09; 'exit': 0.09; 'grep': 0.16; 'stdout': 0.16; 'subject:threads': 0.16; 'trying': 0.19; 'command': 0.22; 'print': 0.22; 'questions:': 0.24; 'header:In-Reply-To:1': 0.27; 'friends,': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'running': 0.33; 'subject:with': 0.35; 'received:google.com': 0.35; 'step': 0.37; 'to:addr:python-list': 0.38; 'flow': 0.39; 'to:addr:python.org': 0.39; 'success': 0.61; 'simple': 0.61; 'become': 0.64; 'ing': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=nfLWMUJ1GkANbPLb+QyFRklTOh9/7hKBb2R0U9lrHOk=; b=okyBt8dI+Bnuf/qoYRj9exfwYMiQeYIl4GWV9dBwQ/mXp1H+oiHPlkTLRgPr4nBsjB Gyfqvhhg5mgceVOxR6qdMJqoZD1DxbVyULupF4yhQn1qVR6tCa6wzOFDpd8O9MhdtpUL agSU1G0cyZ63bTNAfW4wPxCt9L/tkvliUOZcBAk1I8dn0CcyQ2UNpR3BHqlGZHGbIO0K 4LPAeEz2z4CzUwSgvOLuPDFY+uT/pkljv3nUTm4YrUm80SVnDBlhNHRuggb3MxmUVtaA rXvCFcKUSDjeVAuAXbCuB6FqVTPrAQfiDBM7+E+AigZZ1Qm7hUWiE2TSpSamDAFtPrsb JK4Q==
MIME-Version 1.0
X-Received by 10.152.6.132 with SMTP id b4mr9716975laa.59.1420682441660; Wed, 07 Jan 2015 18:00:41 -0800 (PST)
In-Reply-To <CACT3xuUzuMH1CF3AsakdGMwa3U3BX3N+nA1ZVy4NhVmnA9-6gw@mail.gmail.com>
References <CACT3xuUzuMH1CF3AsakdGMwa3U3BX3N+nA1ZVy4NhVmnA9-6gw@mail.gmail.com>
Date Thu, 8 Jan 2015 07:30:41 +0530
Subject Playing with threads
From Ganesh Pal <ganesh1pal@gmail.com>
To python-list@python.org
Content-Type multipart/alternative; boundary=089e014941e6462064050c1a68eb
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.17458.1420682449.18130.python-list@python.org> (permalink)
Lines 39
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1420682449 news.xs4all.nl 2862 [2001:888:2000:d::a6]:50662
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:83311

Show key headers only | View raw


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

Hi friends,

I'm trying to use threads  to achieve the below work flow

1. Start a process , while its running grep for a string 1
2. Apply the string 1 to the command in step 1 and exit step 2
3. Monitor the stdout of step1 and print success if the is pattern  found

Questions:

1. Can the above be achieved without threads ? I prefer keep ing code
simple  .threads can become confusion when this workflow grows larger

Regards,
Ganesh

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


Thread

Playing with threads Ganesh Pal <ganesh1pal@gmail.com> - 2015-01-08 07:30 +0530

csiph-web