diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-11 10:24:30 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-11 10:24:30 -0700 |
commit | 18945135747b15a98b64ddcf92d0847099469208 (patch) | |
tree | e72aed87ac95ea430e108aa0264cd5a7e92aed61 | |
parent | 786c965c12dccbf04e1bb2e8e9786decc8163e80 (diff) | |
download | freeipa-18945135747b15a98b64ddcf92d0847099469208.tar.gz freeipa-18945135747b15a98b64ddcf92d0847099469208.tar.xz freeipa-18945135747b15a98b64ddcf92d0847099469208.zip |
Tutorial: improved clarity of 'How this tutorial is written' section
-rw-r--r-- | ipalib/__init__.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py index da849e7d..71d78dc4 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -42,8 +42,8 @@ How this tutorial is written The code examples in this tutorial are presented as if entered into a Python interactive interpreter session. As such, when you create a real plugin in a source file, a few details will be different (in addition to the fact that -you will never include the ``>>>`` nor ``...`` at the beginning of each line -of code). +you will never include the ``>>>`` nor ``...`` that the interpreter places at +the beginning of each line of code). The tutorial examples all have this pattern: @@ -57,9 +57,9 @@ The tutorial examples all have this pattern: >>> api.register(my_command) >>> api.finalize() -We call `get_standard_api()` to get an *example* instance of `plugable.API` -to work with. But a real plugin will use the standard *run-time* instance -of `plugable.API`, which is available at ``ipalib.api``. +In the tutorial we call `get_standard_api()` to create an *example* instance +of `plugable.API` to work with. But a real plugin will simply use +``ipalib.api``, the standard run-time instance of `plugable.API`. A real plugin will have this pattern: @@ -71,8 +71,7 @@ A real plugin will have this pattern: pass api.register(my_command) -The differences are that in a real plugin you will use the standard -``ipalib.api`` instance of `plugable.API` and that you will *not* call +As seen above, also note that in a real plugin you will *not* call `plugable.API.finalize()`. When in doubt, look at some of the built-in plugins for guidance, like those in `ipalib.plugins`. |