Skip to content

pystark.helpers.process

exec_async(cmd, shell=False) async

Execute a system command asynchronously using Python and get the stdout and stderr as strings

Parameters:

Name Type Description Default
cmd str

Command to execute.

required
shell bool

Whether to run in shell mode.

False

Returns:

Type Description
(<class 'str'>, <class 'str'>)

tuple of stdout and stderr as strings

exec_sync(cmd, shell=False)

Execute a system command synchronously using Python and get the stdout and stderr as strings.

Parameters:

Name Type Description Default
cmd str

Command to execute.

required
shell bool

Whether to run in shell mode.

False

Returns:

Type Description
(<class 'str'>, <class 'str'>)

tuple of stdout and stderr as strings

Back to top