Package bitten :: Package build :: Module shtools

Module shtools

Generic recipe commands for executing external processes.
Functions
 
exec_(ctxt, executable=None, file_=None, output=None, args=None, dir_=None, timeout=None)
Execute a program or shell script.
 
pipe(ctxt, executable=None, file_=None, input_=None, output=None, args=None, dir_=None)
Pipe the contents of a file through a program or shell script.
 
execute(ctxt, executable=None, file_=None, input_=None, output=None, args=None, dir_=None, filter_=None, timeout=None)
Generic external program execution.
Variables
  log = logging.getLogger('bitten.build.shtools')
  __package__ = 'bitten.build'
Function Details

exec_(ctxt, executable=None, file_=None, output=None, args=None, dir_=None, timeout=None)

 
Execute a program or shell script.
Parameters:
  • ctxt (Context) - the build context
  • executable - name of the executable to run
  • file_ - name of the script file, relative to the project directory, that should be run
  • output - name of the file to which the output of the script should be written
  • args - command-line arguments to pass to the script
  • dir_ - directory to change to before executing the command
  • timeout - the number of seconds before the external process should be aborted (has same constraints as CommandLine)

pipe(ctxt, executable=None, file_=None, input_=None, output=None, args=None, dir_=None)

 
Pipe the contents of a file through a program or shell script.
Parameters:
  • ctxt (Context) - the build context
  • executable - name of the executable to run
  • file_ - name of the script file, relative to the project directory, that should be run
  • input_ - name of the file containing the data that should be passed to the shell script on its standard input stream
  • output - name of the file to which the output of the script should be written
  • args - command-line arguments to pass to the script
  • dir_ - directory to change to before executing the command

execute(ctxt, executable=None, file_=None, input_=None, output=None, args=None, dir_=None, filter_=None, timeout=None)

 

Generic external program execution.

This function is not itself bound to a recipe command, but rather used from other commands.

Parameters:
  • ctxt (Context) - the build context
  • executable - name of the executable to run
  • file_ - name of the script file, relative to the project directory, that should be run
  • input_ - name of the file containing the data that should be passed to the shell script on its standard input stream
  • output - name of the file to which the output of the script should be written
  • args - command-line arguments to pass to the script
  • dir_ - directory to change to before executing the command
  • filter_ - function to filter out messages from the executable stdout
  • timeout - the number of seconds before the external process should be aborted (has same constraints as CommandLine)