xref: /aosp_15_r20/external/pigweed/pw_console/docs.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1.. _module-pw_console:
2
3==========
4pw_console
5==========
6.. pigweed-module::
7   :name: pw_console
8
9The Pigweed Console provides a Python repl (read eval print loop) using
10`ptpython`_ and a log message viewer in a single-window terminal based
11interface. It is designed to be a replacement for `IPython's embed()`_ function.
12
13.. figure:: images/pw_system_boot.png
14  :alt: Pigweed Console screenshot with serial debug log messages.
15
16--------
17Features
18--------
19
20``pw_console`` aims to be a complete solution for interacting with hardware
21devices using :ref:`module-pw_rpc` over a :ref:`module-pw_hdlc` transport.
22
23- Interactive Python repl and log viewer in a single terminal window. This
24  provides interactive RPC sending while the log viewer provides immediate
25  feedback on device status.
26
27  .. figure:: images/python_completion.png
28    :alt: Pigweed Console screenshot showing RPC Python repl completions.
29
30- Easily embeddable within a project's own custom console. This should allow
31  users to define their own transport layer.
32
33- Log viewer with searching and filtering.
34
35------------
36Contributing
37------------
38- All code submissions to ``pw_console`` require running the
39  :ref:`module-pw_console-testing`.
40
41- Commit messages should include a ``Testing:`` line with the steps that were
42  manually run.
43
44------
45Guides
46------
47.. toctree::
48   :maxdepth: 1
49
50   py/pw_console/docs/user_guide
51   embedding
52   plugins
53   testing
54   internals
55
56.. _IPython's embed(): https://ipython.readthedocs.io/en/stable/interactive/reference.html#embedding
57.. _IPython: https://ipython.readthedocs.io/
58.. _prompt_toolkit: https://python-prompt-toolkit.readthedocs.io/
59.. _ptpython: https://github.com/prompt-toolkit/ptpython/
60