-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskel_class.py
63 lines (49 loc) · 1022 Bytes
/
skel_class.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python
"""
class descriptions here
"""
import os
import sys
import getopt
class ClassName(object):
def __init__(self, arg):
pass
def __del__(self):
pass
def foo1(self):
"""
what does this foo1 do?
"""
print "foo1"
def foo2(self):
"""
what does this foo2 do?
"""
print "foo2"
# the following code are test cases.
def usage():
import textwrap
USAGE=textwrap.dedent("""\
Usage:
test.py [options]
Options:
-h
Show a detailed help message
-c
something here
example:
test.py -h
test.py -c
""")
print USAGE
def main():
# Test cases here
opts, args = getopt.getopt(sys.argv[1:], "hc", ["help", "run"])
if not opts:
usage()
sys.exit(1)
c1=ClassName(None)
c1.foo1()
c1.foo2()
if __name__ == "__main__":
main()