run_cli
run_cli#
- run_cli(cmd: typing.Union[str, list], timeout: typing.Optional[float] = None, check_return_value: bool = True, in_background: bool = True, cwd='/') -> (<class 'int'>, <class 'str'>)[source]#
Run a command line.
>>> cmd_hillshade = ["gdaldem", "--config", >>> "NUM_THREADS", "1", >>> "hillshade", strings.to_cmd_string(dem_path), >>> "-compute_edges", >>> "-z", self.nof_threads, >>> "-az", azimuth, >>> "-alt", zenith, >>> "-of", "GTiff", >>> strings.to_cmd_string(hillshade_dem)] >>> # Run command >>> run_cli(cmd_hillshade)