You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
438 B
21 lines
438 B
# This module is not entirely compatible with CPython
|
|
import os
|
|
|
|
|
|
os.putenv("TEST_VARIABLE", "TEST_VALUE")
|
|
|
|
print(os.getenv("TEST_VARIABLE"))
|
|
print(os.getenv("TEST_VARIABLE", "TEST_DEFAULT_VALUE"))
|
|
|
|
os.unsetenv("TEST_VARIABLE")
|
|
|
|
print(os.getenv("TEST_VARIABLE"))
|
|
print(os.getenv("TEST_VARIABLE", "TEST_DEFAULT_VALUE"))
|
|
|
|
print(os.system("exit 0"))
|
|
|
|
rand = os.urandom(4)
|
|
print(type(rand) is bytes, len(rand))
|
|
|
|
os.errno(2)
|
|
print(os.errno())
|
|
|