Anaconda package listsAll packages available in the latest release of Anaconda are listed on thepages linked below.
Pyanaconda.ui.gui.helpers module class pyanaconda.ui.gui.helpers. GUIDialogInputCheckHandler ( okbutton=None )Bases:Provide InputCheckHandler functionality for Gtk dialogs.If an OK button is provided in the constructor, this class willhandle setting the sensitivity of the button to match the inputcheck result. A method onokclicked is provided to determine whetherthe dialog can be exited, similar to onbackclicked for spokes.It’s not possible (or at least not easy) to prent a GtkDialog fromreturning a response, so the caller of gtkdialogrun needs to checkwhether the input is valid and decide based on that whether to destroythe dialog or call gtkdialogrun again.
A dynamic programming language with GUI support. Bundles Tcl and Tk. Conda Files; Labels; Badges; License: Tcl/Tk. To install this package with conda run: conda install -c anaconda tk Description. Anaconda Cloud. Gallery About Documentation Support About Anaconda, Inc. Pyanaconda.ui.gui.utils.firegtkaction (func,.args) ¶ Run some Gtk action in the main thread and wait for it. Pyanaconda.ui.gui.utils.gtkactionnowait (func) ¶ Decorator method which ensures every call of the decorated function to be executed in the context of Gtk main loop even if called from a non-main thread.
Onokclicked ( )Return whether the input validation checks allow the dialog to be exited.Unlike GUISpokeInputCheckHandler.onbackclicked, it is not expected thatsubclasses will implement this method. Setstatus ( inputcheck ) class pyanaconda.ui.gui.helpers. GUIInputCheck ( parent, inputobj, runcheck, data=None )Bases:Add timer awareness to an InputCheck.Add a delay before running the validation function so that thefunction is not run for every keystroke. Run any pending actionsbefore returning a status.
Checkstatus class pyanaconda.ui.gui.helpers. GUIInputCheckHandlerBases:Provide InputCheckHandler functionality for Gtk input screens.This class assumes that all input objects are of type GtkEditable andattaches InputCheck.updatecheckstatus to the changed signal.
Addcheck ( inputobj, runcheck, data=None ) getinput ( inputobj ) class pyanaconda.ui.gui.helpers. GUISpokeInputCheckHandlerBases:Provide InputCheckHandler functionality for graphical spokes.This class implements setstatus to set a message in the warning area ofthe spoke window and provides an implementation of onbackclicked toprevent the user from exiting a spoke with bad input. Clearinfo ( ) onbackclicked ( window )Check whether the input validation checks allow the spoke to be exited.Unlike NormalSpoke.onbackclicked, this function returns a boolean value.Classes implementing this class should run GUISpokeInputCheckHandler.onbackclicked,and if it succeeded, run NormalSpoke.onbackclicked. Setstatus ( inputcheck )Update the warning with the input validation error from the firsterror message. Setwarning ( msg ) window. Pyanaconda.ui.gui.utils module class pyanaconda.ui.gui.utils.
GtkActionListBases:Class for scheduling Gtk actions to be all run at once. Addaction ( func,.args )Add Gtk action to be run later. Fire ( )Run all scheduled Gtk actions. BlockedHandler ( obj, func )Prevent a GLib signal handling function from being called during someblock of code. BusyCursor ( ) pyanaconda.ui.gui.utils. Escapemarkup ( value )Escape strings for use within Pango markup.This function converts the value to a string before passing markupescapetext. Fancysetsensitive ( widget, value )Set the sensitivity of a widget, and then set the sensitivity ofall widgets it is a mnemonic widget for.
This has the effect ofmarking both an entry and its label as sensitive/insensitive, forinstance. Findfirstchild ( parent, matchfunc )Find the first child widget of a container matching the given function.This method performs a breadth-first search for the widget.
Matchfunctakes the widget as a paramter, and the return value will be evaulated asa bool. Parameters:. parent ( GtkContainer) – the container to search. matchfunc ( function) – The function defining the condition to matchReturns:The first matching widgetReturn type:GtkWidget or Nonepyanaconda.ui.gui.utils.
Firegtkaction ( func,.args )Run some Gtk action in the main thread and wait for it. Gtkactionnowait ( func )Decorator method which ensures every call of the decorated function to beexecuted in the context of Gtk main loop even if called from a non-mainthread.
The new method does not wait for the callback to finish. Gtkactionwait ( func )Decorator method which ensures every call of the decorated function to beexecuted in the context of Gtk main loop even if called from a non-mainthread and returns the ret value after the decorated method finishes.
Gtkbatchmap ( action, items, args=, prefunc=None, batchsize=1 )Function that maps an action on items in a way that makes the action run inthe main thread, but without blocking the main thread for a noticeabletime. If a pre-processing function is given it is mapped on the items firstbefore the action happens in the main thread. DangerMUST NOT BE CALLED NOR WAITED FOR FROM THE MAIN THREAD. Parameters:. action ( (actionitem,.args) - None) – any action that has to be done on the items in the mainthread. items ( iterable) – an iterable of items that the action should be mapped on. args – additional arguments passed to the action function.
prefunc ( item - actionitem) – a function that is mapped on the items before they arepassed to the action function. batchsize – how many items should be processed in one run in the main loopRaises:if called from the main threadReturns:Nonepyanaconda.ui.gui.utils. Gtkcallonce ( func,.args )Wrapper for GLib.idleadd call that ensures the func is calledonly once. IgnoreEscape ( dlg )Prevent a dialog from accepting the escape keybinding, which emits aclose signal and will cause the dialog to close with some return valuewe are likely not expecting.
Instead, this method will cause theescape key to do nothing for the given GtkDialog. Overridecellproperty ( treecolumn, cellrenderer, propname, propertyfunc, data=None )Override a single property of a cell renderer.propertyfunc takes the same arguments as GtkTreeCellDataFunc:(TreeViewColumn, CellRenderer, TreeModel, TreeIter, data). Instead of beingexpected to manipulate the CellRenderer itself, this method should insteadreturn the value to which the property should be set.This method calls setcelldatafunc on the column and renderer. Parameters:.
column ( GtkTreeViewColumn) – the column to override. cellrenderer ( GtkCellRenderer) – the cell renderer to override. propname – the property to set on the renderer. propertyfunc ( function) – a function that returns the value of the property to set. data – Optional data to pass to propertyfuncpyanaconda.ui.gui.utils. Reallyhide ( widget )Some widgets need to be both hidden, and have noshowall set on themto prevent them from being shown later when the screen is redrawn.This method takes care of that.
Reallyshow ( widget )Some widgets need to have noshowall unset before they can also beshown, so they are displayed later when the screen is redrawn. Thismethod takes care of that. SetViewportBackground ( vp, color='@themebgcolor' )Set the background color of the GtkViewport vp to be the same as theoverall UI background. This should not be called for every viewport,as that will affect things like TreeViews as well. Settreeviewselection ( treeview, item, col=0 )Select the given item in the given treeview and scroll to it.
Parameters:. treeview ( GtkTreeView) – treeview to select and item in. item – item to be selected.
col – column to search for the item inReturns:selected iterator or None if item was not foundReturn type:GtkTreeIter or Nonepyanaconda.ui.gui.utils. Setupgtkdirection ( )Set the right direction (RTL/LTR) of the Gtk widget’s and their layout basedon the current language configuration. Timedaction ( delay=300, threshold=750, busycursor=True )Function returning decorator for decorating often repeated actions that needto happen in the main loop (entry/slider change callbacks, typically), butthat may take a long time causing the GUI freeze for a noticeable time.The return value of the decorator function returned by this function–i.e.,the value of timedaction(functiontobedecorated)–is an instance ofthe TimedAction class, which besides being callable provides a runnowmethod to shortcut the timer and run the action immediately. Runnow willalso be run in the main loop.If timedaction is used to decorate a method of a class, the decoratedmethod will actually be a functools.partial instance. In this case, theTimedAction instance is accessible as the “func” property of the decoratedmethod. Note that the func property will not have self applied. Parameters:.
delay – number of milliseconds to wait for another invocation of thedecorated function before it is actually called. threshold – upper bound (in milliseconds) to wait for the decoratedfunction to be called from the first/last time. busycursor – whether the cursor should be made busy or not in themeantime of the decorated function being invocated fromoutside and it actually being calledpyanaconda.ui.gui.utils. UnbusyCursor ( ) pyanaconda.ui.gui.utils.
Unwatchchildren ( widget, callback, userdata=None )Unregister a callback previously added with watchchildren. Parameters:. widget ( GtkWidget) – the widget to unwatch. callback ( function) – the callback that was previously added to the widget. userdata – the userdata that was previously added to the widgetpyanaconda.ui.gui.utils.
Watchchildren ( widget, callback, userdata=None )Call callback on widget and all children of widget as they are added.Callback is a function that takes widget and userdata as arguments. Noreturn value is expected.Callback will be called immediately for widget, and, if widget is aGtkContainer, for all children of widget. If widget is a container it willbe then be watched for new widgets added to the container, and callbackwill be called on the new children as they are added.
Parameters:. widget ( GtkWidget) – the widget to watch. callback ( function) – the callback function.
userdata – optional userdata to pass to callback. Pyanaconda.ui.gui.xklwrapper moduleThis module include functions and classes for dealing with multiple layouts inAnaconda. It wraps the libxklavier functionality to protect Anaconda fromdealing with its “nice” API that looks like a Lisp-influenced “good old C” andalso systemd-localed functionality.It provides a XklWrapper class with several methods that can be used for listingand various modifications of keyboard layouts settings. Class pyanaconda.ui.gui.xklwrapper. LayoutInfo ( lang, desc )Bases: descAlias for field number 1 langAlias for field number 0 pyanaconda.ui.gui.xklwrapper. Xkb ( x ) class pyanaconda.ui.gui.xklwrapper.
XklWrapperBases:Class wrapping the libxklavier functionalityUse this class as a singleton class because it provides read-only dataand initialization (that takes quite a lot of time) reads always thesame data. It doesn’t have sense to make multiple instances activatedefaultlayout (.args,.kwargs )The new body for the decorated method.
If needed, it uses closurebound queueinstance variable which is valid until the reference to thismethod is destroyed. Addlayout (.args,.kwargs )The new body for the decorated method. If needed, it uses closurebound queueinstance variable which is valid until the reference to thismethod is destroyed.
Getavailablelayouts ( )A list of layouts getcurrentlayout ( )Get current activated X layout and variant Returns:current activated X layout and variant (e.g. “cz (qwerty)”)static getinstance ( ) getlayoutvariantdescription ( layoutvariant, withlang=True, xlated=True )Get description of the given layout-variant. Parameters:.
layoutvariant – layout-variant specification (e.g. ‘cz (qwerty)’). withlang – whether to include language of the layout-variant (if defined)in the description or not. xlated – whethe to return translated or english version of the descriptionReturns:description of the layout-variant specification (e.g.
‘Czech (qwerty)’)Return type:getswitchoptdescription ( switchopt )Get description of the given layout switching option. Parameters:switchopt – switching option name/ID (e.g. ‘grp:altshifttoggle’)Returns:description of the layout switching option (e.g. ‘Alt + Shift’)Return type:getswitchingoptions ( )Method returning list of available layout switching options isvalidlayout ( layout )Return if given layout is valid layout or not removelayout (.args,.kwargs )The new body for the decorated method. If needed, it uses closurebound queueinstance variable which is valid until the reference to thismethod is destroyed. Replacelayouts (.args,.kwargs )The new body for the decorated method.
If needed, it uses closurebound queueinstance variable which is valid until the reference to thismethod is destroyed. Setswitchingoptions (.args,.kwargs )The new body for the decorated method. If needed, it uses closurebound queueinstance variable which is valid until the reference to thismethod is destroyed.
Exception pyanaconda.ui.gui.xklwrapper. XklWrapperErrorBases:Exception class for reporting libxklavier-related problems pyanaconda.ui.gui.xklwrapper.