Pluggdapps

Component system. Web framework. And more ...

path – A collection function to manipulate path.

Module contents

pluggdapps.utils.path.package_path(package)[source]

Compute directory path for package. To avoid repeating the same computing, the abspath is cached on the package object.

pluggdapps.utils.path.caller_module(level=2, sys=<module 'sys' (built-in)>)[source]

Return the module object from which the call was made. For instance, if A defined in module M makes a call to B and B, by calling this function, can know the module of the caller.

pluggdapps.utils.path.caller_path(path, level=2)[source]

Return the module path of caller.

pluggdapps.utils.path.package_name(pkg_or_module)[source]

If this function is passed a module, return the dotted Python package name of the package in which the module lives. If this function is passed a package, return the dotted Python package name of the package itself.

pluggdapps.utils.path.package_of(pkg_or_module)[source]

Return the package of a module or return the package itself

pluggdapps.utils.path.caller_package(level=2)[source]

level always defaults to 2. Think about it, how can it default to something else ?