'Listens and accepts a single connection.'

def ListenForConnection(self):

    logging.warn('Remote    debugger    waiting    for    connection    on    %s', config.CONFIG['Test.remote_pdb_port'])
    RemotePDB.old_stdout = sys.stdout
    RemotePDB.old_stdin = sys.stdin
    RemotePDB.skt = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    RemotePDB.skt.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    RemotePDB.skt.bind(('127.0.0.1', config.CONFIG['Test.remote_pdb_port']))
    RemotePDB.skt.listen(1)
    (clientsocket, address) = RemotePDB.skt.accept()
    RemotePDB.handle = clientsocket.makefile('rw', 1)
    logging.warn('Received    a    connection    from    %s', address)
