Ignore:
Timestamp:
Oct 20, 2010, 6:09:10 PM (9 years ago)
Author:
ksherdy
Message:

Update demo prototype.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/workspace/prototype.py

    r668 r669  
    3737
    3838        return
    39                 sys.stderr.write("Usage: " + filename + " <infile> [outfile]\n")
     39       
    4040if __name__ == "__main__":
    4141        import doctest
    4242        doctest.testmod()
    4343
    44         if len(sys.argv) < 2:
    45 
     44        if len(sys.argv) < 1:
     45                sys.stderr.write("Usage: " + filename + "\n")
    4646                sys.exit(2)
    47         if len(sys.argv) == 3:
    48                 outfile = open(sys.argv[2],"w")
    49         else: outfile = sys.stdout
    5047
    5148        data = bitutil.readfile(sys.argv[1])
     49        demo_validate_number(data)
    5250
    53         result = demo_XXX(data)
    54        
    55         outfile.write(result)
    56         outfile.close()
    57 
Note: See TracChangeset for help on using the changeset viewer.