当前位置: 首页>>代码示例>>Python>>正文


Python NormalTUISpoke.__init__方法代码示例

本文整理汇总了Python中pyanaconda.ui.tui.spokes.NormalTUISpoke.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python NormalTUISpoke.__init__方法的具体用法?Python NormalTUISpoke.__init__怎么用?Python NormalTUISpoke.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyanaconda.ui.tui.spokes.NormalTUISpoke的用法示例。


在下文中一共展示了NormalTUISpoke.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, app, data, storage, payload, instclass, roots):
        NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)

        self._root = None
        self._roots = roots
        # default to selecting the first root in the list
        self._selection = 0
开发者ID:rtruxal,项目名称:anaconda,代码行数:9,代码来源:rescue.py

示例2: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, data, storage, payload, instclass):
        FirstbootSpokeMixIn.__init__(self)
        NormalTUISpoke.__init__(self, data, storage, payload, instclass)

        self.initialize_start()

        self.title = N_("User creation")
        self._container = None

        if self.data.user.userList:
            self._user_data = self.data.user.userList[0]
            self._create_user = True
        else:
            self._user_data = self.data.UserData()
            self._create_user = False

        self._use_password = self._user_data.isCrypted or self._user_data.password
        self._groups = ""
        self._is_admin = False
        self._policy = self.data.anaconda.pwpolicy.get_policy("user", fallback_to_default=True)

        self.errors = []

        self._users_module = USERS.get_observer()
        self._users_module.connect()

        self.initialize_done()
开发者ID:zhangsju,项目名称:anaconda,代码行数:29,代码来源:user.py

示例3: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, app, data, storage, payload, instclass):
        """
        :see: pyanaconda.ui.tui.base.UIScreen
        :see: pyanaconda.ui.tui.base.App
        :param app: reference to application which is a main class for TUI
                    screen handling, it is responsible for mainloop control
                    and keeping track of the stack where all TUI screens are
                    scheduled
        :type app: instance of pyanaconda.ui.tui.base.App
        :param data: data object passed to every spoke to load/store data
                     from/to it
        :type data: pykickstart.base.BaseHandler
        :param storage: object storing storage-related information
                        (disks, partitioning, bootloader, etc.)
        :type storage: blivet.Blivet
        :param payload: object storing packaging-related information
        :type payload: pyanaconda.packaging.Payload
        :param instclass: distribution-specific information
        :type instclass: pyanaconda.installclass.BaseInstallClass

        """

        NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)

        self.done = False
开发者ID:marmarek,项目名称:qubes-installer-qubes-os,代码行数:27,代码来源:qubes_os.py

示例4: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, app, data, storage, payload, instclass):
        NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)

        self._ready = False
        self.selected_disks = self.data.ignoredisk.onlyuse[:]
        self.selection = None

        self.autopart = None
        self.clearPartType = None

        # This list gets set up once in initialize and should not be modified
        # except perhaps to add advanced devices. It will remain the full list
        # of disks that can be included in the install.
        self.disks = []
        self.errors = []
        self.warnings = []

        if self.data.zerombr.zerombr and arch.isS390():
            # if zerombr is specified in a ks file and there are unformatted
            # dasds, automatically format them. pass in storage.devicetree here
            # instead of storage.disks since mediaPresent is checked on disks;
            # a dasd needing dasdfmt will fail this media check though
            to_format = storage.devicetree.make_unformatted_dasd_list(getDisks(self.storage.devicetree))
            if to_format:
                self.run_dasdfmt(to_format)

        if not flags.automatedInstall:
            # default to using autopart for interactive installs
            self.data.autopart.autopart = True
开发者ID:galleguindio,项目名称:anaconda,代码行数:31,代码来源:storage.py

示例5: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
 def __init__(self, app, data, storage, payload, instclass, message=None):
     NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
     self._password = ""
     if message:
         self._message = message
     else:
         self._message = _("Please provide VNC password. You will have to type it twice. \n"
                           "Leave blank for no password")
开发者ID:cs2c-zhangchao,项目名称:nkwin1.0-anaconda,代码行数:10,代码来源:askvnc.py

示例6: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
 def __init__(self, app, data, storage, payload, instclass, device):
     NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
     SourceSwitchHandler.__init__(self)
     self.selection = None
     self.args = self.data.method
     self._device = device
     self._mount_device()
     self._isos = self._getISOs()
开发者ID:adrelanos,项目名称:qubes-installer-qubes-os,代码行数:10,代码来源:source.py

示例7: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, data, storage, payload, instclass, protocol):
        NormalTUISpoke.__init__(self, data, storage, payload, instclass)
        SourceSwitchHandler.__init__(self)
        self.title = N_("Specify Repo Options")
        self.protocol = protocol
        self._container = None

        self._url = self.data.url.url
开发者ID:zhangsju,项目名称:anaconda,代码行数:10,代码来源:installation_source.py

示例8: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
 def __init__(self, data, storage, payload, instclass):
     NormalTUISpoke.__init__(self, data, storage, payload, instclass)
     self.title = N_("Partition Scheme Options")
     self._container = None
     self.part_schemes = OrderedDict()
     pre_select = self.data.autopart.type or DEFAULT_AUTOPART_TYPE
     for item in AUTOPART_CHOICES:
         self.part_schemes[item[0]] = item[1]
         if item[1] == pre_select:
             self._selected_scheme_value = item[1]
开发者ID:jaymzh,项目名称:anaconda,代码行数:12,代码来源:storage.py

示例9: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, app, data, storage, payload, instclass):
        NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)

        self._langs = [localization.get_english_name(lang)
                        for lang in localization.get_available_translations()]
        self._langs_and_locales = dict((localization.get_english_name(lang), lang)
                                for lang in localization.get_available_translations())
        self._locales = dict((lang, localization.get_language_locales(lang))
                                for lang in self._langs_and_locales.values())
        self._selected = self.data.lang.lang
开发者ID:jktjkt,项目名称:anaconda,代码行数:12,代码来源:langsupport.py

示例10: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
 def __init__(self, data, storage, payload, instclass):
     NormalTUISpoke.__init__(self, data, storage, payload, instclass)
     self.title = N_("Network configuration")
     self._network_module = NETWORK.get_observer()
     self._network_module.connect()
     self._container = None
     self._value = self._network_module.proxy.Hostname
     self.supported_devices = []
     self.errors = []
     self._apply = False
开发者ID:zhangsju,项目名称:anaconda,代码行数:12,代码来源:network.py

示例11: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, data, storage, payload):
        NormalTUISpoke.__init__(self, data, storage, payload)
        self.title = N_("Time settings")
        self._timezone_spoke = None
        self._container = None
        # we use an ordered dict to keep the NTP server insertion order
        self._ntp_servers = OrderedDict()
        self._ntp_servers_lock = RLock()

        self._timezone_module = TIMEZONE.get_observer()
        self._timezone_module.connect()
开发者ID:rvykydal,项目名称:anaconda,代码行数:13,代码来源:time_spoke.py

示例12: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, app, data, storage=None, payload=None,
                 instclass=None, message=""):
        NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
        self.initialize_start()

        # The TUI hasn't been initialized with the message handlers yet. Add an
        # exception message handler so that the TUI exits if anything goes wrong
        # at this stage.
        self._app.register_event_handler(hubQ.HUB_CODE_EXCEPTION, exception_msg_handler_and_exit)
        self._message = message
        self._choices = (_(USEVNC), _(USETEXT))
        self._usevnc = False
        self.initialize_done()
开发者ID:dougsland,项目名称:anaconda,代码行数:15,代码来源:askvnc.py

示例13: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, app, data, storage, payload, instclass):
        NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)

        # it's stupid to call get_all_regions_and_timezones twice, but regions
        # needs to be unsorted in order to display in the same order as the GUI
        # so whatever
        self._regions = list(timezone.get_all_regions_and_timezones().keys())
        self._timezones = dict((k, sorted(v)) for k, v in timezone.get_all_regions_and_timezones().items())
        self._lower_regions = [r.lower() for r in self._timezones]

        self._zones = ["%s/%s" % (region, z) for region in self._timezones for z in self._timezones[region]]
        # for lowercase lookup
        self._lower_zones = [z.lower().replace("_", " ") for region in self._timezones for z in self._timezones[region]]
        self._selection = ""
开发者ID:adrelanos,项目名称:qubes-installer-qubes-os,代码行数:16,代码来源:time_spoke.py

示例14: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, app, data, storage, payload, instclass):
        NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
        self._ready = False
        self.errors = []
        self._tx_id = None
        # default to first selection (Gnome) in list of environments
        self._selection = 0
        self.environment = None

        # for detecting later whether any changes have been made
        self._origEnv = None

        # are we taking values (package list) from a kickstart file?
        self._kickstarted = flags.automatedInstall and self.data.packages.seen
开发者ID:joesaland,项目名称:qubes-installer-qubes-os,代码行数:16,代码来源:software.py

示例15: __init__

# 需要导入模块: from pyanaconda.ui.tui.spokes import NormalTUISpoke [as 别名]
# 或者: from pyanaconda.ui.tui.spokes.NormalTUISpoke import __init__ [as 别名]
    def __init__(self, data, storage=None, payload=None, instclass=None, message=""):
        NormalTUISpoke.__init__(self, data, storage, payload, instclass)
        self.input_required = True
        self.initialize_start()
        self._container = None

        # The TUI hasn't been initialized with the message handlers yet. Add an
        # exception message handler so that the TUI exits if anything goes wrong
        # at this stage.
        loop = App.get_event_loop()
        loop.register_signal_handler(ExceptionSignal, exception_msg_handler_and_exit)
        self._message = message
        self._usevnc = False
        self.initialize_done()
开发者ID:jaymzh,项目名称:anaconda,代码行数:16,代码来源:askvnc.py


注:本文中的pyanaconda.ui.tui.spokes.NormalTUISpoke.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。