* Documentation update.

master
Wirawan Purwanto 10 years ago
parent b4883c4ca9
commit bec94cb8c0
  1. 12
      py/stdout_capture.py

@ -12,6 +12,18 @@ wpylib.py.stdout_capture
Capture tool for sys.stdout output, for interactive uses (primarily,
so that the output from sys.stdout is recorded to an ipython log file).
Example uses:
1) redirecting stdout explicitly
from wpylib.py.stdout_capture import StdoutCapture
xstdout = StdoutCapture()
# the original command was: fc.calculate_and_print_energy(h, UHF_01, UHF_01, out=sys.stdout)
# ^^^^^^^^^^^^^^
# this now becomes:
xstdout(fc.calculate_and_print_energy, h, UHF_01, UHF_01, out=xstdout.stdout)
Original-source: `ipython_common.py`.
"""

Loading…
Cancel
Save