-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed as not planned
Labels
OS-windowsextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
import os
import sys
args = [sys.executable, '-c', 'print("hello from execve")']
os.execve(args[0], args, {})results in
print(hello from execve)
^^^^
SyntaxError: invalid syntax
Using
args = [sys.executable, '-c', "print('hello from execve')"]results in
print('hello
^
SyntaxError: unterminated string literal (detected at line 1)
Both work like expected in WSL or native Ubuntu.
The only thing that somewhat works is omitting the spaces "print('hellofromexecve')" in the second case.
3.15 back to and including 3.10 are affected.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
OS-windowsextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error