-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
macOS 15.5.
Using this Python script:
test.py:
#!/usr/bin/env python3
def main():
print("Hello, World!")
if __name__ == "__main__":
main()
If I execute a train script:
log("Testing Python script with single argument...");
try {
var result = shell.exec("/usr/bin/python3", "test.py", {
timeout: 60,
capture: true,
workdir: "."
});
log("Result: '" + result + "'");
log("Expected: Hello World and line break");
} catch (e) {
log("Error: " + e);
}
log("Testing Python script with multiple arguments...");
try {
var result = shell.exec("/usr/bin/python3", "test.py --validate-only", {
timeout: 60,
capture: true,
workdir: "."
});
log("Result: '" + result + "'");
og("Expected: Hello World and one line break");
} catch (e) {
log("Error: " + e);
}
Expected vs Observed
For both, to see simple 'Hello world'. For the first, I get nothing: result is ''. That may be the same as #54 .
For the second, I do get the captured output! But I get two line breaks:
shell.exec(/usr/bin/python3 test.py --validate-only) { }
Result: 'Hello, World!
'
Metadata
Metadata
Assignees
Labels
No labels