[Checkins]
SVN: Sandbox/ulif/grokadmin/trunk/src/grokadmin/docgrok.txt
Correct dotted name in docgrok tests.
Uli Fouquet
uli at gnufix.de
Tue Jun 17 07:41:22 EDT 2008
Log message for revision 87455:
Correct dotted name in docgrok tests.
Changed:
U Sandbox/ulif/grokadmin/trunk/src/grokadmin/docgrok.txt
-=-
Modified: Sandbox/ulif/grokadmin/trunk/src/grokadmin/docgrok.txt
===================================================================
--- Sandbox/ulif/grokadmin/trunk/src/grokadmin/docgrok.txt 2008-06-17 11:39:31 UTC (rev 87454)
+++ Sandbox/ulif/grokadmin/trunk/src/grokadmin/docgrok.txt 2008-06-17 11:41:21 UTC (rev 87455)
@@ -38,10 +38,9 @@
http://localhost:8080/docgrok/grok
-The admin package, which is located in the grok package can be
-accessed directly such:
+The admin package can be accessed directly such:
- http://localhost:8080/docgrok/grok/admin
+ http://localhost:8080/docgrok/grokadmin
In this way nearly all things can be described, which can be described
by a dotted name notation and which are accessible at runtime.
@@ -53,16 +52,16 @@
The doctor can also be reached via Python, naturally:
>>> import grok
- >>> from grok.admin import docgrok
- >>> doctor = docgrok.DocGrok('grok.admin.docgrok')
+ >>> from grokadmin import docgrok
+ >>> doctor = docgrok.DocGrok('grokadmin.docgrok')
This doctor has immediatly a patient, which is denoted by the dotted
-path `grok.admin.docgrok`. The dotted path might reference any thing
+path `grokadmin.docgrok`. The dotted path might reference any thing
which lives in the Python environment: a package, a module, a class, a
function or even a file or some interface attribute:
>>> doctor.getPath()
- 'grok.admin.docgrok'
+ 'grokadmin.docgrok'
We can also get a filepath, using the `getFilePath()` method. Objects,
which have no filepath always return `None`.
@@ -76,10 +75,10 @@
specialist. For example a package doctor, who happens to be called
`DocGrokPackage` :
- >>> from grok.admin.docgrok import DocGrokPackage
+ >>> from grokadmin.docgrok import DocGrokPackage
>>> doctor = DocGrokPackage('grok')
>>> doctor
- <grok.admin.docgrok.DocGrokPackage ...>
+ <grokadmin.docgrok.DocGrokPackage ...>
Using ``getPath()`` we get the dotted path of the thing, the doctor
cares for:
@@ -127,10 +126,10 @@
the function ``docgrok_handle()`` which delivers us a doctor, who
can tell us more:
- >>> from grok.admin.docgrok import docgrok_handle
- >>> thedoc = docgrok_handle('grok.admin.docgrok')
+ >>> from grokadmin.docgrok import docgrok_handle
+ >>> thedoc = docgrok_handle('grokadmin.docgrok')
>>> thedoc
- <grok.admin.docgrok.DocGrokModule ...>
+ <grokadmin.docgrok.DocGrokModule ...>
This is correct. `docgrok` of course *is* a python module, so the best
specialist we can get is a `DocGrokModule`. The mentioned function
@@ -139,12 +138,12 @@
We can, for example ask for a different doc like this:
- >>> thedoc = docgrok_handle('grok.admin.docgrok.DocGrok')
+ >>> thedoc = docgrok_handle('grokadmin.docgrok.DocGrok')
>>> thedoc
- <grok.admin.docgrok.DocGrokClass ...>
+ <grokadmin.docgrok.DocGrokClass ...>
and get a class-specific doctor. Because
-``grok.admin.docgrok.DocGrok`` *is* a class, this is again the most
+``grokadmin.docgrok.DocGrok`` *is* a class, this is again the most
appropriate doc we could get.
@@ -171,7 +170,7 @@
``grok.View`` is a class, we choose the DocGrokClass as base for our
new DocGrok:
- >>> from grok.admin.docgrok import DocGrokClass
+ >>> from grokadmin.docgrok import DocGrokClass
>>> class DocGrokGrokView(DocGrokClass):
... """"This doctor cares for grok.Views."""
More information about the Checkins
mailing list