INNER CODE UNIT · Python

server

codeskyblue/uiautodev · uiautodev/cli.py:155

def server(port: int, host: str, reload: bool, force: bool, no_browser: bool, offline: bool, server_url: str):
    click.echo(f"uiautodev version: {__version__}")
    if force:
        try:
            httpx.get(f"http://{host}:{port}/shutdown", timeout=3)
        except httpx.HTTPError:
            pass

    use_color = True
    if platform.system() == 'Windows':
        use_color = False

    server_url = server_url.rstrip('/')
    from uiautodev.router import proxy
    proxy.base_url = server_url

    if offline:
        proxy.cache_dir.mkdir(parents=True, exist_ok=True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…