Did I find the right examples for you? yes no

All Samples(10059)  |  Call(10059)  |  Derive(0)  |  Import(0)
Interact with process: Send data to stdin.  Read data from
stdout and stderr, until end-of-file is reached.  Wait for
process to terminate.  The optional input argument should be a
string to be sent to the child process, or None, if no data
should be sent to the child.

communicate() returns a tuple (stdout, stderr).

src/c/o/cookiecutter-0.7.1/tests/test_examples.py   cookiecutter(Download)
 
        # Just skip all the prompts
        proc.communicate(input=b'\n\n\n\n\n\n\n\n\n\n\n\n')
 
        self.assertTrue(os.path.isfile('boilerplate/README.rst'))
 
        # Just skip all the prompts
        proc.communicate(input=b'\n\n\n\n\n\n\n\n\n\n\n\n')
 
        self.assertTrue(os.path.isfile('boilerplate/README.rst'))

src/c/o/cookiecutter-HEAD/tests/test_examples.py   cookiecutter(Download)
 
        # Just skip all the prompts
        proc.communicate(input=b'\n\n\n\n\n\n\n\n\n\n\n\n')
 
        self.assertTrue(os.path.isfile('boilerplate/README.rst'))
 
        # Just skip all the prompts
        proc.communicate(input=b'\n\n\n\n\n\n\n\n\n\n\n\n')
 
        self.assertTrue(os.path.isfile('boilerplate/README.rst'))

src/p/y/pybit-HEAD/examples/procmail-mbox.py   pybit(Download)
        if document is not None:
            p = Popen(['../hook/changes-debian'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
            grep_stdout = p.communicate(input=document)[0]
            print grep_stdout
        msg = mb.next()

src/m/i/mitmproxy-0.10.1/examples/mitmproxywrapper.py   mitmproxy(Download)
    def run_command_with_input(self, command, input):
        popen = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
        (stdout, stderr) = popen.communicate(input)
        return stdout
 

src/r/u/runpack-0.13.0/tests/system/test_examples.py   runpack(Download)
            stdin=PIPE, stdout=PIPE, stderr=PIPE, **kwargs)
        for message in messages:
            stdout, stderr = process.communicate(message)
            if stderr:
                raise RuntimeError(stderr)

src/m/r/mrs-mapreduce-0.9/examples/fulton.py   mrs-mapreduce(Download)
    qsub_proc = Popen(cmdline, stdin=PIPE, stdout=PIPE)
 
    stdout, stderr = qsub_proc.communicate(script)
    if qsub_proc.returncode != 0:
        print >>sys.stderr, "Couldn't submit master job to queue!"

src/e/b/ebooklib-HEAD/samples/04_markdown_parse/epub2markdown.py   ebooklib(Download)
                                    stdout=subprocess.PIPE
                                    )
            content, error = proc.communicate(item.content)
            file_name = os.path.splitext(item.file_name)[0]+'.md'
        else:

src/b/o/botomatic-HEAD/botomatic/example_bots/bc_l.py   botomatic(Download)
    def bc_l(self, input_text):
        p = subprocess.Popen("bc -l", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
        try:
            out, err = p.communicate(input_text + "\n")
        except UnicodeEncodeError:

src/n/i/nipy-0.3.0/tools/run_log_examples.py   nipy(Download)
                         shell = NEED_SHELL)
            # Execute
            stdout, stderr = proc.communicate()
        finally:
            if proc.poll() is None: # In case we get killed

src/w/m/WMCore-HEAD/src/python/WMCore/Storage/Plugins/Examples/SRMImpl.py   WMCore(Download)
            p1 = Popen(["rfstat", remotePFN], stdout=PIPE)
            p3 = Popen(['cut','-f3','-d" "'], stdin=p1.stdout, stdout=PIPE)
            exitCode = p3.communicate()[0]
            if exitCode:
                raise StageOutError, "srmcp failed! Error code: %s" % exitCode
        p2 = Popen(["grep", "size :[0-9]"], stdout=PIPE, stdin=p1.stdout)
        p3 = Popen(["sed", "-f2",'-d":"'], stdout=PIPE,stdin=p2.stdout)
        remoteSize = p3.communicate()[0]
        logging.info("Localsize: %s Remotesize: %s" % (localSize, remoteSize))
        if int(localSize) != int(remoteSize):

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next