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


src/p/y/PyNN-0.6.0/test/test_examples_mpi.py   PyNN(Download)
"""
Test that running a distributed simulation using MPI gives the same results
as a local, serial simulation.
"""
 
import os
from subprocess import Popen, PIPE, STDOUT
                                                script_args)
print cmd1
print cmd2
job1 = Popen(cmd1, stdin=None, stdout=None, stderr=STDOUT, shell=True, cwd=tmpdirs['serial'])
job2 = Popen(cmd2, stdin=None, stdout=None, stderr=STDOUT, shell=True, cwd=tmpdirs['distrib'])
job2.wait()
job1.wait()
for mode in 'serial', 'distrib':
    for filename in filename_maps[mode].values():
        cmd = "sort %s > %s,sorted" % (filename, filename)
        jobs.append(Popen(cmd, shell=True))
for job in jobs:
    job.wait()
 

src/p/y/pyobjc-core-2.3/Examples/NonFunctional/RemotePyInterpreter/test_client.py   pyobjc-core(Download)
try:
    import fcntl
except:
    fcntl = None
import os
import sys
from subprocess import Popen, PIPE
def open_connection(executable=sys.executable):
    serversock = bind_and_listen(('127.0.0.1', 0))
    hostport = serversock.getsockname()
    proc = Popen([executable, 'tcpinterpreter.py', repr(hostport)], stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
    clientsock, address = serversock.accept()
    serversock.shutdown(2)
    return clientsock, proc

src/p/y/python-ecore-0.7.1/examples/x/mplayer_embed.py   python-ecore(Download)
#!/usr/bin/env python
 
import sys
import os
import ecore
import ecore.x
from subprocess import Popen, PIPE
 
cmd = ["/usr/bin/mplayer", "-slave", "-nomouseinput", "-quiet",
       "-wid", str(sub_window.xid), filename]
p = Popen(cmd, stdin=PIPE, stdout=PIPE, close_fds=True)
 
def handle_read(fd_handler, file):
    line = file.read(1)

src/p/y/pygrace-HEAD/trunk/Examples/test.py   pygrace(Download)
"""This module is a wrapper that runs the scripts that generate figures using
PyFig.  If errors occur, full Tracebacks of the errors are sent to standard
out."""
 
from sys import stderr, stdout
from subprocess import Popen, PIPE
from os.path import sep, splitext
 
        # try to make figure using pyfig script (execute in shell)
        command = '%s %s' % (PYTHON_PATH, scriptPath)
        childProcess = Popen(command, shell=True, stderr=PIPE)
 
        # write output of error stream
        errorOutput = childProcess.stderr.read()

src/p/y/pygrace-HEAD/Examples/test.py   pygrace(Download)
"""This module is a wrapper that runs the scripts that generate figures using
PyFig.  If errors occur, full Tracebacks of the errors are sent to standard
out."""
 
from sys import stderr, stdout
from subprocess import Popen, PIPE
from os.path import sep, splitext
 
        # try to make figure using pyfig script (execute in shell)
        command = '%s %s' % (PYTHON_PATH, scriptPath)
        childProcess = Popen(command, shell=True, stderr=PIPE)
 
        # write output of error stream
        errorOutput = childProcess.stderr.read()

src/c/l/clustershell-HEAD/trunk/lib/ClusterShell/Worker/EngineClient.py   clustershell(Download)
import fcntl
import os
import Queue
from subprocess import Popen, PIPE, STDOUT
import thread
 
from ClusterShell.Engine.Engine import EngineBaseTimer
            stderr_setup = STDOUT
 
        # Launch process in non-blocking mode
        proc = Popen(commandlist, bufsize=0, stdin=PIPE, stdout=PIPE,
            stderr=stderr_setup, close_fds=False, shell=shell, env=full_env)
 
        if self._stderr:

src/c/l/clustershell-HEAD/lib/ClusterShell/Worker/EngineClient.py   clustershell(Download)
import fcntl
import os
import Queue
from subprocess import Popen, PIPE, STDOUT
import thread
 
from ClusterShell.Engine.Engine import EngineBaseTimer
            stderr_setup = STDOUT
 
        # Launch process in non-blocking mode
        proc = Popen(commandlist, bufsize=0, stdin=PIPE, stdout=PIPE,
            stderr=stderr_setup, close_fds=False, shell=shell, env=full_env)
 
        if self._stderr:

src/p/y/PyBrain-0.3/pybrain/tools/rlgluebridge.py   PyBrain(Download)
import os
 
from signal import SIGKILL #@UnresolvedImport
from subprocess import Popen, PIPE
 
from rlglue.agent.ClientAgent import ClientAgent #@UnresolvedImport
from rlglue.network.Network import kRetryTimeout as CLIENT_TIMEOUT #@UnresolvedImport
            env['RLGLUE_AUTORECONNECT'] = self.autoreconnect
 
        cwd = self.path[:self.path.rfind("/") + 1]
        self.process = Popen(self.path, env=env, shell=True, cwd=cwd,
                             bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE)
 
        # We have to fetch some PIDs from the subprocess' output to kill the

src/p/y/python-cuda-HEAD/oldcode/misc/utilities.py   python-cuda(Download)
from collections import defaultdict
from ctypes import memmove
from os.path import splitext
from subprocess import Popen,PIPE
from sys import platform
from time import ctime,time
 
def System(command,input = ""):
    """system execution of 'command' with input 'input' to 'command'
    Returns tuple (status,output to stdout,output to stderr)
    with outputs split on newlines and returned as lists."""
    if platform == "win32":
        run = Popen(command,shell = True,bufsize = BSZ,
              stdin = PIPE,stdout = PIPE,stderr = PIPE)
    else:
        run = Popen(command,shell = True,bufsize = BSZ,

src/w/i/wicd-HEAD/wicd/misc.py   wicd(Download)
import locale
import gettext
import sys
from subprocess import Popen, STDOUT, PIPE, call
import commands
 
import wicd.wpath as wpath
    tmpenv = os.environ.copy()
    tmpenv["LC_ALL"] = "C"
    tmpenv["LANG"] = "C"
    f = Popen(cmd, shell=False, stdout=PIPE, stderr=err, close_fds=fds, cwd='/',
              env=tmpenv)
 
    if return_pipe:

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