blob: 0c7ffc3e085eda4e116938b68f747e488d1e2339 [file] [log] [blame]
Anthony DiGirolamo26ed98a2021-06-11 14:50:29 -07001.. _module-pw_console:
2
3----------
4pw_console
5----------
6
Anthony DiGirolamo78789cd2021-08-16 12:16:37 -07007:bdg-primary:`host`
8:bdg-secondary:`Python`
Anthony DiGirolamo7631bbc2022-03-21 15:27:45 -07009:bdg-success:`stable`
Anthony DiGirolamo78789cd2021-08-16 12:16:37 -070010
Anthony DiGirolamo26ed98a2021-06-11 14:50:29 -070011The Pigweed Console provides a Python repl (read eval print loop) using
Anthony DiGirolamo8a498802021-06-14 23:52:42 -070012`ptpython`_ and a log message viewer in a single-window terminal based
13interface. It is designed to be a replacement for `IPython's embed()`_ function.
14
Anthony DiGirolamo7631bbc2022-03-21 15:27:45 -070015.. figure:: images/pw_system_boot.png
16 :alt: Pigweed Console screenshot with serial debug log messages.
17
Anthony DiGirolamo46440992021-07-19 16:07:47 -070018Features
Anthony DiGirolamo546619f2021-07-22 17:44:04 -070019========
Anthony DiGirolamo46440992021-07-19 16:07:47 -070020
Anthony DiGirolamo546619f2021-07-22 17:44:04 -070021``pw_console`` aims to be a complete solution for interacting with hardware
22devices using :ref:`module-pw_rpc` over a :ref:`module-pw_hdlc` transport.
23
24- Interactive Python repl and log viewer in a single terminal window. This
25 provides interactive RPC sending while the log viewer provides immediate
26 feedback on device status.
Anthony DiGirolamo8a498802021-06-14 23:52:42 -070027
Anthony DiGirolamo7631bbc2022-03-21 15:27:45 -070028 .. figure:: images/python_completion.png
29 :alt: Pigweed Console screenshot showing RPC Python repl completions.
30
Anthony DiGirolamo8a498802021-06-14 23:52:42 -070031- Easily embeddable within a project's own custom console. This should allow
32 users to define their own transport layer.
33
Anthony DiGirolamo8a498802021-06-14 23:52:42 -070034- Log viewer with searching and filtering.
35
Anthony DiGirolamo46440992021-07-19 16:07:47 -070036Contributing
37============
Anthony DiGirolamo8a498802021-06-14 23:52:42 -070038
Anthony DiGirolamo46440992021-07-19 16:07:47 -070039- All code submissions to ``pw_console`` require running the
40 :ref:`module-pw_console-testing`.
Anthony DiGirolamo26ed98a2021-06-11 14:50:29 -070041
Anthony DiGirolamo46440992021-07-19 16:07:47 -070042- Commit messages should include a ``Testing:`` line with the steps that were
43 manually run.
Anthony DiGirolamo26ed98a2021-06-11 14:50:29 -070044
Anthony DiGirolamo46440992021-07-19 16:07:47 -070045Guides
46======
Anthony DiGirolamo26ed98a2021-06-11 14:50:29 -070047
Anthony DiGirolamo46440992021-07-19 16:07:47 -070048.. toctree::
49 :maxdepth: 1
Anthony DiGirolamof53188a2021-06-29 09:57:07 -070050
Anthony DiGirolamo546619f2021-07-22 17:44:04 -070051 py/pw_console/docs/user_guide
Anthony DiGirolamo46440992021-07-19 16:07:47 -070052 embedding
Anthony DiGirolamo0a35c932021-12-07 13:58:38 -080053 plugins
Anthony DiGirolamo46440992021-07-19 16:07:47 -070054 testing
55 internals
Anthony DiGirolamof53188a2021-06-29 09:57:07 -070056
Anthony DiGirolamo8a498802021-06-14 23:52:42 -070057
58.. _IPython's embed(): https://ipython.readthedocs.io/en/stable/interactive/reference.html#embedding
59.. _IPython: https://ipython.readthedocs.io/
Anthony DiGirolamo8a498802021-06-14 23:52:42 -070060.. _prompt_toolkit: https://python-prompt-toolkit.readthedocs.io/
61.. _ptpython: https://github.com/prompt-toolkit/ptpython/
Anthony DiGirolamo46440992021-07-19 16:07:47 -070062