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
-
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
(self, QCloseEvent)
-
bcdamenu.launcher.
bin
(QTextStream) → QTextStream¶
-
bcdamenu.launcher.
hex
(QTextStream) → QTextStream¶
-
bcdamenu.launcher.
oct
(QTextStream) → QTextStream¶