dlpt.print_file_callables module

Print a list of all callable objects (functions/classes) from a given python file. See usage with “–help” argument.

dlpt.print_file_callables.get_callable_objects_str(file_path: str, include_private: bool = False) List[str]
Get a printable list of strings of all callable objects (functions,

classes, methods) from a given python file.

Note: file must be syntactically correct - importable, since this function

performs a dynamic import.

Note: this function is meant for test/code development, not for actual

production usage.

Parameters:
  • file_path – path to a file to check for object definitions.

  • include_private – if True, object that starts with ‘_’ are also added. Note: ‘__’ objects are always ignored.

Returns:

List of string representation of callable objects from a given file.

dlpt.print_file_callables.print_callable_objects(file_path: str, include_private: bool)
Print a list of all callable objects (functions/classes) from a

given python file.

Note: file must be syntactically correct - importable, since this function

performs a dynamic import.

Note: this function is meant for test/code development, not for actual

production usage.

Parameters:
  • file_path – path to a file to check for object definitions.

  • include_private – if True, object that starts with ‘_’ are also added. Note: ‘__’ objects are always ignored.