How to use the aexpect.Expect.__init__ function in aexpect

To help you get started, we’ve selected a few aexpect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github avocado-framework / avocado-vt / virttest / utils_gdb.py View on Github external
self.prompt = '(gdb)'
        self.pid = None

        dummy_cb = (lambda self, info, params: None, None)
        self.callbacks = {
            "stop": dummy_cb,
            "start": dummy_cb,
            "termination": dummy_cb,
            "break": dummy_cb,
            "signal": dummy_cb,
        }

        self.thread_groups = {}

        command = 'gdb --quiet --interpreter=mi %s' % command
        aexpect.Expect.__init__(
            self,
            command=command,
        )
        self.log_polling_thread = threading.Thread(target=self._poll_log)
        self.log_polling_thread.start()
        self._read_output_until_prompt(timeout=3)