mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 15:58:53 +00:00
The script that makes the next commit (move_0216.py and its edit list), the checks used to test it (the Windows per-file runner, the archive and zip comparisons, the failure-site reader, the path scan), and the file-split script for serve/server.py. They stay in tools/layout after the move. README.md in that folder says how to run each.
14 lines
597 B
Python
14 lines
597 B
Python
"""Print every public and private top-level name of a module and the type of what it is bound to, one per line, sorted.
|
|
python -I names_of.py <folder on sys.path> <module name> (run it on the tree before and after a split and diff the outputs)
|
|
A moved function must still be reachable as module.name with the same kind of object."""
|
|
import importlib
|
|
import sys
|
|
|
|
sys.path.insert(0, sys.argv[1])
|
|
m = importlib.import_module(sys.argv[2])
|
|
for n in sorted(vars(m)):
|
|
if n.startswith("__") and n.endswith("__"):
|
|
continue
|
|
v = getattr(m, n)
|
|
print("%s %s" % (n, type(v).__name__))
|