Package diffpy :: Package pdffit2 :: Module output
[hide private]
[frames] | no frames]

Source Code for Module diffpy.pdffit2.output

 1  #!/usr/bin/env python 
 2  ############################################################################## 
 3  # 
 4  # pdffit2           by DANSE Diffraction group 
 5  #                   Simon J. L. Billinge 
 6  #                   (c) 2007 trustees of the Michigan State University. 
 7  #                   All rights reserved. 
 8  # 
 9  # File coded by:    Pavol Juhas 
10  # 
11  # See AUTHORS.txt for a list of people who contributed. 
12  # See LICENSE.txt for license information. 
13  # 
14  ############################################################################## 
15   
16  """Take care of sending engine output to given file-like object. 
17  The output file is stored in local module variable stdout. 
18  """ 
19   
20   
21  # create module variable stdout 
22   
23  from sys import stdout as stdout 
24   
25 -def redirect_stdout(dst):
26 """Redirect PDFfit2 standard output to a file-like object dst. 27 The dst value is stored in module variable stdout. 28 """ 29 from pdffit2 import redirect_stdout 30 redirect_stdout(dst) 31 global stdout 32 stdout = dst 33 return
34 35 # End of file 36