File: //usr/lib/python3.6/site-packages/babel/messages/__pycache__/frontend.cpython-36.opt-1.pyc
3
H��XU� � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl
m
Z
ddlmZ ddl
mZ ddl
mZmZ ddlmZmZmZ dd lmZ dd
lmZ ddlmZmZmZmZ ddlm Z dd
l!m"Z"m#Z# ddl$m%Z%m&Z& ddl'm(Z) ddl*m+Z, ddl-m.Z.m/Z/ yddl0m1Z1 W n" e2k
�rF ddl3m1Z1 Y nX d*dd�Z4G dd� de,�Z+G dd� de+�Z5G dd� de+�Z6dd� Z7G dd� de+�Z8G dd � d e+�Z9G d!d"� d"e:�Z;d#d$� Z<d+d%d&�Z=g fd'd(�Z>e?d)k�r�e<� dS ),z�
babel.messages.frontend
~~~~~~~~~~~~~~~~~~~~~~~
Frontends for the message extraction functionality.
:copyright: (c) 2013 by the Babel Team.
:license: BSD, see LICENSE for more details.
� )�print_functionN)�datetime)�getpreferredencoding)�__version__)�Locale�
localedata)�StringIO�string_types� text_type)�UnknownLocaleError)�Catalog)�DEFAULT_KEYWORDS�DEFAULT_MAPPING�check_and_call_extract_file�extract_from_dir)�write_mo)�read_po�write_po)�LOCALTZ�odict)�log)�Command)�DistutilsOptionError�DistutilsSetupError)�RawConfigParserc C st g }t | ttf�s| g} xV| D ]N}|dkr,qt |ttf�rN|jt||d�� q|jdd� t|�j|�D �� qW |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 | ]}|j � V qd S )N)�strip)�.0�s� r �/usr/lib/python3.6/frontend.py� <genexpr>O s z listify_value.<locals>.<genexpr>)�
isinstance�list�tuple�extend�
listify_valuer
r )�argr �out�valr r r r&