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


Python ScreenHandler.schedule_screen方法代码示例

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


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

示例1: start_rescue_mode_ui

# 需要导入模块: from simpleline.render.screen_handler import ScreenHandler [as 别名]
# 或者: from simpleline.render.screen_handler.ScreenHandler import schedule_screen [as 别名]
def start_rescue_mode_ui(anaconda):
    """Start the rescue mode UI."""

    ksdata_rescue = None
    if anaconda.ksdata.rescue.seen:
        ksdata_rescue = anaconda.ksdata.rescue
    scripts = anaconda.ksdata.scripts
    storage = anaconda.storage
    reboot = True
    if conf.target.is_image:
        reboot = False
    if flags.automatedInstall and anaconda.ksdata.reboot.action not in [KS_REBOOT, KS_SHUTDOWN]:
        reboot = False

    rescue = Rescue(storage, ksdata_rescue, reboot, scripts)
    rescue.initialize()

    # We still want to choose from multiple roots, or unlock encrypted devices
    # if needed, so we run UI even for kickstarts (automated install).
    App.initialize()
    loop = App.get_event_loop()
    loop.set_quit_callback(tui_quit_callback)
    spoke = RescueModeSpoke(rescue)
    ScreenHandler.schedule_screen(spoke)
    App.run()
开发者ID:rvykydal,项目名称:anaconda,代码行数:27,代码来源:rescue.py

示例2: changeVNCPasswdWindow

# 需要导入模块: from simpleline.render.screen_handler import ScreenHandler [as 别名]
# 或者: from simpleline.render.screen_handler.ScreenHandler import schedule_screen [as 别名]
    def changeVNCPasswdWindow(self):
        """ Change the password to a sane parameter.

        We ask user to input a password that (len(password) > 6
        and len(password) <= 8) or password == ''.
        """

        message = _("VNC password must be six to eight characters long.\n"
                    "Please enter a new one, or leave blank for no password.")
        App.initialize()
        loop = App.get_event_loop()
        loop.set_quit_callback(tui_quit_callback)
        spoke = VNCPassSpoke(self.anaconda.ksdata, None, None, None, message)
        ScreenHandler.schedule_screen(spoke)
        App.run()

        self.password = self.anaconda.ksdata.vnc.password
开发者ID:jaymzh,项目名称:anaconda,代码行数:19,代码来源:vnc.py

示例3: ask_vnc_question

# 需要导入模块: from simpleline.render.screen_handler import ScreenHandler [as 别名]
# 或者: from simpleline.render.screen_handler.ScreenHandler import schedule_screen [as 别名]
def ask_vnc_question(anaconda, vnc_server, message):
    """ Ask the user if TUI or GUI-over-VNC should be started.

    :param anaconda: instance of the Anaconda class
    :param vnc_server: instance of the VNC server object
    :param str message: a message to show to the user together
                        with the question
    """
    App.initialize()
    loop = App.get_event_loop()
    loop.set_quit_callback(tui_quit_callback)
    spoke = AskVNCSpoke(anaconda.ksdata, message)
    ScreenHandler.schedule_screen(spoke)
    App.run()

    if anaconda.ksdata.vnc.enabled:
        if not anaconda.gui_mode:
            log.info("VNC requested via VNC question, switching Anaconda to GUI mode.")
        anaconda.display_mode = constants.DisplayModes.GUI
        flags.usevnc = True
        vnc_server.password = anaconda.ksdata.vnc.password
开发者ID:zhangsju,项目名称:anaconda,代码行数:23,代码来源:display.py


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