Package prompt :: Module results :: Class Results
[hide private]
[frames] | no frames]

Class Results

source code

Instance Methods [hide private]
 
__init__(self, relax) source code
 
display(self, run=None, format='columnar')
Function for displaying the results of the run.
source code
 
read(self, run=None, file='results', dir='run', format='columnar')
Function for reading results from a file.
source code
 
write(self, run=None, file='results', dir='run', force=0, format='columnar', compress_type=1)
Function for writing results of the run to a file.
source code
Method Details [hide private]

display(self, run=None, format='columnar')

source code 
Function for displaying the results of the run.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

format:  The format of the output.

read(self, run=None, file='results', dir='run', format='columnar')

source code 
Function for reading results from a file.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

file:  The name of the file to read results from.

dir:  The directory where the file is located.


Description
~~~~~~~~~~~

If no directory name is given, the results file will be searched for in a directory named
after the run name.  To search for the results file in the current working directory, set
dir to None.

This function is able to handle uncompressed, bzip2 compressed files, or gzip compressed
files automatically.  The full file name including extension can be supplied, however, if
the file cannot be found, this function will search for the file name with '.bz2' appended
followed by the file name with '.gz' appended.

write(self, run=None, file='results', dir='run', force=0, format='columnar', compress_type=1)

source code 
Function for writing results of the run to a file.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

file:  The name of the file to output results to.  The default is 'results'.

dir:  The directory name.

force:  A flag which, if set to 1, will cause the results file to be overwritten.

format:  The format of the output.

compress_type:  The type of compression to use when creating the file.


Description
~~~~~~~~~~~

If no directory name is given, the results file will be placed in a directory named after
the run name.  To place the results file in the current working directory, set dir to None.

The default behaviour of this function is to compress the file using bzip2 compression.  If
the extension '.bz2' is not included in the file name, it will be added.  The compression
can, however, be changed to either no compression or gzip compression.  This is controlled
by the compress_type argument which can be set to

    0:  No compression (no file extension),
    1:  bzip2 compression ('.bz2' file extension),
    2:  gzip compression ('.gz' file extension).

The complementary read function will automatically handle the compressed files.