Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /doc/html/knowledge_bases/question_bases.html [5cabfd] .. [4dca5a] Maximize Restore

  Switch to side-by-side view

--- a/doc/html/knowledge_bases/question_bases.html
+++ b/doc/html/knowledge_bases/question_bases.html
@@ -45,7 +45,7 @@
 <div class="normal-nav"><a href="special.html">Special</a></div>
 </div>
 <div class="normal-nav"><a href="../pyke_syntax/index.html">Pyke Syntax</a></div>
-<div class="normal-nav"><a href="../using_pyke.html">Using Pyke</a></div>
+<div class="normal-nav"><a href="../using_pyke/index.html">Using Pyke</a></div>
 <div class="normal-nav"><a href="../examples.html">Examples</a></div>
 <div class="normal-nav"><a href="../PyCon2008-paper.html">PyCon 2008 Paper</a></div>
 </div>
@@ -79,7 +79,7 @@
 treated as different question <a class="reference external" href="../logic_programming/statements.html">statements</a>.</p>
 <p>The answers to all questions are automatically remembered so that if multiple
 rules ask the same question, the end user only sees it once.  These answers
-are erased when an <a class="reference external" href="../using_pyke.html#setting-up-each-case">engine.reset</a> is done.</p>
+are erased when an <a class="reference external" href="../using_pyke/index.html#using-different-facts-for-different-cases">engine.reset</a> is done.</p>
 <p>Finally, questions may have <em>reviews</em> attached to them to automatically
 display different canned messages (with parameter substitution) depending on
 the end user's answer.</p>
@@ -89,7 +89,7 @@
 base is the filename of the .kqb file (with the <tt class="docutils literal"><span class="pre">.kqb</span></tt> suffix removed).
 This must be a legal Python identifier.</p>
 <p>These .kqb files are compiled and loaded automatically when you create your
-<a class="reference external" href="../using_pyke.html#initializing-pyke">knowledge_engine.engine</a> object.</p>
+<a class="reference external" href="../using_pyke/creating_engine.html">knowledge_engine.engine</a> object.</p>
 <p>The .kqb file contains all of the information about the question needed to
 ask the question, validate the answer, and output the appropriate <em>review</em>
 text.</p>
@@ -141,16 +141,24 @@
 <p>To ask a question, Pyke looks for an <tt class="docutils literal"><span class="pre">ask_module</span></tt> attribute on:</p>
 <ol class="arabic simple">
 <li>the question_base object, then</li>
-<li>the <a class="reference external" href="../using_pyke.html#initializing-pyke">knowledge_engine.engine</a> object</li>
+<li>the <a class="reference external" href="../using_pyke/creating_engine.html">knowledge_engine.engine</a> object</li>
 </ol>
-<p>If the <a class="reference external" href="../using_pyke.html#initializing-pyke">knowledge_engine.engine</a> object does not have an <tt class="docutils literal"><span class="pre">ask_module</span></tt>
+<p>If the <a class="reference external" href="../using_pyke/creating_engine.html">knowledge_engine.engine</a> object does not have an <tt class="docutils literal"><span class="pre">ask_module</span></tt>
 attribute, ask_tty is imported (by default) and stored there.</p>
+<!-- This code is hidden.  It will add '' to sys.path, change to the doc.examples
+directory and store the directory path in __file__ for the code section
+following:
+>>> import sys
+>>> if '' not in sys.path: sys.path.insert(0, '')
+>>> import os
+>>> os.chdir("../../examples")
+>>> __file__ = os.getcwd() -->
 <p>Here's an example of setting this attribute:</p>
 <pre class="literal-block">
 &gt;&gt;&gt; from pyke import knowledge_engine
 &gt;&gt;&gt; from pyke import ask_wx
 
-&gt;&gt;&gt; engine = knowledge_engine.engine('doc.examples')
+&gt;&gt;&gt; engine = knowledge_engine.engine(__file__)
 &gt;&gt;&gt; engine.ask_module = ask_wx
 </pre>
 <!-- ADD_LINKS MARKER -->
@@ -192,7 +200,7 @@
 
   <div id="last-modified">
     Page last modified
-    Tue, Jan 13 2009.
+    Fri, Mar 05 2010.
 
   </div>