관리-도구
편집 파일: frontend.cpython-311.pyc
� Q�Dg� � � � 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' ej( d� � Z) ddl*m+Z, e)Z- ddl.m/Z/m0Z0m1Z1 n# e2$ r e3xZ0xZ1Z/Y nw xY wn)# e2$ r! ddl4m)Z- ddl5m+Z, ddl6m7Z/ ddl6m8Z0 ddl6m9Z1 Y nw xY wd+d�Z: G d� de,� � Z+ G d� de+� � Z;d� Z< G d� de+� � Z=d� Z> G d� d e+� � Z? G d!� d"e+� � Z@ G d#� d$� � ZAd%� ZBd+d&�ZCd,d(eeD fd)�ZEeFd*k r eB� � dS dS )-z� 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 � � g }t | t t f� � s| g} | D ]�}|��t |t t f� � r%|� t ||�� � � � �F|� d� t |� � � |� � D � � � � ��t d� |D � � � � sJ �|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 3 �>