C Z d dl Z d dlmZ e j e ZdZ G d de ZdS ) N)AbstractDisplayXvfbc 8 e Zd ZdZdddddddg df d Zd
Zd ZdS )XvfbDisplayz
Xvfb wrapper
Xvfb is an X server that can run on machines with no display
hardware and no physical input devices. It emulates a dumb
framebuffer using virtual memory.
)i i blackFN
Tc
d| _ || _ || _ || _ || _ || _ t
j | t |||| dS )z
:param bgcolor: 'black' or 'white'
:param fbdir: If non-null, the virtual screen is memory-mapped
to a file in the given directory ('-fbdir' option)
:param dpi: screen resolution in dots per inch if not None
r ) use_xauthretries
extra_argsmanage_global_envN) _screen_size_color_depth_bgcolor_fbdir_dpir __init__PROGRAM)
selfsizecolor_depthbgcolorr fbdirdpir r
r s
g/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyvirtualdisplay/xvfb.pyr zXvfbDisplay.__init__ se $
'
!/
c d S )N )r helptexts r _check_flagszXvfbDisplay._check_flags5 s r c
t dd | j dddt | j d t t t
| j | j gz g}| j r|d| j gz
}| j
|d t | j
gz
}| j r|d
t | j gz
}n|| j
gz
}t g|z S )Nz-brz-wr)r whitez -nolistentcpz-screenxz-fbdirz-dpiz
-displayfd)dictr strr joinmaplistr r r r _has_displayfd _pipe_wfdnew_display_varr )r cmds r _cmdzXvfbDisplay._cmd8 s uE***4=9HHSd4:..$2C1DDEEFF
; +Hdk**C9 FC NN++C *L#dn"5"566CCD())Cy3r )__name__
__module____qualname____doc__r r" r0 r r r r r
sn
D
r r )logging pyvirtualdisplay.abstractdisplayr getLoggerr1 logr r r r r