Source : launcher

source code: launcher

BcdaMenu: Creates a GUI menu button to start common software

MainButtonWindow([parent, settingsfilename]) the widget that holds the menu button
CommandThread() run the command as a subprocess in its own thread, report any output
read_settings(ini_file) read the user menu settings from the .ini file
gui([settingsfilename]) display the main widget
timestamp() ISO8601-compliant date & time string
main() process any command line options before starting the GUI
class bcdamenu.launcher.CommandThread[source]

run the command as a subprocess in its own thread, report any output

Usage

process = CommandThread()
process.setName(process_name)
process.setDebug(self.debug)
process.setSignal(self.process_responded)
process.setCommand(command)
process.start()
See:https://docs.python.org/3.3/library/subprocess.html

Methods

run() print any/all output when command is run
execute() run the command in a shell, reporting its output as it comes in
setCommand(command) user’s command to be run
setDebug(value) True to output more diagnostics
setSignal(signal) designate the signal to use when subprocess output has been received
execute()[source]

run the command in a shell, reporting its output as it comes in

run()[source]

print any/all output when command is run

setCommand(command)[source]

user’s command to be run

setDebug(value)[source]

True to output more diagnostics

setSignal(signal)[source]

designate the signal to use when subprocess output has been received

class bcdamenu.launcher.MainButtonWindow(parent=None, settingsfilename=None)[source]

the widget that holds the menu button

receiver(label, command) handle commands from menu button
reload_settings_file() (re)load the settings file and (re)create the menu(s)
build_user_menus(config) build the user menus
showStatus(text[, isCommand]) write to the status bar
historyUpdate(text) record history where user can see it
toggleAutoScroll() change whether (or not) to keep new output in view
toggleDebug([debug_state]) change whether (or not) to output diagnostic information
toggleEcho() change whether (or not) to echo command before running it
hide_history_window() toggle the visibility of the history panel
about_box() display an About box
closeEvent(event)
about_box()[source]

display an About box

build_user_menus(config)[source]

build the user menus

hide_history_window()[source]

toggle the visibility of the history panel

historyUpdate(text)[source]

record history where user can see it

receiver(label, command)[source]

handle commands from menu button

reload_settings_file()[source]

(re)load the settings file and (re)create the menu(s)

showStatus(text, isCommand=False)[source]

write to the status bar

toggleAutoScroll()[source]

change whether (or not) to keep new output in view

toggleDebug(debug_state=None)[source]

change whether (or not) to output diagnostic information

toggleEcho()[source]

change whether (or not) to echo command before running it

bcdamenu.launcher.gui(settingsfilename=None)[source]

display the main widget

bcdamenu.launcher.main()[source]

process any command line options before starting the GUI

bcdamenu.launcher.read_settings(ini_file)[source]

read the user menu settings from the .ini file

bcdamenu.launcher.timestamp()[source]

ISO8601-compliant date & time string