관리-도구
편집 파일: frontend.cpython-39.pyc
a �`I� � @ s d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl mZ ddlmZ ddl mZ ddlmZ ddlmZmZ dd lmZmZmZmZ dd lmZ ddlmZ ddlmZmZm Z m!Z! dd l"m#Z# ddl$m%Z%m&Z& ddl'm(Z( ddl)m*Z+ ddl,m-Z. ddl/m0Z0m1Z1 zddl2m3Z3 W n e4�yP ddl5m3Z3 Y n0 e�r\dndZ6d-dd�Z7G dd� de.�Z-G dd� de-�Z8G dd� de-�Z9dd� Z:G d d!� d!e-�Z;G d"d#� d#e-�Z<G d$d%� d%e=�Z>d&d'� Z?d.d(d)�Z@g fd*d+�ZAeBd,k�r e?� dS )/z� babel.messages.frontend ~~~~~~~~~~~~~~~~~~~~~~~ Frontends for the message extraction functionality. :copyright: (c) 2013-2021 by the Babel Team. :license: BSD, see LICENSE for more details. � )�print_functionN)�OrderedDict)�datetime)�getpreferredencoding)�__version__)�Locale� localedata)�StringIO�string_types� text_type�PY2)�UnknownLocaleError)�Catalog)�DEFAULT_KEYWORDS�DEFAULT_MAPPING�check_and_call_extract_file�extract_from_dir)�write_mo)�read_po�write_po)�LOCALTZ)�log)�Command)�DistutilsOptionError�DistutilsSetupError)�RawConfigParserZrU�rc 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>S � z listify_value.<locals>.<genexpr>c s s | ]}t |t�V qd S r )� isinstancer )r"