ranger.core.runner | index ../../ranger/core/runner.py |
This module is an abstract layer over subprocess.Popen
It gives you highlevel control about how processes are run.
Example:
run = Runner(logfunc=print)
run('sleep 2', wait=True) # waits until the process exists
run(['ls', '--help'], flags='p') # pipes output to pager
run() # prints an error message
List of allowed flags:
s: silent mode. output will be discarded.
f: fork the process.
p: redirect output to the pager
c: run only the current file (not handled here)
w: wait for enter-press afterwards
r: run application with root privilege (requires sudo)
t: run application in a new terminal window
(An uppercase key negates the respective lower case flag)
Modules | ||||||
|
Classes | ||||||||||||||||
|
Functions | ||
|
Data | ||
ALLOWED_FLAGS = 'cfrtCFRT' PIPE = -1 |