[PR #43] [python] fix calling python script as subprocess on Windows #631

Closed
opened 2026-01-29 20:46:30 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/google/brotli/pull/43

State: closed
Merged: Yes


Hello,
This patch fixes an issue which occurs when calling a python script as a subprocess from within another python script on Windows.
Instead of executing the child script through the shell, I run it with the same sys.executable that was used to run the parent script.
Besides, I'm using subprocess.check_call instead of subprocess.call to halt execution if subprocess exits with non-zero return code.
Cheers,

Cosimo

**Original Pull Request:** https://github.com/google/brotli/pull/43 **State:** closed **Merged:** Yes --- Hello, This patch fixes an issue which occurs when calling a python script as a subprocess from within another python script on Windows. Instead of executing the child script through the shell, I run it with the same `sys.executable` that was used to run the parent script. Besides, I'm using `subprocess.check_call` instead of `subprocess.call` to halt execution if subprocess exits with non-zero return code. Cheers, Cosimo
claunia added the pull-request label 2026-01-29 20:46:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#631