src/pylib/Lib/os

Source   Edit  

see docs.python.org/3/library/os.html

Also export everything of std/os

Warning: export of std/os will be removed in 0.10.0

Types

uname_result = tuple[sysname, nodename, release, version, machine: PyStr]
Source   Edit  

Procs

proc cpu_count(): OptionalObj[int] {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc getrandom(size: int; flags = 0): PyBytes {....raises: [], tags: [],
    forbids: [].}
Admonition: since Python 3.6
Hint: Availability: linux when have_getrandom_syscall
Source   Edit  
proc process_cpu_count(): OptionalObj[int] {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc uname(): uname_result {....raises: [PyOSError], tags: [], forbids: [].}
Source   Edit  
proc urandom(size: int): PyBytes {....raises: [ValueError, NotImplementedError,
    OSError], tags: [], forbids: [].}
Source   Edit  

Templates

template close(p: DirEntry)
Admonition: since Python 3.6
Source   Edit  
template scandir(): untyped
Admonition: since Python 3.5
Source   Edit  
template scandir(p: int): untyped
Admonition: since Python 3.5
Source   Edit  
template scandir[T](p: PathLike[T]): untyped
Admonition: since Python 3.5
Source   Edit  

Exports

normpath, newBlockingIOError, WIFSTOPPED, Py_fstat, chars, osErrorMsgWithPath, O_NOCTTY, fspath, ==, contains, getChar, supports_dir_fd, >=, [], +=, bytes, TimeoutError, osErrorMsgWithPath, altsep, WEXITED, bytes, O_APPEND, raiseExcWithPath, set_inheritable, waitstatus_to_exitcode, closerange, WEXITSTATUS, dirname, link, runes, WSTOPSIG, <=, ==, noWeirdTarget, contains, O_NOATIME, O_WRONLY, TimeNsPair, wrapExportSincePy, bytes, WIFSIGNALED, readlink, ==, split, contains, stat, CanIOOpenT, +, WNOHANG, PyMinor, fchmod, errnoMsg, asVersion, is_file, enter, ConnectionResetError, BlockingIOError, [], newPyOSError, pathrepr, unlink, [], supports_fd, getmtime, $, fspath, raiseErrno, +=, O_PATH, templWrapExportSincePy, PyMajor, or, abspath, Py_fstat_noraise, |=, getcwdb, $, splitdrive, bytes, ChildProcessError, $, toNimString, bytes, walk_symlinks_as_files, +, replace, isfile, newPyOSError, PermissionError, None, relpath, repr, O_ASYNC, [], [], utime, utime, byteLen, getctime, raiseExcWithPath2, splitext, O_DIRECT, toPyStr, exportSincePy, walk, rmdir, name, open, InterruptedError, and, utime, $, basename, WUNTRACED, raiseExcWithPath, getCharPtr, islink, walk, O_DSYNC, exit, raiseErrnoT, str, O_NONBLOCK, FileNotFoundError, repr, issuperset, len, st_atime, O_NDELAY, AttributeError, extsep, listdir, defpath, FileExistsError, toPyStr, asVersion, pysince, RuntimeError, isatty, +, isdir, StringLike, WCOREDUMP, WIFCONTINUED, join, newBlockingIOError, not, contains, $, bytes, remove, OnErrorCb, ==, $, pathrepr, IsADirectoryError, InJs, WNOWAIT, fdopen, or, byteLen, SEEK_HOLE, audit, PyOSError, len, shallIgnore, pysince, raiseExcWithPath, O_RSYNC, ., bytes, tryOsOp, raiseExcWithPath, bytes, symlink, substr, PyBytes, str, makedirs, NoneType, system, getsize, mkdir, getpid, +=, PyReleaseLevel, TimePair, substr, ProcessLookupError, SEEK_END, fdopendir, Serial, BlockingIOError, stat, walk, close, PyOSError, BrokenPipeError, samefile, O_NOFOLLOW, str, O_CLOEXEC, getppid, +, lstat, PySys_Audit, str, st_mtime, pardir, O_TMPFILE, O_TRUNC, O_SYNC, ConnectionError, rename, toNimString, +, rmdir, repr, walk, st_atime_ns, PySerial, stat_result, $, linesep, runeAtPos, st_mtime_ns, asVersion, is_dir, chmod, supports_effective_ids, get_terminal_size, PyOSError, getatime, is_file, wait3, is_junction, O_CREAT, toNimStr, TypeError, WIFEXITED, NameError, truncate, devnull, len, KeyboardInterrupt, str, SEEK_SET, +=, fstat, pybytes, tryOsOp, WSTOPPED, st_ctime_ns, +=, Patch, supports_follow_symlinks, wait4, removedirs, PyReleaseLevelEnum, isabs, items, symlink, substr, PyStr, Minor, NotADirectoryError, umask, NotImplementedError, [], curdir, tryOsOp, [], WCONTINUED, items, WTERMSIG, runeLenAt, Version, contains, is_symlink, BlockingIOError, O_DIRECTORY, toTup, fspath, pathsep, nestListWithFirst, stat, chars, repr, PathLike, get_inheritable, toPyStr, samestat, SEEK_CUR, @, mapPathLike, waitpid, asVersion, not, close, NsUnit, PyPatch, |, pysince, O_RDONLY, raiseErrnoWithPath, getChar, wait, +=, Major, close, getcwd, hasChar, st_ctime, +, +, ftruncate, addaudithook, lseek, WalkRes, ConnectionAbortedError, str, ConnectionRefusedError, SystemExit, tryOsOp, is_dir, items, SEEK_DATA, [], PySys_AddAuditHook, fspath, mapPathLike, ../pyconfig/os_consts, O_RDWR, O_EXCL, join, ReleaseLevel, terminal_size, scandirIter, sep, chdir, ==, unsafeGet, is, expOptObjCvt, unsafeToNone, DirEntry