관리-도구
편집 파일: xvfb.cpython-311.pyc
� �܋f� � �Z � d dl Z d dlmZ e j e� � ZdZ G d� de� � ZdS )� N)�AbstractDisplay�Xvfbc �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_xauth�retries� extra_args�manage_global_envN) �_screen�_size�_color_depth�_bgcolor�_fbdir�_dpir �__init__�PROGRAM) �self�size�color_depth�bgcolorr �fbdir�dpir r r s �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/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 -nolisten�tcpz-screen�xz-fbdirz-dpiz -displayfd)�dictr �strr �join�map�listr r r r �_has_displayfd� _pipe_wfd�new_display_varr )r �cmds r �_cmdzXvfbDisplay._cmd8 s� � ��u�E�*�*�*�4�=�9����������H�H�S��d�4�:�.�.�$�2C�1D�D�E�E�F�F� �� �;� +��H�d�k�*�*�C��9� ��F�C�� �N�N�+�+�C��� *��L�#�d�n�"5�"5�6�6�C�C��D�(�)�)�C��y�3��r )�__name__� __module__�__qualname__�__doc__r r"