How to use the pyvirtualdisplay.util.get_helptext function in PyVirtualDisplay

To help you get started, we’ve selected a few PyVirtualDisplay 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 ponty / PyVirtualDisplay / tests / tutil.py View on Github external
def has_displayfd():
    return "-displayfd" in get_helptext("Xvfb")
github ponty / PyVirtualDisplay / pyvirtualdisplay / abstractdisplay.py View on Github external
def __init__(self, program, use_xauth, randomizer, retries, extra_args):
        self._extra_args = extra_args
        self._retries = retries
        self._program = program
        self._randomizer = randomizer
        self.stdout = None
        self.stderr = None
        self.old_display_var = None
        self._subproc = None
        self.display = None
        self._is_started = False

        helptext = get_helptext(program)
        self._has_displayfd = "-displayfd" in helptext
        if not self._has_displayfd:
            log.debug("-displayfd flag is missing.")
        # if check_startup and not has_displayfd:
        #     check_startup = False
        #     log.warning(
        #         program
        #         + " -displayfd flag is not supported, 'check_startup' parameter has been disabled"
        #     )
        self._check_flags(helptext)

        if use_xauth and not xauth.is_installed():
            raise xauth.NotFoundError()

        self._use_xauth = use_xauth
        self._old_xauth = None