Add API Docs for lib/spack/llnl (#3982)
* Add API Docs for lib/spack/llnl * Clean up after previous builds * Better fix for purging API docs
This commit is contained in:

committed by
Todd Gamblin

parent
11dae722c2
commit
eaa50d3b7c
@@ -51,7 +51,7 @@ class _SkipWithBlock():
|
||||
class keyboard_input(object):
|
||||
"""Disable canonical input and echo on a stream within a with block.
|
||||
|
||||
Use this with sys.stdin for keyboard input, e.g.:
|
||||
Use this with ``sys.stdin`` for keyboard input, e.g.::
|
||||
|
||||
with keyboard_input(sys.stdin):
|
||||
r, w, x = select.select([sys.stdin], [], [])
|
||||
@@ -103,14 +103,16 @@ def __exit__(self, exc_type, exception, traceback):
|
||||
class log_output(object):
|
||||
"""Spawns a daemon that reads from a pipe and writes to a file
|
||||
|
||||
Usage:
|
||||
Usage::
|
||||
|
||||
# Spawns the daemon
|
||||
with log_output('logfile.txt', 'w') as log_redirection:
|
||||
# do things ... output is not redirected
|
||||
with log_redirection:
|
||||
# do things ... output will be logged
|
||||
|
||||
or:
|
||||
or::
|
||||
|
||||
with log_output('logfile.txt', echo=True) as log_redirection:
|
||||
# do things ... output is not redirected
|
||||
with log_redirection:
|
||||
|
Reference in New Issue
Block a user