When looking for things that might be modules, include *module.c from
the Modules/ directory. Most of the remaining undocumented modules seem to be living there.
This commit is contained in:
parent
9e480adf9b
commit
924b42de9c
@ -25,6 +25,7 @@ Limitation: Modules loadable as shared objects are not listed.
|
|||||||
__version__ = '$Revision$'
|
__version__ = '$Revision$'
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
|
import glob
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
@ -76,7 +77,6 @@ def main():
|
|||||||
srcdir = os.path.normpath(os.path.join(
|
srcdir = os.path.normpath(os.path.join(
|
||||||
os.path.dirname(sys.argv[0]), os.pardir, os.pardir))
|
os.path.dirname(sys.argv[0]), os.pardir, os.pardir))
|
||||||
os.chdir(srcdir)
|
os.chdir(srcdir)
|
||||||
fp = os.popen("find Lib -name \*.py -print", "r")
|
|
||||||
modules_by_name = {}
|
modules_by_name = {}
|
||||||
modules_by_dir = {}
|
modules_by_dir = {}
|
||||||
if builtin:
|
if builtin:
|
||||||
@ -87,6 +87,7 @@ def main():
|
|||||||
modules_by_name[name] = "<built-in>"
|
modules_by_name[name] = "<built-in>"
|
||||||
l.append(name)
|
l.append(name)
|
||||||
rx = re.compile("Lib/plat-[a-z0-9]*/", re.IGNORECASE)
|
rx = re.compile("Lib/plat-[a-z0-9]*/", re.IGNORECASE)
|
||||||
|
fp = os.popen("find Lib -name \*.py -print", "r")
|
||||||
while 1:
|
while 1:
|
||||||
line = fp.readline()
|
line = fp.readline()
|
||||||
if not line:
|
if not line:
|
||||||
@ -105,6 +106,22 @@ def main():
|
|||||||
modules_by_dir[dir] = l
|
modules_by_dir[dir] = l
|
||||||
if name not in l:
|
if name not in l:
|
||||||
l.append(name)
|
l.append(name)
|
||||||
|
# load up extension modules:
|
||||||
|
pwd = os.getcwd()
|
||||||
|
try:
|
||||||
|
os.chdir("Modules")
|
||||||
|
dir = "<extension>"
|
||||||
|
for line in glob.glob("*module.c"):
|
||||||
|
name = line[:-8]
|
||||||
|
if ignore(name) or modules_by_name.has_key(name) or name == "xx":
|
||||||
|
continue
|
||||||
|
modules_by_name[name] = dir
|
||||||
|
l = modules_by_dir.get(dir, [])
|
||||||
|
modules_by_dir[dir] = l
|
||||||
|
if name not in l:
|
||||||
|
l.append(name)
|
||||||
|
finally:
|
||||||
|
os.chdir(pwd)
|
||||||
#
|
#
|
||||||
# Dump the results:
|
# Dump the results:
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user