Package moap :: Package util :: Module util
[hide private]
[frames] | no frames]

Module util

source code

Classes [hide private]
  LogCommand
Functions [hide private]
 
getPackageModules(packageName, ignore=None)
Get all the modules in the given package.
source code
 
namedModule(name)
Return a module given its name.
source code
 
getEditor(environ=None)
Return an editor that can be used, by checking environment variables.
source code
 
writeTemp(contents=None)
Create a new temporary file that contains the given contents.
source code
 
editTemp(contents=None, instructions=None, stdout=sys.stdout, stderr=sys.stdout)
Create and edit a temporary file that contains the given contents and instructions.
source code
Function Details [hide private]

getPackageModules(packageName, ignore=None)

source code 

Get all the modules in the given package.

Returns:
list of module names directly under the given packageName

writeTemp(contents=None)

source code 

Create a new temporary file that contains the given contents.

Returns:
the path to the temporary file. Unlink after use.

editTemp(contents=None, instructions=None, stdout=sys.stdout, stderr=sys.stdout)

source code 

Create and edit a temporary file that contains the given contents and instructions.

Parameters:
  • contents (list)
  • instructions (list)
Returns:
the list of non-empty lines in the body, or None if the file was unchanged (which means, abort)