Debian Codegraph @

pypy/module/cpyext/stubs-find-implemented.py

raw symbols SCIP
1 import re
2 import os
3
4
5 for line in open('stubs.py'):
6 if not line.strip():
7 continue
8 if line.startswith(' '):
9 continue
10 if line.startswith('#'):
11 continue
12 if line.startswith('@cpython_api'):
13 continue
14 if line.endswith(' = rffi.VOIDP\n'):
15 continue
16
17 #print line.rstrip()
18 m = re.match(r"def ([\w\d_]+)[(]", line)
19 assert m, line
20 funcname = m.group(1)
21 os.system('grep -w %s [a-r]*.py s[a-s]*.py str*.py stubsa*.py sy*.py [t-z]*.py' % funcname)