Package zeroinstall :: Package injector :: Module run
[frames] | no frames]

Module run

source code

Executes a set of implementations as a program.

Functions
 
do_env_binding(binding, path)
Update this process's environment by applying the binding.
source code
 
execute(policy, prog_args, dry_run=False, main=None, wrapper=None)
Execute program.
source code
 
execute_selections(selections, prog_args, dry_run=False, main=None, wrapper=None)
Execute program.
source code
 
test_selections(selections, prog_args, dry_run, main, wrapper=None)
Run the program in a child process, collecting stdout and stderr.
source code
Function Details

do_env_binding(binding, path)

source code 

Update this process's environment by applying the binding.

Parameters:

execute(policy, prog_args, dry_run=False, main=None, wrapper=None)

source code 

Execute program. On success, doesn't return. On failure, raises an Exception. Returns normally only for a successful dry run.

Parameters:
  • policy (policy.Policy) - a policy with the selected versions
  • prog_args ([str]) - arguments to pass to the program
  • dry_run (bool) - if True, just print a message about what would have happened
  • main (str) - the name of the binary to run, or None to use the default
  • wrapper (str) - a command to use to actually run the binary, or None to run the binary directly

Precondition: policy.ready and policy.get_uncached_implementations() == []

execute_selections(selections, prog_args, dry_run=False, main=None, wrapper=None)

source code 

Execute program. On success, doesn't return. On failure, raises an Exception. Returns normally only for a successful dry run.

Parameters:
  • selections (selections.Selections) - the selected versions
  • prog_args ([str]) - arguments to pass to the program
  • dry_run (bool) - if True, just print a message about what would have happened
  • main (str) - the name of the binary to run, or None to use the default
  • wrapper (str) - a command to use to actually run the binary, or None to run the binary directly

Since: 0.27

Precondition: All implementations are in the cache.

test_selections(selections, prog_args, dry_run, main, wrapper=None)

source code 

Run the program in a child process, collecting stdout and stderr.

Returns:
the output produced by the process

Since: 0.27