PHP 8.2.30
Preview: util.py Size: 486 B
/opt/cloudlinux/venv/lib64/python3.11/site-packages/pyvirtualdisplay/util.py

import subprocess
import sys


def get_helptext(program):
    cmd = [program, "-help"]

    # py3.7+
    # p = subprocess.run(cmd, capture_output=True)
    # stderr = p.stderr

    # py3.6 also
    p = subprocess.Popen(
        cmd,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        shell=False,
    )
    _, stderr = p.communicate()

    helptext = stderr.decode("utf-8", "ignore")
    return helptext


def platform_is_osx():
    return sys.platform == "darwin"

Directory Contents

Dirs: 2 × Files: 11

Name Size Perms Modified Actions
examples DIR
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
- drwxr-xr-x 2026-02-06 08:01:08
Edit Download
20 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
12.29 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
3.18 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
0 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
2.60 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
486 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download
1.14 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
1.60 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
1.90 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
1.87 KB lrw-r--r-- 2026-01-20 13:01:47
Edit Download
241 B lrw-r--r-- 2026-01-20 13:01:47
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).