4646# stderr=b'/bin/ls: cannot access /some/path/containing spaces: No such file or directory\n'
4747# )
4848
49- __version__ = "2.3.2 "
49+ __version__ = "2.3.3 "
5050
5151logger = logging .getLogger ("procrunner" )
5252logger .addHandler (logging .NullHandler ())
@@ -304,16 +304,18 @@ def run(
304304 command ,
305305 * ,
306306 timeout : Optional [float ] = None ,
307- stdin : Optional [Union [bytes , int ]] = None ,
308- print_stdout : bool = True ,
309- print_stderr : bool = True ,
310- callback_stdout : Optional [Callable ] = None ,
311307 callback_stderr : Optional [Callable ] = None ,
308+ callback_stdout : Optional [Callable ] = None ,
309+ creationflags : int = 0 ,
312310 environment : Optional [dict [str , str ]] = None ,
313311 environment_override : Optional [dict [str , str ]] = None ,
312+ preexec_fn : Optional [Callable ] = None ,
313+ print_stderr : bool = True ,
314+ print_stdout : bool = True ,
315+ raise_timeout_exception : Any = ...,
316+ stdin : Optional [Union [bytes , int ]] = None ,
314317 win32resolve : bool = True ,
315318 working_directory : Optional [str ] = None ,
316- raise_timeout_exception : Any = ...,
317319) -> subprocess .CompletedProcess :
318320 """
319321 Run an external process.
@@ -331,9 +333,11 @@ def run(
331333 stdout line.
332334 :param callback_stderr: Optional function which is called for each
333335 stderr line.
336+ :param creationflags: flags that will be passed to subprocess call
334337 :param dict environment: The full execution environment for the command.
335338 :param dict environment_override: Change environment variables from the
336339 current values for command execution.
340+ :param preexec_fn: pre-execution function, will be passed to subprocess call
337341 :param boolean win32resolve: If on Windows, find the appropriate executable
338342 first. This allows running of .bat, .cmd, etc.
339343 files without explicitly specifying their
@@ -399,6 +403,8 @@ def run(
399403 stdin = stdin_pipe ,
400404 stdout = subprocess .PIPE ,
401405 stderr = subprocess .PIPE ,
406+ creationflags = creationflags ,
407+ preexec_fn = preexec_fn ,
402408 )
403409
404410 thread_pipe_pool = []
0 commit comments