def ifiles(irods_path):
    """Return a list of filenames for given iRODS path (recursively)"""
    raw_output = subprocess.check_output(
        "ils -r --bundle {0}"
        "    | grep 'Bundle file:'"
        "    | awk '{{print $3}}'".format(irods_path),
        shell=True
    )
    filenames = raw_output.decode('ascii').strip().split("\n")
    return filenames
Return a list of filenames for given iRODS path (recursively)