mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-01-09 20:33:34 -08:00
15 lines
331 B
Python
15 lines
331 B
Python
# -*- python -*-
|
|
|
|
import pkgutil
|
|
import sys
|
|
|
|
# walk_packages() is much slower than iter_modules(), use it only when
|
|
# completing something with a dot in it.
|
|
if len(sys.argv) > 1 and "." in sys.argv[1]:
|
|
walker = pkgutil.walk_packages
|
|
else:
|
|
walker = pkgutil.iter_modules
|
|
|
|
for mod in walker():
|
|
print(mod[1]) # noqa: E211
|