$ cargo run -- -c 'import os ; os.execv("/bin/echo", ["/bin/echo", "Hello"])'
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
Running `target/debug/rustpython -c 'import os ; os.execv("/bin/echo", ["/bin/echo", "Hello"])'`
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'execv'
$ cargo run -- -c 'import os ; os.execl("/bin/echo", *["/bin/echo", "Hello"])'
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
Running `target/debug/rustpython -c 'import os ; os.execl("/bin/echo", *["/bin/echo", "Hello"])'`
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/RustPython/Lib/os.py", line 437, in execl
execv(file, args)
NameError: name 'execv' is not defined
$ python -c 'import os ; os.execv("/bin/echo", ["/bin/echo", "Hello"])'
Hello
$ python -c 'import os ; os.execl("/bin/echo", *["/bin/echo", "Hello"])'
Hello
Python Documentation
https://docs.python.org/3/library/os.html#os.execv