| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/babel/messages/__pycache__/ |
Upload File : |
a
�4d� � @ sP d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
mZ ddlm
Z
ddlmZ ddlmZ ddlmZmZ ddlmZ dd lmZ dd
lmZmZ ddlmZmZmZm Z ddl!m"Z" dd
l#m$Z$m%Z% ddl&m'Z' e�(d�Z)zNddl*m+Z, e)Z-zddl.m/Z/m0Z0m1Z1 W n e2�yH e3 Z0 Z1Z/Y n0 W nP e2�y� ddl4m)Z- ddl5m+Z, ddl6m7Z/ ddl6m8Z0 ddl6m9Z1 Y n0 d1dd�Z:G dd� de,�Z+G dd� de+�Z;dd� Z<G dd� de+�Z=d d!� Z>G d"d#� d#e+�Z?G d$d%� d%e+�Z@G d&d'� d'�ZAd(d)� ZBd2d*d+�ZCd3eeD d-�d.d/�ZEeFd0k�rLeB� dS )4z�
babel.messages.frontend
~~~~~~~~~~~~~~~~~~~~~~~
Frontends for the message extraction functionality.
:copyright: (c) 2013-2023 by the Babel Team.
:license: BSD, see LICENSE for more details.
� N)�OrderedDict)�RawConfigParser)�StringIO)�Iterable)�Locale�
localedata)�__version__)�UnknownLocaleError)�DEFAULT_HEADER�Catalog)�DEFAULT_KEYWORDS�DEFAULT_MAPPING�check_and_call_extract_file�extract_from_dir)�write_mo)�read_po�write_po)�LOCALTZ�babel)�Command)� BaseError�OptionError�
SetupError)�log)�DistutilsError)�DistutilsOptionError)�DistutilsSetupErrorc C s� g }t | ttf�s| g} | D ]N}|du r*qt |ttf�rL|�t||d�� q|�dd� t|��|�D �� qtdd� |D ��s�J �|S )a
Make a list out of an argument.
Values from `distutils` argument parsing are always single strings;
values from `optparse` parsing may be lists of strings that may need
to be further split.
No matter the input, this function returns a flat list of whitespace-trimmed
strings, with `None` values filtered out.
>>> listify_value("foo bar")
['foo', 'bar']
>>> listify_value(["foo bar"])
['foo', 'bar']
>>> listify_value([["foo"], "bar"])
['foo', 'bar']
>>> listify_value([["foo"], ["bar", None, "foo"]])
['foo', 'bar', 'foo']
>>> listify_value("foo, bar, quux", ",")
['foo', 'bar', 'quux']
:param arg: A string or a list of strings
:param split: The argument to pass to `str.split()`.
:return:
N��splitc s s | ]}|� � V qd S �N��strip)�.0�s� r$ �;/usr/lib/python3.9/site-packages/babel/messages/frontend.py� <genexpr>` � z listify_value.<locals>.<genexpr>c s s | ]}t |t�V qd S r )�
isinstance�str)r"