rcmpy.watch package#
Submodules#
rcmpy.watch.params module#
An interface for implementing file-system watching parameters.
- class rcmpy.watch.params.WatchParams(base: Path, directory: Path, cmd: List[str], check_contents: bool, shell: bool = False, single_pass: bool = False, poll_rate: float = 0.1)[source]#
Bases:
NamedTuple
Watch task parameters.
- base: Path#
Alias for field number 0
- check_contents: bool#
Alias for field number 3
- cmd: List[str]#
Alias for field number 2
- directory: Path#
Alias for field number 1
- static from_args(args: Namespace) WatchParams [source]#
Create watch parameters from parsed arugments.
- poll_rate: float#
Alias for field number 6
- shell: bool#
Alias for field number 4
- single_pass: bool#
Alias for field number 5
Module contents#
An interface for implementing file-system watching tasks.
- async rcmpy.watch.command(*args: str, shell: bool = False) int [source]#
Run a subprocess and return the return code.
- async rcmpy.watch.entry(stop_sig: Event, params: WatchParams) int [source]#
The async entry-point for the watch command.
- rcmpy.watch.watch(params: WatchParams) int [source]#
Watch a directory for changes.