コード例 #1
0
    def test_GdalOutputHandler_re():
        s = '0...10...20...30...40...50...60...70...80...90...100 - done.\n'

        h = exectools.BaseOutputHandler(exectools.OFStream())
        h._progress_pattern = GdalOutputHandler()._progress_pattern
        h.feed(s)
        h.close()
        print('done.')
コード例 #2
0
    def test_GdalOutputHandler2():
        s = '0...10...20...30...40...50...60...70...80...90...100 - done.\n'

        h = exectools.BaseOutputHandler(exectools.OFStream())
        h._progress_pattern = GdalOutputHandler()._progress_pattern
        for c in s:
            h.feed(c)
        h.close()
コード例 #3
0
#!/usr/bin/env python

import logging
import exectools, exectools.std


logging.basicConfig(level=logging.DEBUG, format='%(message)s')

echo = exectools.ToolDescriptor(
    'echo', stdout_handler=exectools.BaseOutputHandler())

c = exectools.std.StdToolController()
c.run_tool(echo, 'ciao', 'ciao2')
c.finalize_run()
print(c.isbusy)