def _wrappedPdb():
    """
    Wrap an instance of C{pdb.Pdb} with readline support and load any .rcs.

    """

    dbg = pdb.Pdb()
    try:
        namedModule('readline')
    except ImportError:
        print("readline module not available")
    for path in ('.pdbrc', 'pdbrc'):
        if os.path.exists(path):
            try:
                rcFile = open(path, 'r')
            except IOError:
                pass
            else:
                with rcFile:
                    dbg.rcLines.extend(rcFile.readlines())
    return dbg

    Wrap an instance of C{pdb.Pdb} with readline support and load any .rcs.

    
stackoverflow/venv/lib/python3.6/site-packages/twisted/scripts/trial.py