-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
896 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.. _TERM: | ||
|
||
Terminal | ||
######## | ||
|
||
A set of helpers to implement a text user interface (TUI) in a terminal. | ||
|
||
Introduction | ||
************ | ||
|
||
This package offers a :py:class:`pyTooling.TerminalUI.LineTerminal` implementation, derived from a basic | ||
:py:class:`pyTooling.TerminalUI.Terminal` class. It eases the creation of simple terminal/console applications. It | ||
includes colored outputs based on `colorama`. | ||
|
||
List of base-classes | ||
******************** | ||
|
||
* :py:class:`pyTooling.TerminalUI.Terminal` | ||
* :py:class:`pyTooling.TerminalUI.LineTerminal` | ||
|
||
|
||
Example | ||
******* | ||
|
||
.. code-block:: Python | ||
from pyTooling.TerminalUI import LineTerminal | ||
class Application(LineTerminal): | ||
def __init__(self): | ||
super().__init__(verbose=True, debug=True, quiet=False) | ||
def run(self): | ||
self.WriteQuiet("This is a quiet message.") | ||
self.WriteNormal("This is a normal message.") | ||
self.WriteInfo("This is an info message.") | ||
self.WriteDebug("This is a debug message.") | ||
self.WriteWarning("This is a warning message.") | ||
self.WriteError("This is an error message.") | ||
self.WriteFatal("This is a fatal message.") | ||
# entry point | ||
if __name__ == "__main__": | ||
Application.versionCheck((3,6,0)) | ||
app = Application() | ||
app.run() | ||
app.exit() | ||
Line | ||
#### | ||
|
||
``Line`` represents a single line in a line-based terminal application. If a | ||
line is visible, depends on the :class:`~pyTooling.TerminalUI.Severity`-level of a | ||
``Line`` object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.