Help save net neutrality! Learn more.
Close

Diff of /doc/html/knowledge_bases/special.html [9ac085] .. [0176eb]  Maximize  Restore

Switch to unified view

a/doc/html/knowledge_bases/special.html b/doc/html/knowledge_bases/special.html
...
...
205
>>> engine.prove_1('special', 'check_command', (('true',),), 0)
205
>>> engine.prove_1('special', 'check_command', (('true',),), 0)
206
((), None)
206
((), None)
207
>>> engine.prove_1('special', 'check_command', (('false',),), 0)
207
>>> engine.prove_1('special', 'check_command', (('false',),), 0)
208
Traceback (most recent call last):
208
Traceback (most recent call last):
209
    ...
209
    ...
210
CanNotProve: Can not prove special.check_command((false))
210
pyke.knowledge_engine.CanNotProve: Can not prove special.check_command((false))
211
</pre>
211
</pre>
212
</blockquote>
212
</blockquote>
213
</div>
213
</div>
214
<div class="section" id="command">
214
<div class="section" id="command">
215
<h3>Command</h3>
215
<h3>Command</h3>
...
...
233
...                        pattern.pattern_literal(command),
233
...                        pattern.pattern_literal(command),
234
...                        pattern.pattern_literal(cwd),
234
...                        pattern.pattern_literal(cwd),
235
...                        pattern.pattern_literal(stdin))) \
235
...                        pattern.pattern_literal(stdin))) \
236
...       as gen:
236
...       as gen:
237
...         for no_plan in gen:
237
...         for no_plan in gen:
238
...             print output.as_data(my_context)
238
...             print(output.as_data(my_context))
239
&gt;&gt;&gt; run_command('command', ('echo', 'hi', 'mom'))
239
&gt;&gt;&gt; run_command('command', ('echo', 'hi', 'mom'))
240
('hi mom',)
240
('hi mom',)
241
&gt;&gt;&gt; run_command('command', ('ls',))   # doctest: +NORMALIZE_WHITESPACE
241
&gt;&gt;&gt; run_command('command', ('ls',))   # doctest: +NORMALIZE_WHITESPACE
242
('fact_bases.txt', 'index.txt', 'links', 'question_bases.txt',
242
('fact_bases.txt', 'index.txt', 'links', 'question_bases.txt',
243
 'rule_bases.txt', 'special.txt')
243
 'rule_bases.txt', 'special.txt')
...
...
259
 'stdin: line 2',
259
 'stdin: line 2',
260
 'stdin: line 3')
260
 'stdin: line 3')
261
&gt;&gt;&gt; run_command('command', ('false',))
261
&gt;&gt;&gt; run_command('command', ('false',))
262
Traceback (most recent call last):
262
Traceback (most recent call last):
263
    ...
263
    ...
264
CalledProcessError: Command 'false' returned non-zero exit status 1
264
subprocess.CalledProcessError: Command 'false' returned non-zero exit status 1
265
</pre>
265
</pre>
266
</blockquote>
266
</blockquote>
267
</div>
267
</div>
268
<div class="section" id="general-command">
268
<div class="section" id="general-command">
269
<h3>General_command</h3>
269
<h3>General_command</h3>