Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/difference_prd_files.html
Дата изменения: Fri Apr 8 12:46:14 2016
Дата индексирования: Mon Apr 11 05:55:21 2016
Кодировка:
Python: module difference_prd_files
 
 
difference_prd_files (version 4/15/04)
index
difference_prd_files.py

PURPOSE --
 
This script compares a new PRD file with a reference PRD file.
It uses the gnu diff utility for the difference.
 
 python difference_prd_files.py <file name> <branch name>
 
  where:
         branch name = OPS or SM4
 
DEVELOPER --
R. Kantor
 
MODIFICATION HISTORY --
 
o Initial implementation 3/30/04 RK 
o Updated 4/15/04 KWC - Removed from build_PRD_file.py.

 
Modules
       
glob
os
spst_getopt
string
sys

 
Classes
       
difference_prd_file

 
class difference_prd_file
     Methods defined here:
__init__(self)
Constructor.
capture_cmd(self, cmd)
Replacement for os.system that gets stdout and stderr
compare_PRD_files(self, new_file_name, old_file_name)
Compare the new file with the installed file.
compare_file(self)
Compare the new file with the old file.
compare_install_file(self, file_name, branch_name)
Compare the new file with the installed file.
find_ref_file(self, branch_name)
Find the reference PRD file to compare against.
get_diff(self)
Returns a data list of the difference.
strip_numbers(self, infile, outfile)
Create new file without line numbers. Lines will have 74 columns.
write_dif(self)
Writes the results of the file difference to disk.

 
Functions
       
run(file_name, branch_name=None, old_file=None, *args)
Compare a new PRD file with a reference PRD file.
    This uses the gnu diff utility for the difference.
 
Usage:
do difference_prd_files <file name> -PRD_lib=<branch name>
                                    -old_file=<file name> 
 where:
       file name          = New PRD file name.
 
       run options:
           -PRD_lib       = <OPS|SM4>       Difference new file against
                                             OPS or SM4 reference file.
           -old_file      = <file name>     Difference new file against
                                             old file.

 
Data
        __version__ = ' 4/15/04'