Files
RustPython/Lib/importlib/metadata/diagnose.py
Terry Tianlin Luan a4df238b3d Updated the importlib + nturl2path + pathlib libraries + associated tests - v3.13.10 (#6609)
* Updated the nturl2path library

* Updated pathlib library + test

* Updated urllib test

* Added expectedFailure to failing tests

* Updated importlib library
2026-01-01 08:58:59 +09:00

22 lines
379 B
Python
Vendored

import sys
from . import Distribution
def inspect(path):
print("Inspecting", path)
dists = list(Distribution.discover(path=[path]))
if not dists:
return
print("Found", len(dists), "packages:", end=' ')
print(', '.join(dist.name for dist in dists))
def run():
for path in sys.path:
inspect(path)
if __name__ == '__main__':
run()