« Minimal Reproducible »

Home Tags About GitHub

print-all-stuffs-in-a-module

Published at 2024-01-15
Last update over 365 days ago Licensed under CC BY-NC-SA 4.0 langspython

TL;DR of answers below: use dir to return functions and variables; use inspect to filter functions only; and use ast to parse without importing. – Jonathan H Mar 20, 2018 at 9:55

import mod
print(dir(mod))

https://stackoverflow.com/questions/139180/how-to-list-all-functions-in-a-module

« Minimal Reproducible »

Powered by Astro