def listIDs(basedir):
prefix = '<STR_LIT>'<EOL>prefixfile = os.path.join(basedir, '<STR_LIT>')<EOL>if os.path.isfile(prefixfile):<EOL><INDENT>rff = open(prefixfile, '<STR_LIT:r>')<EOL>prefix = rff.readline().strip()<EOL>rff.close()<EOL><DEDENT>root = os.path.join(basedir, '<STR_LIT>')<EOL>if os.path.isdir(root):<EOL><INDENT>objects = pairtree.findObjects(root)<EOL>for obj in objects:<EOL><INDENT>doi = os.path.split(obj)[<NUM_LIT:1>]<EOL>print(prefix + pairtree.deSanitizeString(doi))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>
Lists digital object identifiers of Pairtree directory structure.

    Walks a Pairtree directory structure to get IDs. Prepends prefix
    found in pairtree_prefix file. Outputs to standard output.