streamcorpus_pipeline/_rmtree.py
def get_open_fds(verbose=False):
    '''return list of open files for current process

    .. warning: will only work on UNIX-like os-es.
    '''
    pid = os.getpid()
    procs = subprocess.check_output( 
        [ "lsof", '-w', '-Ff', "-p", str( pid ) ] )
    if verbose:
        oprocs = subprocess.check_output( 
            [ "lsof", '-w', "-p", str( pid ) ] )
        logger.info(oprocs)
    open_files = filter( 
        lambda s: s and s[ 0 ] == 'f' and s[1: ].isdigit(),
        procs.split( '\n' ) )
    return open_files
def get_open_fds(verbose=False):
    '''return list of open files for current process

    .. warning: will only work on UNIX-like os-es.
    '''
    pid = os.getpid()
    procs = subprocess.check_output( 
        [ "lsof", '-w', '-Ff', "-p", str( pid ) ] )
    if verbose:
        oprocs = subprocess.check_output( 
            [ "lsof", '-w', "-p", str( pid ) ] )
        logger.info(oprocs)
    open_files = filter( 
        lambda s: s and s[ 0 ] == 'f' and s[1: ].isdigit(),
        procs.split( '\n' ) )
    return open_files
return list of open files for current process

    .. warning: will only work on UNIX-like os-es.