-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
62 lines (51 loc) · 1.03 KB
/
__init__.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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ProjectName :
Author : Tian Gao
CreationDate : 2017/5/27
Description :
"""
import sys
import pdb
import BioinfoComm, Comm
from Comm import print0
ENABLE_CPROFILE = False
PRINT_INTO_LOG = False
LOG_FN = r'C:\Users\Administrator\Desktop\log.txt'
class X:
def __init__(self):
pass
#end_func
def fun2(self):
pass
#end_func
#end_class
def fun1():
print 123
#end_func
def test():
fun1()
x = X()
x.fun2()
#end_test
def main():
if PRINT_INTO_LOG:
sys.stdout = open(LOG_FN, 'w')
test()
sys.stdout.close()
else:
test()
#end_main
if __name__ == "__main__":
if ENABLE_CPROFILE:
import cProfile
import pstats
cp = cProfile.Profile()
cp.runcall(main)
ps = pstats.Stats(cp)
sorted_stats = ps.sort_stats('time')
sorted_stats.print_stats(10)
else:
main()
#end_if