File: //proc/self/root/usr/lib/python3.6/site-packages/ipalib/__pycache__/misc.cpython-36.opt-1.pyc
3
�d[e�
� @ sn d dl Z d dlmZmZmZ d dlmZmZ d dlmZ d dl m
Z
e
� ZG dd� de�ZG dd � d e�Z
dS )
� N)�
LocalOrRemote�_�ngettext)�Output�summary)�Flag)�Registryc @ s� e Zd Zed�Zed�ZdZeje dded�dddgd d
�f Ze
deed�d
�e
deed�dgd�e
deed�dgd�e
fZdd� Zddd�ZdS )�envzShow environment variables.z%(count)d variables�
variables*�allzJretrieve and print all attributes from the server. Affects command output.�webui� no_option� no_outputT)�cli_name�doc�exclude�flags�default�resultz)Dictionary mapping variable name to value)�typer �totalz(Total number of variables env (>= count)Z
no_display)r r r �countz'Number of variables returned (<= total)c C sp t � }xd|D ]\}d|krTtj|jdd�d �}x8| jD ]}|j|�r6|j|� q6W q|| jkr|j|� qW |S )N�*z.*�$)�set�re�compile�replacer �match�add)�self� variables�keysZqueryZpat�key� r$ �/usr/lib/python3.6/misc.pyZ__find_keys= s
zenv.__find_keysNc sl |d kr� j }n
� j|�}tt� fdd�|D ��t|�t� j �d�}t|�dkr`� j| |d<