# Path: pyanaconda/iutil.py
# def augmentEnv():
# def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None):
#     def chroot():
# def execWithRedirect(command, argv, stdin=None, stdout=None,
#                      root='/', env_prune=None):
# def execWithCapture(command, argv, stdin=None, root='/'):
# def execReadlines(command, argv, stdin=None, root='/', env_prune=None):
#     def queue_lines(out, queue):
#     def chroot():
# def execConsole():
# def getDirSize(directory):
#     def getSubdirSize(directory):
# def mkdirChain(directory):
# def get_active_console(dev="console"):
# def isConsoleOnVirtualTerminal(dev="console"):
# def strip_markup(text):
# def reIPL(ipldev):
# def resetRpmDb():
# def parseNfsUrl(nfsurl):
# def add_po_path(module, directory):
# def setup_translations(module):
# def fork_orphan():
# def _run_systemctl(command, service):
# def start_service(service):
# def stop_service(service):
# def restart_service(service):
# def service_running(service):
# def dracut_eject(device):
# def vtActivate(num):
#     def __init__(self, url=None, protocol="http://", host=None, port="3128",
#                  username=None, password=None):
#     def parse_url(self):
#     def parse_components(self):
#     def dict(self):
#     def __str__(self):
# def getdeepattr(obj, name):
# def setdeepattr(obj, name, value):
# def strip_accents(s):
# def cmp_obj_attrs(obj1, obj2, attr_list):
# def dir_tree_map(root, func, files=True, dirs=True):
# def chown_dir_tree(root, uid, gid, from_uid_only=None, from_gid_only=None):
#     def conditional_chown(path, uid, gid, from_uid=None, from_gid=None):
# def is_unsupported_hw():
# def _toASCII(s):
# def upperASCII(s):
# def lowerASCII(s):
# def upcase_first_letter(text):
# class ProxyStringError(Exception):
# class ProxyString(object):
# 
# Path: pyanaconda/flags.py
# class Flags(object):
# class BootArgs(OrderedDict):
#     def __setattr__(self, attr, val):
#     def get(self, attr, val=None):
#     def set_cmdline_bool(self, flag):
#     def __init__(self, read_cmdline=True):
#     def read_cmdline(self):
#     def __init__(self, cmdline=None, files=None):
#     def read(self, filenames):
#     def readstr(self, cmdline):
#     def getbool(self, arg, default=False):
# def can_touch_runtime_system(msg, touch_live=False):
# 
# Path: pyanaconda/constants.py
# DEFAULT_VC_FONT = "latarcyrheb-sun16"
# 
# DEFAULT_KEYBOARD = "us"
# 
# THREAD_XKL_WRAPPER_INIT = "AnaXklWrapperInitThread"
# 
# Path: pyanaconda/threads.py
# class ThreadManager(object):
# class AnacondaThread(threading.Thread):
#     def __init__(self):
#     def __call__(self):
#     def add(self, obj):
#     def remove(self, name):
#     def exists(self, name):
#     def get(self, name):
#     def wait(self, name):
#     def wait_all(self):
#     def set_error(self, name, *exc_info):
#     def get_error(self, name):
#     def any_errors(self):
#     def raise_error(self, name):
#     def in_main_thread(self):
#     def running(self):
#     def names(self):
#     def __init__(self, *args, **kwargs):
#     def run(self, *args, **kwargs):
# def initThreading():


import types
import os
import re
import shutil
import ctypes
import gettext
import threading
import logging
from collections import namedtuple
from pyanaconda import iutil
from pyanaconda import flags
from pyanaconda.safe_dbus import dbus_call_safe_sync, dbus_get_property_safe_sync
from pyanaconda.safe_dbus import DBUS_SYSTEM_BUS_ADDR, DBusPropertyError
from pyanaconda.constants import DEFAULT_VC_FONT, DEFAULT_KEYBOARD, THREAD_XKL_WRAPPER_INIT
from pyanaconda.threads import threadMgr, AnacondaThread
from gi.repository import Xkl, Gio, GLib
        from gi.repository import GdkX11
    def get_layout_variant_description(self, layout_variant, with_lang=True, xlated=True):
        """
        Get description of the given layout-variant.

        :param layout_variant: layout-variant specification (e.g. 'cz (qwerty)')
        :type layout_variant: str
        :param with_lang: whether to include language of the layout-variant (if defined)
                          in the description or not
        :type with_lang: bool
        :param xlated: whethe to return translated or english version of the description
        :type xlated: bool
        :return: description of the layout-variant specification (e.g. 'Czech (qwerty)')
        :rtype: str

        """

        layout_info = self._layout_infos[layout_variant]
        if xlated:
            description = Xkb_(layout_info.desc).decode("utf-8")
        else:
            description = layout_info.desc

        if with_lang and layout_info.lang:
            # translate language and upcase its first letter, translate the
            # layout-variant description
            if xlated:
                lang = iso_(layout_info.lang).decode("utf-8")
            else:
                lang = layout_info.lang


# Path: pyanaconda/iutil.py
# def augmentEnv():
# def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None):
#     def chroot():
# def execWithRedirect(command, argv, stdin=None, stdout=None,
#                      root='/', env_prune=None):
# def execWithCapture(command, argv, stdin=None, root='/'):
# def execReadlines(command, argv, stdin=None, root='/', env_prune=None):
#     def queue_lines(out, queue):
#     def chroot():
# def execConsole():
# def getDirSize(directory):
#     def getSubdirSize(directory):
# def mkdirChain(directory):
# def get_active_console(dev="console"):
# def isConsoleOnVirtualTerminal(dev="console"):
# def strip_markup(text):
# def reIPL(ipldev):
# def resetRpmDb():
# def parseNfsUrl(nfsurl):
# def add_po_path(module, directory):
# def setup_translations(module):
# def fork_orphan():
# def _run_systemctl(command, service):
# def start_service(service):
# def stop_service(service):
# def restart_service(service):
# def service_running(service):
# def dracut_eject(device):
# def vtActivate(num):
#     def __init__(self, url=None, protocol="http://", host=None, port="3128",
#                  username=None, password=None):
#     def parse_url(self):
#     def parse_components(self):
#     def dict(self):
#     def __str__(self):
# def getdeepattr(obj, name):
# def setdeepattr(obj, name, value):
# def strip_accents(s):
# def cmp_obj_attrs(obj1, obj2, attr_list):
# def dir_tree_map(root, func, files=True, dirs=True):
# def chown_dir_tree(root, uid, gid, from_uid_only=None, from_gid_only=None):
#     def conditional_chown(path, uid, gid, from_uid=None, from_gid=None):
# def is_unsupported_hw():
# def _toASCII(s):
# def upperASCII(s):
# def lowerASCII(s):
# def upcase_first_letter(text):
# class ProxyStringError(Exception):
# class ProxyString(object):
# 
# Path: pyanaconda/flags.py
# class Flags(object):
# class BootArgs(OrderedDict):
#     def __setattr__(self, attr, val):
#     def get(self, attr, val=None):
#     def set_cmdline_bool(self, flag):
#     def __init__(self, read_cmdline=True):
#     def read_cmdline(self):
#     def __init__(self, cmdline=None, files=None):
#     def read(self, filenames):
#     def readstr(self, cmdline):
#     def getbool(self, arg, default=False):
# def can_touch_runtime_system(msg, touch_live=False):
# 
# Path: pyanaconda/constants.py
# DEFAULT_VC_FONT = "latarcyrheb-sun16"
# 
# DEFAULT_KEYBOARD = "us"
# 
# THREAD_XKL_WRAPPER_INIT = "AnaXklWrapperInitThread"
# 
# Path: pyanaconda/threads.py
# class ThreadManager(object):
# class AnacondaThread(threading.Thread):
#     def __init__(self):
#     def __call__(self):
#     def add(self, obj):
#     def remove(self, name):
#     def exists(self, name):
#     def get(self, name):
#     def wait(self, name):
#     def wait_all(self):
#     def set_error(self, name, *exc_info):
#     def get_error(self, name):
#     def any_errors(self):
#     def raise_error(self, name):
#     def in_main_thread(self):
#     def running(self):
#     def names(self):
#     def __init__(self, *args, **kwargs):
#     def run(self, *args, **kwargs):
# def initThreading():


# Path: pyanaconda/keyboard.py
import types
import os
import re
import shutil
import ctypes
import gettext
import threading
import logging
from collections import namedtuple
from pyanaconda import iutil
from pyanaconda import flags
from pyanaconda.safe_dbus import dbus_call_safe_sync, dbus_get_property_safe_sync
from pyanaconda.safe_dbus import DBUS_SYSTEM_BUS_ADDR, DBusPropertyError
from pyanaconda.constants import DEFAULT_VC_FONT, DEFAULT_KEYBOARD, THREAD_XKL_WRAPPER_INIT
from pyanaconda.threads import threadMgr, AnacondaThread
from gi.repository import Xkl, Gio, GLib
        from gi.repository import GdkX11

    def get_layout_variant_description(self, layout_variant, with_lang=True, xlated=True):
        """
        Get description of the given layout-variant.

        :param layout_variant: layout-variant specification (e.g. 'cz (qwerty)')
        :type layout_variant: str
        :param with_lang: whether to include language of the layout-variant (if defined)
                          in the description or not
        :type with_lang: bool
        :param xlated: whethe to return translated or english version of the description
        :type xlated: bool
        :return: description of the layout-variant specification (e.g. 'Czech (qwerty)')
        :rtype: str

        """

        layout_info = self._layout_infos[layout_variant]
        if xlated:
            description = Xkb_(layout_info.desc).decode("utf-8")
        else:
            description = layout_info.desc

        if with_lang and layout_info.lang:
            # translate language and upcase its first letter, translate the
            # layout-variant description
            if xlated:
                lang = iso_(layout_info.lang).decode("utf-8")
            else:
                lang = layout_info.lang


            return "%s (%s)" % (iutil.upcase_first_letter(lang), description)