%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/automat/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/automat/__pycache__/_visualize.cpython-312.pyc

�

�~�b����ddlmZddlZddlZddlZddlmZd�Zd�Zd�Z	e	fd�Z
eeefd	�Zejdejddejeefd
�Zy)�)�print_functionN�)�findMachinesc�D�dj|jdd��S)Nz"{}"�"z\")�format�replace��ss �4/usr/lib/python3/dist-packages/automat/_visualize.py�_gvquoter

s���=�=����3��.�/�/�c�$�dj|�S)Nz<{}>)rr
s r�_gvhtmlrs���=�=���rc��djd�t|j��D��}dj|�}dj|||��S)z?
    Construct a string from the HTML element description.
    � c	3�jK�|]+\}}dj|tt|������-y�w)z{}={}N)rr
�str)�.0�key�values   r�	<genexpr>zelementMaker.<locals>.<genexpr>s2����G�",�#�u�&�n�n�S�(�3�u�:�2F�G�G�s�13�z#<{name} {attrs}>{children}</{name}>)�name�attrs�children)�join�sorted�itemsr)rrr�formattedAttrs�formattedChildrens     r�elementMakerr"s]���X�X�G�06�u�{�{�}�0E�G�G�N�����)��1�8�8�
��"�9�$�$rc��i}|rtt|��|d<|d|d|d��fd|d�|��}dd	i}|D�cgc]}|d|d|fi|��d
����}}|d|�g}	|r|	j|dg|����|d
g|	���Scc}w)z>
    Construct an HTML table to label a state transition.
    �colspan�td�fontzmenlo-italic)�face�purple)�color�portz
point-size�9�pink)r)�tr�table)r�len�append)
�
inputLabel�outputLabelsr*�_Er$�inputLabelCell�	pointSize�outputLabel�outputLabelCells�rowss
          r�
tableMakerr9s����G�� ��\�!2�3��	�����6�%� .�0�#�'�!�#�"�
#�N��s�#�I�,8�9�
(��4��f�)�+� )�+�"(�	)�9��9�
�t�^�$�%�D�����B�t�/�.�/�0�
�g������9s�Bc
��tjddd�ddiddi��}|j�D]5}||jurd}d}nd	}d}|j	||�|d
|d���7t|j
��D]�\}}	|	\}
}}}
d
j|�}||�}d}t||
D�cgc]
}||���c}|��}|j	|t|�dd��|j||
�dj||�d��|jdj||�||����|Scc}w)zA
    Produce a L{graphviz.Digraph} object from an automaton.
    �true�100)�pack�dpi�fontname�Menlo)�
graph_attr�	node_attr�	edge_attr�boldz
Menlo-Boldr�ellipse�blue)�fontame�shape�styler)zt{}�	tableport)r*z0.2�none)�label�marginrHz{}:{}:w)�	arrowheadz{}:{}:e)�graphviz�Digraph�states�initialState�node�	enumerate�allTransitionsrr9r�edge)�	automaton�
inputAsString�outputAsString�
stateAsString�digraph�state�
stateShape�fontName�n�eachTransition�inState�inputSymbol�outState�
outputSymbols�thisTransitionr1r*�outputSymbolr.s                   r�makeDigraphrg?s������6�27�+9�*4�g�)>�*4�g�)>�@�G�
�!�!�#�#���I�*�*�*��J�#�H��J��H����]�5�)�%�$�%�!�		�	#�#�'�y�'?�'?�'A�B�.���>�8F�5���h�
����a���"�;�/�
����:�<I�(K�,8�)7�|�(D�(K� $�&��	���^�"�5�>�%�v�	�	G�	���]�7�+��%�%�n�d�;�%�	�	'�	���Y�%�%�n�d�;�"�8�,�	.�!.�&�N��(Ks�3D?c��d}d}|dr|jdd�tj|||��}|jdd��|jd	d
ddd
��|jdddd��|jdddd��|jdddtj
d��|jddddd
��|j
|�}|jxr(|jxs|j|jk7}	|jrd�}||j�D]�\}
}||
d �|j�}|	r@|jd!j|
�|j�"�||
d#|j�|js�n|jxs|	}
|j|_
|jd!j|
�|j|j |
�$�|
rd%}nd&}||
||j���y')(z/
    Entry point for command line utility.
    zB
    Visualize automat.MethodicalMachines as graphviz graphs.
    zz
    You must have the graphviz tool suite installed.  Please visit
    http://www.graphviz.org for more information.
    rr)�prog�description�epilog�fqpnz@A Fully Qualified Path name representing where to find machines.)�helpz--quietz-qzsuppress outputF�
store_true)rm�default�actionz--dot-directoryz-dzWhere to write out .dot files.z.automat_visualize)rmroz--image-directoryz-izWhere to write out image files.z--image-typez-tzThe image format.�png)rm�choicesroz--viewz-vz.View rendered graphs with default image viewerc��y)N�)�argss r�_printztool.<locals>._print�s��rz
...discoveredz{}.dot)�filename�	directoryz...wrote dot into)rwrx�view�cleanupz...wrote image intoz...wrote image and dot intoN)�insert�argparse�ArgumentParser�add_argumentrO�FORMATS�
parse_args�
dot_directory�image_directory�quietrl�	asDigraph�saver�
image_type�renderry)�	_progname�_argv�_syspath�
_findMachinesrv�DESCRIPTION�EPILOG�argumentParserru�explicitlySaveDotrl�machiner[�	deleteDot�msgs               r�toolr�lsO���K��F���{�����2���,�,�
����N�����&H� �I����	�4�%6�(-�'3� �5���� 1�4�%E�(<� �>���� 3�T�%F�(<� �>������%8�(0�(8�(8�(-� �/�����$�&8�(-�'3�	 �5�
�$�$�U�+�D��+�+�M�"&�"6�"6�6�L�!%�!5�!5��9K�9K�!K���z�z�	�'�t�y�y�1�4�
��g��t�_�%��#�#�%����L�L�(�/�/�$�"7�#'�#5�#5�
�
7��4�,�d�.@�.@�A���� �.�.�.�C�2C�I�!�_�_�G�N��N�N�H�O�O�D�$9�%)�%9�%9� $�	�	�#,�
�
.��+��3���4��d�2�2�3�+4r)�
__future__rr|�sysrO�	_discoverrr
rr"r9�reprrg�argv�path�printr�rtrr�<module>r�sl��%��
��#�0��
$�3?��@*.�#�"�*�Z�8�8�A�;��x�x���|��(�(�#��	J4r

Zerion Mini Shell 1.0