# Path: dnf/i18n.py
# class UnicodeStream(object):
#     def __init__(self, stream, encoding):
#     def write(self, s):
#     def __getattr__(self, name):
# def _full_ucd_support(encoding):
# def _guess_encoding():
# def setup_locale():
# def setup_stdout():
# def ucd_input(ucstring):
# def ucd(obj):
# def _exact_width_char(uchar):
# def chop_str(msg, chop=None):
# def exact_width(msg):
# def fill_exact_width(msg, fill, chop=None, left=True, prefix='', suffix=''):
# def textwrap_fill(text, width=70, initial_indent='', subsequent_indent=''):
#     def _indent_at_beg(line):
# def select_short_long(width, msg_short, msg_long):
# def translation(name):
#     def ucd_wrapper(fnc):
# def pgettext(context, message):
# _, P_ = translation("dnf")
# C_ = pgettext
# 
# Path: dnf/util.py
# def _parse_specs(namespace, values):
#     """
#     Categorize :param values list into packages, groups and filenames
# 
#     :param namespace: argparse.Namespace, where specs will be stored
#     :param values: list of specs, whether packages ('foo') or groups/modules ('@bar')
#                    or filenames ('*.rmp', 'http://*', ...)
# 
#     To access packages use: specs.pkg_specs,
#     to access groups use: specs.grp_specs,
#     to access filenames use: specs.filenames
#     """
# 
#     setattr(namespace, "filenames", [])
#     setattr(namespace, "grp_specs", [])
#     setattr(namespace, "pkg_specs", [])
#     tmp_set = set()
#     for value in values:
#         if value in tmp_set:
#             continue
#         tmp_set.add(value)
#         schemes = dnf.pycomp.urlparse.urlparse(value)[0]
#         if value.endswith('.rpm'):
#             namespace.filenames.append(value)
#         elif schemes and schemes in ('http', 'ftp', 'file', 'https'):
#             namespace.filenames.append(value)
#         elif value.startswith('@'):
#             namespace.grp_specs.append(value[1:])
#         else:
#             namespace.pkg_specs.append(value)


from dnf.i18n import _
from dnf.util import _parse_specs
import argparse
import dnf.exceptions
import dnf.util
import dnf.rpm
import dnf.yum.misc
import logging
import os.path
import re
import sys
            kwargs['default'] = []
            super(OptionParser.PkgNarrowCallback, self).__init__(*args, **kwargs)

        def __call__(self, parser, namespace, values, opt_str):
            dest_action = self.dest + '_action'
            if not values or values[0] not in self.pkgnarrow['choices']:
                narrow = self.pkgnarrow['default']
            else:
                narrow = values.pop(0)
            setattr(namespace, dest_action, narrow)
            setattr(namespace, self.dest, values)

    class ForceArchAction(argparse.Action):
        def __call__(self, parser, namespace, values, opt_str):
            namespace.ignorearch = True
            namespace.arch = values

    def _add_general_options(self):
        """ Standard options known to all dnf subcommands. """
        # All defaults need to be a None, so we can always tell whether the user
        # has set something or whether we are getting a default.
        general_grp = self.add_argument_group(_('General {prog} options'.format(
            prog=dnf.util.MAIN_PROG_UPPER)))
        general_grp.add_argument("-c", "--config", dest="config_file_path",
                                 default=None, metavar='[config file]',
                                 help=_("config file location"))
        general_grp.add_argument("-q", "--quiet", dest="quiet",
                                 action="store_true", default=None,
                                 help=_("quiet operation"))
        general_grp.add_argument("-v", "--verbose", action="store_true",

# Path: dnf/i18n.py
# class UnicodeStream(object):
#     def __init__(self, stream, encoding):
#     def write(self, s):
#     def __getattr__(self, name):
# def _full_ucd_support(encoding):
# def _guess_encoding():
# def setup_locale():
# def setup_stdout():
# def ucd_input(ucstring):
# def ucd(obj):
# def _exact_width_char(uchar):
# def chop_str(msg, chop=None):
# def exact_width(msg):
# def fill_exact_width(msg, fill, chop=None, left=True, prefix='', suffix=''):
# def textwrap_fill(text, width=70, initial_indent='', subsequent_indent=''):
#     def _indent_at_beg(line):
# def select_short_long(width, msg_short, msg_long):
# def translation(name):
#     def ucd_wrapper(fnc):
# def pgettext(context, message):
# _, P_ = translation("dnf")
# C_ = pgettext
# 
# Path: dnf/util.py
# def _parse_specs(namespace, values):
#     """
#     Categorize :param values list into packages, groups and filenames
# 
#     :param namespace: argparse.Namespace, where specs will be stored
#     :param values: list of specs, whether packages ('foo') or groups/modules ('@bar')
#                    or filenames ('*.rmp', 'http://*', ...)
# 
#     To access packages use: specs.pkg_specs,
#     to access groups use: specs.grp_specs,
#     to access filenames use: specs.filenames
#     """
# 
#     setattr(namespace, "filenames", [])
#     setattr(namespace, "grp_specs", [])
#     setattr(namespace, "pkg_specs", [])
#     tmp_set = set()
#     for value in values:
#         if value in tmp_set:
#             continue
#         tmp_set.add(value)
#         schemes = dnf.pycomp.urlparse.urlparse(value)[0]
#         if value.endswith('.rpm'):
#             namespace.filenames.append(value)
#         elif schemes and schemes in ('http', 'ftp', 'file', 'https'):
#             namespace.filenames.append(value)
#         elif value.startswith('@'):
#             namespace.grp_specs.append(value[1:])
#         else:
#             namespace.pkg_specs.append(value)


# Path: dnf/cli/option_parser.py
from dnf.i18n import _
from dnf.util import _parse_specs
import argparse
import dnf.exceptions
import dnf.util
import dnf.rpm
import dnf.yum.misc
import logging
import os.path
import re
import sys

            kwargs['default'] = []
            super(OptionParser.PkgNarrowCallback, self).__init__(*args, **kwargs)

        def __call__(self, parser, namespace, values, opt_str):
            dest_action = self.dest + '_action'
            if not values or values[0] not in self.pkgnarrow['choices']:
                narrow = self.pkgnarrow['default']
            else:
                narrow = values.pop(0)
            setattr(namespace, dest_action, narrow)
            setattr(namespace, self.dest, values)

    class ForceArchAction(argparse.Action):
        def __call__(self, parser, namespace, values, opt_str):
            namespace.ignorearch = True
            namespace.arch = values

    def _add_general_options(self):
        """ Standard options known to all dnf subcommands. """
        # All defaults need to be a None, so we can always tell whether the user
        # has set something or whether we are getting a default.
        general_grp = self.add_argument_group(_('General {prog} options'.format(
            prog=dnf.util.MAIN_PROG_UPPER)))
        general_grp.add_argument("-c", "--config", dest="config_file_path",
                                 default=None, metavar='[config file]',
                                 help=_("config file location"))
        general_grp.add_argument("-q", "--quiet", dest="quiet",
                                 action="store_true", default=None,
                                 help=_("quiet operation"))
        general_grp.add_argument("-v", "--verbose", action="store_true",

                                 default=None, help=_("verbose operation"))