Part of bzrlib.ui.text View In Hierarchy
Known subclasses: bzrlib.tests.TestUIFactory
Method | __init__ | Create a TextUIFactory. |
Method | choose | Prompt the user for a list of alternatives. |
Method | be_quiet | Tell the UI to be more quiet, or not. |
Method | clear_term | Prepare the terminal for output. |
Method | get_integer | Get an integer from the user. |
Method | get_non_echoed_password | Undocumented |
Method | get_password | Prompt the user for a password. |
Method | get_username | Prompt the user for a username. |
Method | make_progress_view | Construct and return a new ProgressView subclass for this UI. |
Method | note | Write an already-formatted message, clearing the progress bar if necessary. |
Method | prompt | Emit prompt on the CLI. |
Method | report_transport_activity | Called by transports as they do IO. |
Method | log_transport_activity | See UIFactory.log_transport_activity() |
Method | show_error | Show an error message (not an exception) to the user. |
Method | show_message | Show a message to the user. |
Method | show_warning | Show a warning to the user. |
Method | show_user_warning | Show a text message to the user. |
Method | _make_output_stream_explicit | Undocumented |
Method | _progress_updated | A task has been updated and wants to be displayed. |
Method | _progress_all_finished | Called when the top-level progress task finished |
Inherited from UIFactory:
Method | __enter__ | Context manager entry support. |
Method | __exit__ | Context manager exit support. |
Method | confirm_action | Seek user confirmation for an action. |
Method | is_quiet | Undocumented |
Method | make_output_stream | Get a stream for sending out bulk text data. |
Method | nested_progress_bar | Return a nested progress bar. |
Method | format_user_warning | Undocumented |
Method | get_boolean | Get a boolean question answered from the user. |
Method | recommend_upgrade | Recommend the user upgrade a control directory. |
Method | _progress_finished | Called by the ProgressTask when it finishes |
Prompt the user for a list of alternatives. Support both line-based and char-based editing. In line-based mode, both the shortcut and full choice name are valid answers, e.g. for choose('prompt', '&yes &no'): 'y', ' Y ', ' yes', 'YES ' are all valid input lines for choosing 'yes'. An empty line, when in line-based mode, or pressing enter in char-based mode will select the default choice (if any). Choice is echoed back if: - input is char-based; which means a controlling terminal is available, and osutils.getchar is used - input is line-based, and no controlling terminal is available
Typically this suppresses progress bars; the application may also look at ui_factory.is_quiet().
This will, clear any progress bars, and leave the cursor at the leftmost position.
Parameters | prompt | a message to prompt the user with. Could be a multi-line prompt but without a terminating n. |
Returns | A signed integer. |
Parameters | prompt | The prompt to present the user |
kwargs | Arguments which will be expanded into the prompt. This lets front ends display different things if they so choose. | |
Returns | The password string, return None if the user canceled the request. |
Parameters | prompt | The prompt to present the user |
kwargs | Arguments which will be expanded into the prompt. This lets front ends display different things if they so choose. | |
Returns | The username string, return None if the user canceled the request. |
Parameters | kwargs | Dictionary of arguments to insert into the prompt, to allow UIs to reformat the prompt. |
This may update a progress bar, spinner, or similar display. By default it does nothing.
The message should not have an error prefix or trailing newline. That will be added by the factory if appropriate.
Explicitly not for warnings about bzr apis, deprecations or internals.