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: 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: References: Date: Thu, 8 Jan 2015 07:30:41 +0530 Subject: Playing with threads From: Ganesh Pal 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 --089e014941e6462064050c1a68eb Content-Type: text/plain; charset=UTF-8 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 --089e014941e6462064050c1a68eb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi friends,

I'm trying to use threads=C2=A0 to achieve the below wor= k 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=C2=A0 fo= und

Questions:

1. Can the above be achieved without threads ? I prefer keep= ing code simple=C2=A0 .threads can become confusion when this workflow gro= ws larger

Regards,
Ganesh

--089e014941e6462064050c1a68eb--