• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(2932)  |  Call(2682)  |  Derive(0)  |  Import(250)
Run command with arguments.  Wait for command to complete, then
return the returncode attribute.

The arguments are the same as for the Popen constructor.  Example:

retcode = call(["ls", "-l"])

        def call(*popenargs, **kwargs):
    """Run command with arguments.  Wait for command to complete, then
    return the returncode attribute.

    The arguments are the same as for the Popen constructor.  Example:

    retcode = call(["ls", "-l"])
    """
    return Popen(*popenargs, **kwargs).wait()
        


src/f/i/fileconveyor-HEAD/code/transporters/transporter_sample.py   fileconveyor(Download)
        none.sync_file("transporter.py")
        none.sync_file("drupal-5-6.png")
        none.sync_file("subdir/bmi-chart.png")
        subprocess.call("echo yarhar > $TMPDIR/foobar.txt", shell=True, stdout=subprocess.PIPE)
        none.sync_file(os.path.join(tempfile.gettempdir(), "foobar.txt"))
        none.sync_file("subdir/bmi-chart.png", "subdir/bmi-chart.png", Transporter.DELETE)
        time.sleep(5)

src/m/w/mwlib-0.12.13/sandbox/anywikisampler.py   mwlib(Download)
 
        print "executing", mwzip_cmd, args
        daemonize()
        rc = subprocess.call(executable=mwzip_cmd, args=args)
        if rc != 0:
            self.send_response(500)
            self.end_headers()

src/m/a/matplotlib-HEAD/toolkits/basemap/examples/pnganim.py   matplotlib(Download)
 
Will try to run imagemagick animate in 5 seconds ..."""
time.sleep(5)
subprocess.call('animate -delay 10 anim*png',shell=True)
 

src/m/a/matplotlib-HEAD/toolkits/basemap-0.9.6.1/examples/pnganim.py   matplotlib(Download)
 
Will try to run imagemagick animate in 5 seconds ..."""
time.sleep(5)
subprocess.call('animate -delay 10 anim*png',shell=True)
 

src/p/y/py2cairo-py3k-HEAD/test/examples_test.py   py2cairo-py3k(Download)
def test_examples():
    '''run non-gui example scripts and check they exit successfully.
    '''
    os.chdir(os.path.join(os.path.dirname(__file__), '..', 'examples'))
    for f in (x for x in os.listdir('.') if x.endswith('.py')):
        retcode = subprocess.call('%s %s' % (sys.executable, f), shell=True)
        assert retcode == 0, 'Error: {0} retcode == {1}'.format(f, retcode)
def test_snippets_png():
    '''run all snippets in png mode and check they exit successfully.
    '''
    os.chdir(os.path.join(os.path.dirname(__file__), '..', 'examples',
                          'cairo_snippets'))
    retcode = subprocess.call('%s snippets_png.py -s' % sys.executable, shell=True)
    assert retcode == 0, 'Error: retcode == {0}'.format(retcode)

src/b/i/biopython-1.55/Doc/examples/clustal_run.py   biopython(Download)
cline = ClustalwCommandline(infile='opuntia.fasta', outfile='test.aln')
 
# actually perform the alignment
return_code = subprocess.call(str(cline), shell=(sys.platform!="win32"))
assert return_code==0, "Calling ClustalW failed"
 
# Parse the output

src/p/y/PyAMF-HEAD/doc/tutorials/examples/actionscript/echo/python/util.py   PyAMF(Download)
 
    print "Started %s - Django Server on http://%s:%d" % (name, host, port)
 
    return subprocess.call('python %s runserver %s' % (path, address), shell=True)
 
def run_twisted_server(name, options, services):
    """

src/g/o/googletransitdatafeed-HEAD/python/examples/shuttle_from_xmlfeed.py   googletransitdatafeed(Download)
    def check_call(cmd):
      """Convenience function that is in the docs for subprocess but not
      installed on my system."""
      retcode = subprocess.call(cmd, shell=True)
      if retcode < 0:
        raise Exception("Child '%s' was terminated by signal %d" % (cmd,
          -retcode))

src/p/y/pyvm-HEAD/projects/python_in_a_can/trunk/win32/mercurial-1.6.4/lib/mercurial/util.py   pyvm(Download)
    env.update((k, py2shell(v)) for k, v in environ.iteritems())
    env['HG'] = hgexecutable()
    if out is None:
        rc = subprocess.call(cmd, shell=True, close_fds=closefds,
                             env=env, cwd=cwd)
    else:
        proc = subprocess.Popen(cmd, shell=True, close_fds=closefds,

src/s/c/scikits.samplerate-0.3.3/pavement.py   scikits.samplerate(Download)
        def build_latex():
            subprocess.call(["make", "all-pdf"], cwd=paths.latexdir)
        dry("Build pdf doc", build_latex)
        PDF_DESTDIR.rmtree()
        PDF_DESTDIR.makedirs()
        pdf = paths.latexdir / "samplerate.pdf"
        pdf.copy(PDF_DESTDIR)

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