pyanaconda.ui.tui package

Submodules

pyanaconda.ui.tui.tuiobject module

class pyanaconda.ui.tui.tuiobject.ErrorDialog(app, message)

Bases: pyanaconda.ui.tui.simpleline.base.UIScreen

Dialog screen for reporting errors to user.

Parameters:
  • app (instance of App class) – the running application reference
  • message (unicode) – the message to show to the user
input(args, key)

This dialog is closed by any input.

prompt(args=None)
refresh(args=None)
title = 'Error'
class pyanaconda.ui.tui.tuiobject.TUIObject(app, data)

Bases: pyanaconda.ui.tui.simpleline.base.UIScreen, pyanaconda.ui.common.UIObject

Base class for Anaconda specific TUI screens. Implements the common pyanaconda.ui.common.UIObject interface

refresh(args=None)

Put everything to display into self.window list.

showable
title = u'Default title'
class pyanaconda.ui.tui.tuiobject.YesNoDialog(app, message)

Bases: pyanaconda.ui.tui.simpleline.base.UIScreen

Dialog screen for Yes - No questions.

Parameters:
  • app (instance of App class) – the running application reference
  • message (unicode) – the message to show to the user
answer

The response can be True (yes), False (no) or None (no response).

input(args, key)
prompt(args=None)
refresh(args=None)
title = 'Question'

Module contents

class pyanaconda.ui.tui.TextUserInterface(storage, payload, instclass, productTitle=u'Anaconda', isFinal=True, quitMessage=None)

Bases: pyanaconda.ui.UserInterface

This is the main class for Text user interface.

For detailed description of the arguments see the parent class.

Parameters:
  • storage (instance of pyanaconda.Storage) – storage backend reference
  • payload (instance of payload handler) – payload (usually yum) reference
  • instclass (instance of install class) – install class reference
  • productTitle (unicode string) – the name of the product
  • isFinal (bool) – Boolean that marks the release as final (True) or development (False) version.
  • quitMessage (unicode string) – The text to be used in quit dialog question. It should not be translated to allow for change of language.
ENVIRONMENT = 'anaconda'
basemask = 'pyanaconda.ui'
basepath = '/home/bcl/Red_Hat/projs/anaconda/pyanaconda/ui/tui'
dir = '/usr/lib/site-python'
meh_interface
path = '/usr/lib64/python2.7/site-packages/pyanaconda/ui'
pathlist = set(['/tmp/updates/pyanaconda/ui', '/usr/lib/site-python/pyanaconda/ui', '/usr/lib/python2.7/site-packages/pyanaconda/ui', '/home/bcl/Red_Hat/projs/anaconda/pyanaconda/ui/tui', '/usr/lib64/python2.7/site-packages/pyanaconda/ui'])
paths = {'hubs': [('pyanaconda.ui.tui.hubs.%s', '/tmp/updates/pyanaconda/ui/tui/hubs'), ('pyanaconda.ui.tui.hubs.%s', '/usr/lib/site-python/pyanaconda/ui/tui/hubs'), ('pyanaconda.ui.tui.hubs.%s', '/usr/lib/python2.7/site-packages/pyanaconda/ui/tui/hubs'), ('pyanaconda.ui.tui.hubs.%s', '/home/bcl/Red_Hat/projs/anaconda/pyanaconda/ui/tui/tui/hubs'), ('pyanaconda.ui.tui.hubs.%s', '/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/hubs')], 'spokes': [('pyanaconda.ui.tui.spokes.%s', '/tmp/updates/pyanaconda/ui/tui/spokes'), ('pyanaconda.ui.tui.spokes.%s', '/usr/lib/site-python/pyanaconda/ui/tui/spokes'), ('pyanaconda.ui.tui.spokes.%s', '/usr/lib/python2.7/site-packages/pyanaconda/ui/tui/spokes'), ('pyanaconda.ui.tui.spokes.%s', '/home/bcl/Red_Hat/projs/anaconda/pyanaconda/ui/tui/tui/spokes'), ('pyanaconda.ui.tui.spokes.%s', '/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/spokes')], 'categories': [('pyanaconda.ui.categories.%s', '/tmp/updates/pyanaconda/ui/categories'), ('pyanaconda.ui.categories.%s', '/usr/lib/site-python/pyanaconda/ui/categories'), ('pyanaconda.ui.categories.%s', '/usr/lib/python2.7/site-packages/pyanaconda/ui/categories'), ('pyanaconda.ui.categories.%s', '/home/bcl/Red_Hat/projs/anaconda/pyanaconda/ui/tui/categories'), ('pyanaconda.ui.categories.%s', '/usr/lib64/python2.7/site-packages/pyanaconda/ui/categories')]}
run()

Run the interface. This should do little more than just pass through to something else’s run method, but is provided here in case more is needed. This method must be provided by all subclasses.

setup(data)

Construct all the objects required to implement this interface. This method must be provided by all subclasses.

showDetailedError(message, details, buttons=None)
showError(message)

Display an error dialog with the given message. After this dialog is displayed, anaconda will quit. There is no return value. This method must be implemented by all UserInterface subclasses.

In the code, this method should be used sparingly and only for critical errors that anaconda cannot figure out how to recover from.

showYesNoQuestion(message)

Display a dialog with the given message that presents the user a yes or no choice. This method returns True if the yes choice is selected, and False if the no choice is selected. From here, anaconda can figure out what to do next. This method must be implemented by all UserInterface subclasses.

In the code, this method should be used sparingly and only for those times where anaconda cannot make a reasonable decision. We don’t want to overwhelm the user with choices.

When cmdline mode is active, the default will be to answer no.

sitepackages = ['/usr/lib64/python2.7/site-packages/pyanaconda/ui', '/usr/lib/python2.7/site-packages/pyanaconda/ui', '/usr/lib/site-python/pyanaconda/ui']
tty_num
updatepath = '/tmp/updates/pyanaconda/ui'
pyanaconda.ui.tui.exception_msg_handler(event, data)

Handler for the HUB_CODE_EXCEPTION message in the hubQ.

Parameters:
  • event ((event_type, message_data)) – event data
  • data (any) – additional data