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


Groups > comp.lang.python > #83503

Re: Playing with threads

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!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.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'string': 0.09; 'exit': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; '-&gt;': 0.16; 'email addr:udel.edu&gt;': 0.16; 'email name:&lt;tjreedy': 0.16; 'grep': 0.16; 'reedy': 0.16; 'stdout': 0.16; 'subject:threads': 0.16; 'wrote:': 0.18; 'module': 0.19; 'trying': 0.19; 'thu,': 0.19; 'command': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'copied': 0.24; 'either.': 0.24; 'questions:': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'friends,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'code': 0.31; 'url:python': 0.33; 'running': 0.33; 'implemented': 0.33; 'could': 0.34; 'subject:with': 0.35; 'received:google.com': 0.35; 'idle': 0.36; 'replies': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'step': 0.37; 'files': 0.38; 'pm,': 0.38; 'flow': 0.39; 'url:mail': 0.40; 'read': 0.60; 'most': 0.60; 'success': 0.61; 'simple': 0.61; 'become': 0.64; '2015': 0.84; 'adapted': 0.84; 'ing': 0.84; '9:00': 0.91
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 :cc:content-type; bh=2rVLlcWmn8hk7N/uhaoWwHtJ/M/elQG4pGCmhXzXBtQ=; b=bVsOqFH8ukd/kJiIZ7llOwoxuwGlJmNy2j/Eup2ZroM6WD5X2z6PSrWYDmx14VtEJp hOHVySQEPQn6Alf0id69eUwiyM4t0x5gCG2l0Jc8qUzwlCRnFuFJP7K7ifEfK2T4AUAJ h9vx4oOQv0dquO04MtzAAumuKORz68XhYOZrGPPojqQwQkmCTmnuWdcgt8VbiI+2pgkk OGJhtwfW2vJoEJ1xXvGcVFOUCroT2Uzy6GTvLM3UpmVe++GmEKL+yfw62SqKz5s4xCaX oLX8L/PO+d56I5BgY8psuk+SZP/UGxDlMmFBIQ8rWHQ6zUUjwZSv6k6NEUVJ4CcD/rfd a/gQ==
MIME-Version 1.0
X-Received by 10.152.3.195 with SMTP id e3mr27611141lae.8.1420903065517; Sat, 10 Jan 2015 07:17:45 -0800 (PST)
In-Reply-To <m8l0br$nj0$1@ger.gmane.org>
References <CACT3xuUzuMH1CF3AsakdGMwa3U3BX3N+nA1ZVy4NhVmnA9-6gw@mail.gmail.com> <CACT3xuWmGF7OpoTKmEHEwzzsZNPXECn-rDKVnDtUo8-p1B1fww@mail.gmail.com> <m8l0br$nj0$1@ger.gmane.org>
Date Sat, 10 Jan 2015 20:47:45 +0530
Subject Re: Playing with threads
From Ganesh Pal <ganesh1pal@gmail.com>
To Terry Reedy <tjreedy@udel.edu>
Content-Type multipart/alternative; boundary=089e0141a0127b0593050c4dc6a6
Cc "python-list@python.org" <python-list@python.org>
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.17566.1420903073.18130.python-list@python.org> (permalink)
Lines 79
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1420903073 news.xs4all.nl 2942 [2001:888:2000:d::a6]:35322
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:83503

Show key headers only | View raw


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

Thanks I read subprocess module this answered most of my question ,thanks a
lot for the  replies

On Thu, Jan 8, 2015 at 9:46 AM, Terry Reedy <tjreedy@udel.edu> wrote:

> On 1/7/2015 9:00 PM, Ganesh Pal wrote:
>
>> 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
>>
>
> I do not understand the work flow either.  What I do know is that Idle
> Edit -> Find in Files is implemented in idlelib/grep.py and that the
> non-gui code could be copied and adapted to other purposes.
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

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


Thread

Re: Playing with threads Ganesh Pal <ganesh1pal@gmail.com> - 2015-01-10 20:47 +0530

csiph-web