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

All Samples(34)  |  Call(31)  |  Derive(0)  |  Import(3)
No Document.

src/m/a/matplotlib-HEAD/matplotlib/setupext.py   matplotlib(Download)
    import configparser
    from io import StringIO
    if sys.platform != 'win32':
        from subprocess import getstatusoutput
 
BUILT_PNG       = False
BUILT_AGG       = False
        has_pkgconfig.cache = False
    else:
        #print 'environ',  os.environ['PKG_CONFIG_PATH']
        status, output = getstatusoutput("pkg-config --help")
        has_pkgconfig.cache = (status == 0)
    return has_pkgconfig.cache
has_pkgconfig.cache = None
              '-U': 'undef_macros'}
 
    cmd = "%s %s %s" % (pkg_config_exec, flags, packages)
    status, output = getstatusoutput(cmd)
    if status == 0:
        for token in output.split():
            attr = _flags.get(token[:2], None)
def get_pkgconfig_version(package):
    default = "found, but unknown version (no pkg-config)"
    if not has_pkgconfig():
        return default
 
    status, output = getstatusoutput(
        "pkg-config %s --modversion" % (package))

src/m/a/matplotlib-HEAD/setupext.py   matplotlib(Download)
    import configparser
    from io import StringIO
    if sys.platform != 'win32':
        from subprocess import getstatusoutput
 
BUILT_PNG       = False
BUILT_AGG       = False
        has_pkgconfig.cache = False
    else:
        #print 'environ',  os.environ['PKG_CONFIG_PATH']
        status, output = getstatusoutput("pkg-config --help")
        has_pkgconfig.cache = (status == 0)
    return has_pkgconfig.cache
has_pkgconfig.cache = None
              '-U': 'undef_macros'}
 
    cmd = "%s %s %s" % (pkg_config_exec, flags, packages)
    status, output = getstatusoutput(cmd)
    if status == 0:
        for token in output.split():
            attr = _flags.get(token[:2], None)
def get_pkgconfig_version(package):
    default = "found, but unknown version (no pkg-config)"
    if not has_pkgconfig():
        return default
 
    status, output = getstatusoutput(
        "pkg-config %s --modversion" % (package))

src/p/y/pyci-HEAD/plugins_enabled/network/network.py   pyci(Download)
try:
    from commands import getstatusoutput, getoutput
except: # getstatusoutput was moved to subprocess in Python 3
    from subprocess import getstatusoutput
try: # Note: The json module is only present in Python 2.6+
    import json
except: # If not found, try importing simplejson which will be required if using Python 2.4 or Python 2.5
            else:
                new_lease_file += line
    # Next we stop dnsmasq...
    return_code, output = getstatusoutput('/etc/init.d/dnsmasq stop')
    if return_code != 0:
        raise dnsmasqException
    # Now we write our new lease file...
    lease_file = open(lease_filepath, 'w')
    lease_file.write(new_lease_file)
    lease_file.close()
    # Finally we start dnsmasq back up...
    return_code, output = getstatusoutput('/etc/init.d/dnsmasq start')
    def interfaces_tab(self):
        """Render the interfaces tab"""
        _template = plugin_template(self, "templates/interfaces_tab.mako")
 
        # We need to get the name of the bridge (if any)
        retcode, output = getstatusoutput('brctl show')
        if retcode != 0:

src/p/o/PortSync-HEAD/src/portsync/repos/repo_update.py   PortSync(Download)
        rsync_command = "rsync {args} {src} {dest}".format(args = rsync_args, src = rsync_src, dest = repo_dir)
 
        # run rsync_command
        rsync_output = subprocess.getstatusoutput(rsync_command)
 
        # Check if rsync exited successfully
        if rsync_output[0] != 0 :
 
        if emerge_sync == "yes":
 
            emerge_output = subprocess.getstatusoutput("emerge --sync")
 
            if emerge_output[0] != 0:
                self.messages.append("Error running 'emerge --sync' while updating '{repo}' repo".format(repo = repo_name))
    def update_layman_repo(self, repo_name):
        # @type repo_name str
 
        # TODO Code this so indivdual layman repos can be updated, also add branch support for git and mercurial.
 
        # Run layman
        layman_output = subprocess.getstatusoutput("layman --sync-all")
        os.chdir(repo_location)
 
        # Execute hg pull
        hg_output = subprocess.getstatusoutput("hg pull")
        if hg_output[0] != 0:
            self.messages.append("Error during 'hg pull' in '{repo}' repo".format(repo = repo_name))
            return hg_output
        os.chdir(repo_location)
 
        # Update repo
        svn_output = subprocess.getstatusoutput("svn up")
        if svn_output[0] != 0:
            self.messages.append("Error during 'svn up' in '{repo}' repo".format(repo = repo_name))
            return svn_output

src/p/o/PortSync-HEAD/src/portsync/repos/git_repo.py   PortSync(Download)
        """
 
        # Get current list of branches
        branch_output = subprocess.getstatusoutput("git branch")
 
        # Check if successful.
        if branch_output[0] != 0:
        """
 
        # Get current list of branches
        branch_output = subprocess.getstatusoutput("git branch")
 
        # Check if successful.
        if branch_output[0] != 0:
        """
 
        # Checkout branch
        git_branch_output = subprocess.getstatusoutput("git checkout {branch}".format(branch = branch_to_checkout))
 
        # Check for error during git checkout
        if git_branch_output[0] != 0:
 
        if emerge_sync == "yes":
 
            emerge_output = subprocess.getstatusoutput("emerge --sync")
 
            if emerge_output[0] != 0:
                self.messages.append("Error running 'emerge --sync' while updating '{repo}' repo".format(repo = repo_name))
                self.git_checkout(branch_name)
 
            # Execute git pull
            git_output = subprocess.getstatusoutput("git pull")
 
            # Check if sucessfull
            if git_output[0] != 0:

src/i/p/ipython-py3k-HEAD/IPython/utils/rlineimpl.py   ipython-py3k(Download)
    # approach. See https://bugs.launchpad.net/ipython/+bug/411599.
    for i in range(10):
        try:
            (status, result) = subprocess.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ )
            break
        except IOError as xxx_todo_changeme:
            (errno, strerror) = xxx_todo_changeme.args

src/p/y/pyvpnc-HEAD/vpnc/vpnc.py   pyvpnc(Download)
    function will return None."""
 
    command = "cisco-decrypt" + key
    output = subprocess.getstatusoutput(command)
    retcode = output[0]
    if retcode == 0:
        return output[1]

src/p/e/pexpect-HEAD/remote.py   pexpect(Download)
def _test_auto_password():
    LOG_FILE = 'remote.log'
    import subprocess
    subprocess.getstatusoutput('rm -fr %s'%LOG_FILE)
    log_file = open(LOG_FILE, 'wb+')
 
#Good command line:
def _test_multihop():
    LOG_FILE = 'remote.log'
    import subprocess
    subprocess.getstatusoutput('rm -fr %s'%LOG_FILE)
    log_file = open(LOG_FILE, 'wb+')
 
    genet = dict(host='192.158.124.249',user='geo',password='geo.geo',type='ssh')
def _test_solaris_telnet():
    LOG_FILE = 'remote.log'
    import subprocess
    subprocess.getstatusoutput('rm -fr %s'%LOG_FILE)
    log_file = open(LOG_FILE, 'wb+')
    # Correct password
    h1 = TelnetHost('sunfire', 'geouser', 'geouser', logfile=log_file)
def _test_unique_prompt():
    import time
    time_start = time.time()
    LOG_FILE = 'remote.log'
    import subprocess
    subprocess.getstatusoutput('rm -fr %s'%LOG_FILE)
    log_file = open(LOG_FILE, 'wb+')

src/p/i/pida-0.6.2/pida-plugins/python_debugger/rpdb2.py   pida(Download)
            return term
 
    if IsPrefixInEnviron(KDE_PREFIX):
        (s, term) = commands.getstatusoutput(KDE_DEFAULT_TERM_QUERY)
        if (s == 0) and IsFileInPath(term):
            return term
 

src/p/y/pypy3-HEAD/lib-python/3.1.2/test/test_subprocess.py   pypy3(Download)
                dir = tempfile.mkdtemp()
                name = os.path.join(dir, "foo")
 
                status, output = subprocess.getstatusoutput('cat ' + name)
                self.assertNotEquals(status, 0)
            finally:
                if dir is not None:

  1 | 2  Next