diff options
| author | kotfu <kotfu@kotfu.net> | 2020-02-06 16:41:04 -0700 |
|---|---|---|
| committer | kotfu <kotfu@kotfu.net> | 2020-02-06 16:41:04 -0700 |
| commit | 8bbb6401122ee84ce7e7330e34229c60f7be44de (patch) | |
| tree | 7758962c2e8e066098765a31e0ff1f6e97fafcfb /docs/features | |
| parent | 87826cc7d2186cee0fbdf256756dcedb0d69e919 (diff) | |
| parent | 0d74ed61ef5a9ec7fbaca371b9af2195a867d223 (diff) | |
| download | cmd2-git-8bbb6401122ee84ce7e7330e34229c60f7be44de.tar.gz | |
Merge branch 'doc_streamline' of https://github.com/python-cmd2/cmd2 into doc_streamline
# Conflicts:
# docs/features/settings.rst
Diffstat (limited to 'docs/features')
| -rw-r--r-- | docs/features/settings.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/features/settings.rst b/docs/features/settings.rst index e2ce70d6..5a4a9c0f 100644 --- a/docs/features/settings.rst +++ b/docs/features/settings.rst @@ -120,8 +120,7 @@ reference. In your initialization code: 1. Create an instance attribute with a default value. 2. Create a :class:`.Settable` object which describes your setting. -3. Pass the :class:`.Settable` object to - :meth:`cmd2.cmd2.Cmd.add_settable`. +3. Pass the :class:`.Settable` object to :meth:`cmd2.Cmd.add_settable`. Here's an example, from ``examples/environment.py``: @@ -165,8 +164,8 @@ to be available to the :ref:`features/builtin_commands:set` command. Let's say that you never want end users of your program to be able to enable full debug tracebacks to print out if an error occurs. You might want to hide the :ref:`features/settings:debug` setting. To do so, remove it from the -:attr:`cmd2.Cmd.settable` dictionary after you initialize your object:: -The :meth:`~.cmd2.Cmd.remove_settable` convenience method makes this easy:: +:attr:`cmd2.Cmd.settable` dictionary after you initialize your object. +The :meth:`cmd2.Cmd.remove_settable` convenience method makes this easy:: class MyApp(cmd2.Cmd): |
