source: proto/Compiler/workspace/prototype.py @ 670

Last change on this file since 670 was 670, checked in by ksherdy, 9 years ago

Update default python prototype skeleton.

File size: 852 bytes
Line 
1# -*- coding: utf-8 -*-
2#
3# prototype.py
4#
5# Parallel Prototype Skeleton
6#
7# Ken Herdy
8# Oct. 13, 2010
9#
10#----------------------------------------------------------------------------
11#
12# We use python's unlimited precision integers for unbounded bit streams.
13# This permits simple logical operations on the entire stream.
14# Assumption: bitstreams are little-endian (e.g., as on x86).
15#
16#----------------------------------------------------------------------------
17#
18
19import bitutil
20import byteclass
21import sys
22
23filename = "prototype.py"
24
25def XXX(data):
26        return data
27
28def demo_XXX(data):
29        r"""
30        >>> demo_XXX('')
31        """ 
32        return data
33       
34if __name__ == "__main__":
35        import doctest
36        doctest.testmod()
37
38        if len(sys.argv) < 1:
39                sys.stderr.write("Usage: " + filename + "\n")
40                sys.exit(2)
41
42        data = bitutil.readfile(sys.argv[1]) 
43        demo_validate_number(data)
44
Note: See TracBrowser for help on using the repository browser.