ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/report.py
(Generate patch)

Comparing COMP/CRAB/python/report.py (file contents):
Revision 1.5 by elmer, Tue May 16 10:42:04 2006 UTC vs.
Revision 1.6 by slacapra, Fri Mar 28 17:18:47 2008 UTC

# Line 4 | Line 4
4   ## MAIN PROGRAM
5   ##
6  
7 < import sys
7 > import getopt,sys
8   from DashboardAPI import report
9  
10   if __name__ == '__main__' :
11 <    args = sys.argv[1:]
11 >    try:
12 >        opts, args = getopt.getopt(sys.argv[1:], "f:")
13 >    except getopt.GetoptError:
14 >        # print help information and exit:
15 >        print "Unknown option"
16 >        sys.exit(1)
17 >    if len( opts)==1 :
18 >        copt=opts[0]
19 >        filename=copt[1]
20 >        try:
21 >            rfile=open(filename)
22 >        except IOError, ex:
23 >            print "Can not open input file"
24 >            sys.exit(1)
25 >        lines=rfile.readlines()
26 >        for line in lines :
27 >           args.append(line.strip())
28 > #        print args
29 > #        print "********************"
30      report(args)
31 + #    print "***"
32 + #    print opts
33 + #    print "###"
34 + #    print args
35      sys.exit(0)
36 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines