Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
Calling this will create the `subprocess.Popen` instance and drain
the stdout and stderr pipes of the process.  Each time a line is
read from those pipes, the monitor calls back into the
`read_event_cb` callback function.

When a `should_abort_cb` callback function is set, a poller thread
will be set up to periodically check whether the process should
terminate.

Note that `start()` blocks until the process is finished.(more...)

src/d/r/drainers-0.0.3/examples/simple_ls.py   drainers(Download)
 
d = drainers.Drainer(['ls', '-a'], read_event_cb=just_echo)
d.start()
print '%d lines read' % counter
 

src/d/r/drainers-0.0.3/examples/simple_kill_sleep.py   drainers(Download)
                                      should_abort_cb=poll,
                                      check_interval=0.5)    # Poll every half second
d.start()
print 'Done.'
 

src/d/r/drainers-0.0.3/examples/simple_find.py   drainers(Download)
 
        print 'Finding files called "%s" for 10 seconds...' % search_for
        exitcode = d.start()
 
        print 'Return code was: %d' % exitcode

src/d/r/drainers-0.0.3/examples/simple_annotate_date.py   drainers(Download)
 
d = drainers.Drainer(sys.argv[1:], read_event_cb=annotate)
d.start()
 

src/p/y/python-drainers-HEAD/examples/simple_ls.py   python-drainers(Download)
 
d = drainers.Drainer(['ls', '-a'], read_event_cb=just_echo)
d.start()
print '%d lines read' % counter
 

src/p/y/python-drainers-HEAD/examples/simple_kill_sleep.py   python-drainers(Download)
                                      should_abort_cb=poll,
                                      check_interval=0.5)    # Poll every half second
d.start()
print 'Done.'
 

src/p/y/python-drainers-HEAD/examples/simple_find.py   python-drainers(Download)
 
        print 'Finding files called "%s" for 10 seconds...' % search_for
        exitcode = d.start()
 
        print 'Return code was: %d' % exitcode

src/p/y/python-drainers-HEAD/examples/simple_annotate_date.py   python-drainers(Download)
 
d = drainers.Drainer(sys.argv[1:], read_event_cb=annotate)
d.start()