|
facebook360_dep
Facebook360 Depth Estimation Pipeline
|
Public Member Functions | |
| def | __init__ (self, log_textbox, parent, log_file) |
| def | close_log_file (self) |
| def | get_process (self, id) |
| def | get_processes (self) |
| def | setup_process (self, id) |
| def | start_process (self, id, cmd) |
| def | remove_processes (self) |
| def | remove_process (self, id) |
| def | end_process (self, id, signal=None) |
| def | end_all_processes (self, signal="kill") |
| def | kill_all_processes (self) |
| def | terminate_all_processes (self) |
| def | is_running (self, id=None) |
| def | set_tab_widget (self, tab_widget, tab_index) |
| def | read_stdout (self, id) |
| def | are_same_progress (self, str1, str2) |
| def | merge_progress_lines (self, lines) |
| def | append_output (self, text) |
| def | switch_tab (self) |
| def | log (self, str) |
| def | colored_html (self, str, color) |
| def | log_notice (self, str) |
| def | log_warning (self, str) |
| def | log_error (self, str) |
| def | log_header (self) |
Public Attributes | |
| parent | |
| processes | |
| decoder_stdout | |
| log_textbox | |
| cursor_output | |
| log_str | |
| progress | |
| app_name | |
| gb | |
| tab_widget | |
| tab_index | |
| log_file | |
| log_f | |
Static Public Attributes | |
| process_signal = pyqtSignal(str) | |
Back end for the logging used for printing to the terminal box in the UI.
Attributes:
app_name (str): Name of the binary being executed.
cursor_output (QtWidgets.QTextCursor): Cursor in the Qt Textbox.
decoder_stdout (QTextCodec): Codec for decoding the output.
gb (QtWidgets.QGroupBox): Group box for the tab.
log_f (file handle): File handle to the local logging file.
log_file (str): Path to the local logging file.
log_textbox (QtWidgets.QPlainTextEdit): Textbox where logs are displayed.
parent (App(QDialog)): Object corresponding to the parent UI element.
process_signal (pyqtSignal): Signal tying signals caught by the LogReader to event.
processes (dict[str, QtCore.QProcess]): Map from process names to processes.
progress (str): Token used for displaying progress in the render application (used
for merging double outputs).
tab_index (int): Index of which tab the app is being run on.
tab_widget (Union[Background, Calibration, DepthEstimation, Export]): Widget of any
of the tabs. This can be extended if the UI is expanded.
| def log_reader.LogReader.__init__ | ( | self, | |
| log_textbox, | |||
| parent, | |||
| log_file | |||
| ) |
Initializes a LogReader with the default display configuration.
Args:
log_textbox (QtWidgets.QPlainTextEdit): Textbox where logs are displayed.
parent (App(QDialog)): Object corresponding to the parent UI element.
log_file (str): Path to the logging file on disk.
| def log_reader.LogReader.append_output | ( | self, | |
| text | |||
| ) |
Print output to the end of the log.
Args:
text (str): Text being added.
| def log_reader.LogReader.are_same_progress | ( | self, | |
| str1, | |||
| str2 | |||
| ) |
Whether or not two names correspond to the same process.
Args:
str1 (str): Name of the first process.
str2 (str): Name of the second process.
Returns:
bool: Whether or not they are the same QProcess.
| def log_reader.LogReader.close_log_file | ( | self | ) |
Releases the file handle on the logging file.
| def log_reader.LogReader.colored_html | ( | self, | |
| str, | |||
| color | |||
| ) |
| def log_reader.LogReader.end_all_processes | ( | self, | |
signal = "kill" |
|||
| ) |
Stops all running processes.
Args:
signal (str, optional): Termination signal to send to the process.
| def log_reader.LogReader.end_process | ( | self, | |
| id, | |||
signal = None |
|||
| ) |
Stops a running process.
Args:
id (str): Name of the process.
signal (str, optional): Termination signal to send to the process.
| def log_reader.LogReader.get_process | ( | self, | |
| id | |||
| ) |
Gets the QT process associated with a name.
Args:
id (str): Name of the process.
Returns:
QtCore.QProcess: Process that is being run.
| def log_reader.LogReader.get_processes | ( | self | ) |
Finds all running processes.
Returns:
list[QtCore.QProcess]: List of running processes.
| def log_reader.LogReader.is_running | ( | self, | |
id = None |
|||
| ) |
Check whether or not a process is running.
Args:
id (str, optional): Name of the process.
Returns:
QtCore.QProcess.ProcessState: State of the associated process.
| def log_reader.LogReader.kill_all_processes | ( | self | ) |
Sends a SIGKILL to all running processes.
| def log_reader.LogReader.log | ( | self, | |
| str | |||
| ) |
Write plain text to the terminal.
Args:
str (str): Text to be written to the UI terminal.
| def log_reader.LogReader.log_error | ( | self, | |
| str | |||
| ) |
Write plain text to the terminal in error highlight (red).
Args:
str (str): Text to be written to the UI terminal.
| def log_reader.LogReader.log_header | ( | self | ) |
Write plain text header to the terminal.
| def log_reader.LogReader.log_notice | ( | self, | |
| str | |||
| ) |
Write plain text to the terminal in notice highlight (green).
Args:
str (str): Text to be written to the UI terminal.
| def log_reader.LogReader.log_warning | ( | self, | |
| str | |||
| ) |
Write plain text to the terminal in warning highlight (yellow).
Args:
str (str): Text to be written to the UI terminal.
| def log_reader.LogReader.merge_progress_lines | ( | self, | |
| lines | |||
| ) |
Merge the stdout lines and overwrite the first with the second.
Args:
lines (list[str]): Lines of the log to be displayed.
Returns:
list[str]: List with lines merged that start with the same token.
| def log_reader.LogReader.read_stdout | ( | self, | |
| id | |||
| ) |
Print stdout from a particular process execution to the log.
Args:
id (str): Name of the process.
| def log_reader.LogReader.remove_process | ( | self, | |
| id | |||
| ) |
Remove a process from the list of queued processes.
Args:
id (str): Name of the process.
| def log_reader.LogReader.remove_processes | ( | self | ) |
Removes all processes from the list of queued processes.
| def log_reader.LogReader.set_tab_widget | ( | self, | |
| tab_widget, | |||
| tab_index | |||
| ) |
| def log_reader.LogReader.setup_process | ( | self, | |
| id | |||
| ) |
Configures environment variables and displays pre-run warnings.
Args:
id (str): Name of the process.
| def log_reader.LogReader.start_process | ( | self, | |
| id, | |||
| cmd | |||
| ) |
Begins executing a process.
Args:
id (str): Name of the process.
cmd (str): Command to be run in the process.
| def log_reader.LogReader.switch_tab | ( | self | ) |
Change the actively displayed tab to the current tab.
| def log_reader.LogReader.terminate_all_processes | ( | self | ) |
Sends a SIGTERM to all running processes.
| log_reader.LogReader.app_name |
| log_reader.LogReader.cursor_output |
| log_reader.LogReader.decoder_stdout |
| log_reader.LogReader.gb |
| log_reader.LogReader.log_f |
| log_reader.LogReader.log_file |
| log_reader.LogReader.log_str |
| log_reader.LogReader.log_textbox |
| log_reader.LogReader.parent |
|
static |
| log_reader.LogReader.processes |
| log_reader.LogReader.progress |
| log_reader.LogReader.tab_index |
| log_reader.LogReader.tab_widget |
1.8.15