[Chicago] Popen/subprocess/Poll Question.
dgriff1 at gmail.com
Thu Jul 22 17:49:34 CEST 2010
You really don't need Threads or Processes if you just use poll. Just keep a
list of popen's and periodically check them with poll.
On Thu, Jul 22, 2010 at 10:28 AM, Martin Maney <maney at two14.net> wrote:
> On Thu, Jul 22, 2010 at 09:55:24AM -0500, Samir Faci wrote:
> > I'm running a process that's usually takes a while.... (in the best
> > case scenario a few hours... going on days occasionally)
> > I'm presuming I need to spawn a thread for the process so it doesn't
> Thread-on-the-brain disease? Why not run it as a separate process?
> Threads are just processes that can mess each other up almost without
> trying. :-/
> > Now, what I'm trying to accomplish is to have it print its output to a
> > screen AND let me capture its output. I'd like to see the output.
> > I'd also like to see the output as its processing, not capture it, and
> > print it to screen and then write to file.
> There's an Anciente Unixe command that does this very thing, named
> "tee". Just sayin'
> I'm not proud. We really haven't done everything we could to
> protect our customers ... Our products just aren't engineered
> for security. -- Brian Valentine, Microsoft Senior VP
> in charge of the Windows development team
> Chicago mailing list
> Chicago at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chicago