bluesky_queueserver_api.console_monitor.ConsoleMonitor_ZMQ_Threads.text
- ConsoleMonitor_ZMQ_Threads.text(nlines=None)
Returns text representation of console output. Monitor
text_uidproperty to check if text buffer was modified. The parameternlinesdetermines the maximum number of lines of text returned by the function.- Parameters:
- nlines: int
Number of lines to return. The value determines the maximum number of lines of text returned by the function. The function returns
""(empty string) if the value is0or negative.
- Returns:
- text: str
String representing recent console output. The maximum number of lines is determined by
text_max_lines.
Examples
Synchronous API
RM = REManagerAPI() RM.console_monitor.enable() # Wait for RE Manager to produce some output ttime.sleep(20) text = RM.console_monitor.text() print(text) # Return the last 10 lines text = RM.console_monitor.text(10) print(text) RM.console_monitor.disable()
Asynchronous API
RM = REManagerAPI() RM.console_monitor.enable() # Wait for RE Manager to produce some output await asyncio.sleep(20) text = await RM.console_monitor.text() print(text) # Return the last 10 lines text = await RM.console_monitor.text(10) print(text) RM.console_monitor.disable()