Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
Read a process link.

        def readProcessLink(pid, key):
    """
    Read a process link.
    """
    try:
        filename = "/proc/%s/%s" % (pid, key)
        return readlink(filename)
    except OSError as err:
        raise ProcError("Unable to read proc link %r: %s" % (filename, err))
        


src/s/e/segvault-HEAD/fusil/ptrace/ptrace/process_tools.py   segvault(Download)
from ptrace.os_tools import RUNNING_LINUX, RUNNING_WINDOWS
if RUNNING_LINUX:
    from ptrace.linux_proc import (ProcError, openProc,
        readProcessProcList, readProcessLink, readProcessStat)
from ptrace.signames import signalName
        pass
    try:
        log("Process working directory: %s" % readProcessLink(pid, 'cwd'))
    except ProcError:
        # Permission denied

src/p/y/python-ptrace-0.7/ptrace/process_tools.py   python-ptrace(Download)
from ptrace.os_tools import RUNNING_LINUX, RUNNING_WINDOWS
if RUNNING_LINUX:
    from ptrace.linux_proc import (ProcError, openProc,
        readProcessProcList, readProcessLink, readProcessStat)
from ptrace.signames import signalName
        pass
    try:
        log("Process working directory: %s" % readProcessLink(pid, 'cwd'))
    except ProcError:
        # Permission denied

src/s/e/segvault-HEAD/fusil/fusil/file_tools.py   segvault(Download)
from ptrace.os_tools import RUNNING_LINUX
if RUNNING_LINUX:
    from ptrace.linux_proc import readProcessLink
 
def safeMkdir(path):
        return
    if RUNNING_LINUX:
        filename = readProcessLink(getpid(), 'fd/%s' % fileno)
        logger.info("File name: %r" % filename)
    logger.info("File descriptor: %s" % fileno)

src/f/u/fusil-1.5/fusil/file_tools.py   fusil(Download)
from ptrace.os_tools import RUNNING_LINUX
if RUNNING_LINUX:
    from ptrace.linux_proc import readProcessLink
 
def safeMkdir(path):
        return
    if RUNNING_LINUX:
        filename = readProcessLink(getpid(), 'fd/%s' % fileno)
        logger.info("File name: %r" % filename)
    logger.info("File descriptor: %s" % fileno)