| 1 |
import sys |
| 2 |
|
| 3 |
if sys.platform == "win32": |
| 4 |
|
| 5 |
|
| 6 |
from os import ( |
| 7 |
F_OK as F_OK, |
| 8 |
O_APPEND as O_APPEND, |
| 9 |
O_BINARY as O_BINARY, |
| 10 |
O_CREAT as O_CREAT, |
| 11 |
O_EXCL as O_EXCL, |
| 12 |
O_NOINHERIT as O_NOINHERIT, |
| 13 |
O_RANDOM as O_RANDOM, |
| 14 |
O_RDONLY as O_RDONLY, |
| 15 |
O_RDWR as O_RDWR, |
| 16 |
O_SEQUENTIAL as O_SEQUENTIAL, |
| 17 |
O_SHORT_LIVED as O_SHORT_LIVED, |
| 18 |
O_TEMPORARY as O_TEMPORARY, |
| 19 |
O_TEXT as O_TEXT, |
| 20 |
O_TRUNC as O_TRUNC, |
| 21 |
O_WRONLY as O_WRONLY, |
| 22 |
P_DETACH as P_DETACH, |
| 23 |
P_NOWAIT as P_NOWAIT, |
| 24 |
P_NOWAITO as P_NOWAITO, |
| 25 |
P_OVERLAY as P_OVERLAY, |
| 26 |
P_WAIT as P_WAIT, |
| 27 |
R_OK as R_OK, |
| 28 |
TMP_MAX as TMP_MAX, |
| 29 |
W_OK as W_OK, |
| 30 |
X_OK as X_OK, |
| 31 |
DirEntry as DirEntry, |
| 32 |
abort as abort, |
| 33 |
access as access, |
| 34 |
chdir as chdir, |
| 35 |
chmod as chmod, |
| 36 |
close as close, |
| 37 |
closerange as closerange, |
| 38 |
cpu_count as cpu_count, |
| 39 |
device_encoding as device_encoding, |
| 40 |
dup as dup, |
| 41 |
dup2 as dup2, |
| 42 |
error as error, |
| 43 |
execv as execv, |
| 44 |
execve as execve, |
| 45 |
fspath as fspath, |
| 46 |
fstat as fstat, |
| 47 |
fsync as fsync, |
| 48 |
ftruncate as ftruncate, |
| 49 |
get_handle_inheritable as get_handle_inheritable, |
| 50 |
get_inheritable as get_inheritable, |
| 51 |
get_terminal_size as get_terminal_size, |
| 52 |
getcwd as getcwd, |
| 53 |
getcwdb as getcwdb, |
| 54 |
getlogin as getlogin, |
| 55 |
getpid as getpid, |
| 56 |
getppid as getppid, |
| 57 |
isatty as isatty, |
| 58 |
kill as kill, |
| 59 |
link as link, |
| 60 |
listdir as listdir, |
| 61 |
lseek as lseek, |
| 62 |
lstat as lstat, |
| 63 |
mkdir as mkdir, |
| 64 |
open as open, |
| 65 |
pipe as pipe, |
| 66 |
putenv as putenv, |
| 67 |
read as read, |
| 68 |
readlink as readlink, |
| 69 |
remove as remove, |
| 70 |
rename as rename, |
| 71 |
replace as replace, |
| 72 |
rmdir as rmdir, |
| 73 |
scandir as scandir, |
| 74 |
set_handle_inheritable as set_handle_inheritable, |
| 75 |
set_inheritable as set_inheritable, |
| 76 |
spawnv as spawnv, |
| 77 |
spawnve as spawnve, |
| 78 |
startfile as startfile, |
| 79 |
stat as stat, |
| 80 |
stat_result as stat_result, |
| 81 |
statvfs_result as statvfs_result, |
| 82 |
strerror as strerror, |
| 83 |
symlink as symlink, |
| 84 |
system as system, |
| 85 |
terminal_size as terminal_size, |
| 86 |
times as times, |
| 87 |
times_result as times_result, |
| 88 |
truncate as truncate, |
| 89 |
umask as umask, |
| 90 |
uname_result as uname_result, |
| 91 |
unlink as unlink, |
| 92 |
unsetenv as unsetenv, |
| 93 |
urandom as urandom, |
| 94 |
utime as utime, |
| 95 |
waitpid as waitpid, |
| 96 |
waitstatus_to_exitcode as waitstatus_to_exitcode, |
| 97 |
write as write, |
| 98 |
) |
| 99 |
|
| 100 |
if sys.version_info >= (3, 11): |
| 101 |
from os import EX_OK as EX_OK |
| 102 |
if sys.version_info >= (3, 12): |
| 103 |
from os import ( |
| 104 |
get_blocking as get_blocking, |
| 105 |
listdrives as listdrives, |
| 106 |
listmounts as listmounts, |
| 107 |
listvolumes as listvolumes, |
| 108 |
set_blocking as set_blocking, |
| 109 |
) |
| 110 |
if sys.version_info >= (3, 13): |
| 111 |
from os import fchmod as fchmod, lchmod as lchmod |
| 112 |
|
| 113 |
if sys.version_info >= (3, 14): |
| 114 |
from os import readinto as readinto |
| 115 |
|
| 116 |
environ: dict[str, str] |