Package flumotion :: Package common :: Module package
[hide private]

Module package

source code

objects and functions used in dealing with packages


Version: $Rev: 6982 $

Classes [hide private]
  PackageHooks
I am an import Hooks object that makes sure that every package that gets loaded has every necessary path in the module's __path__ list.
  Packager
I am an object through which package paths can be registered, to support the partitioning of the module import namespace across bundles.
Functions [hide private]
 
_listDirRecursively(path)
I'm similar to os.listdir, but I work recursively and only return directories containing python code.
source code
list
_listPyFileRecursively(path)
I'm similar to os.listdir, but I work recursively and only return files representing python non-package modules.
source code
 
_findPackageCandidates(path, prefix='flumotion')
I take a directory and return a list of candidate python packages under that directory that start with the given prefix.
source code
 
findEndModuleCandidates(path, prefix='flumotion')
I take a directory and return a list of candidate python end modules (i.e., non-package modules) for the given module prefix.
source code
Packager
getPackager()
Return the (unique) packager.
source code
Variables [hide private]
  __packager = None
Function Details [hide private]

_listDirRecursively(path)

source code 

I'm similar to os.listdir, but I work recursively and only return directories containing python code.

Parameters:
  • path (string) - the path

_listPyFileRecursively(path)

source code 

I'm similar to os.listdir, but I work recursively and only return files representing python non-package modules.

Parameters:
  • path (string) - the path
Returns: list
list of files underneath the given path containing python code

_findPackageCandidates(path, prefix='flumotion')

source code 

I take a directory and return a list of candidate python packages under that directory that start with the given prefix. A package is a module containing modules; typically the directory with the same name as the package contains __init__.py

Parameters:
  • path (string) - the path

findEndModuleCandidates(path, prefix='flumotion')

source code 

I take a directory and return a list of candidate python end modules (i.e., non-package modules) for the given module prefix.

Parameters:
  • path (string) - the path under which to search for end modules
  • prefix (string) - module prefix to check candidates under