os.error

exception os.error An alias for the built-in OSError exception.

os.environb

os.environb Bytes version of environ: a mapping object representing the environment as byte strings. environ and environb are synchronized (modify environb updates environ, and vice versa). environb is only available if supports_bytes_environ is True. New in version 3.2.

os.environ

os.environ A mapping object representing the string environment. For example, environ['HOME'] is the pathname of your home directory (on some platforms), and is equivalent to getenv("HOME") in C. This mapping is captured the first time the os module is imported, typically during Python startup as part of processing site.py. Changes to the environment made after this time are not reflected in os.environ, except for changes made by modifying os.environ directly. If the platform supports the pu

os.dup2()

os.dup2(fd, fd2, inheritable=True) Duplicate file descriptor fd to fd2, closing the latter first if necessary. The file descriptor fd2 is inheritable by default, or non-inheritable if inheritable is False. Changed in version 3.4: Add the optional inheritable parameter.

os.dup()

os.dup(fd) Return a duplicate of file descriptor fd. The new file descriptor is non-inheritable. On Windows, when duplicating a standard stream (0: stdin, 1: stdout, 2: stderr), the new file descriptor is inheritable. Changed in version 3.4: The new file descriptor is now non-inheritable.

os.DirEntry.stat()

stat(*, follow_symlinks=True) Return a stat_result object for this entry. This method follows symbolic links by default; to stat a symbolic link add the follow_symlinks=False argument. On Unix, this method always requires a system call. On Windows, it only requires a system call if follow_symlinks is True and the entry is a symbolic link. On Windows, the st_ino, st_dev and st_nlink attributes of the stat_result are always set to zero. Call os.stat() to get these attributes. The result is cac

os.DirEntry.path

path The entry’s full path name: equivalent to os.path.join(scandir_path, entry.name) where scandir_path is the scandir() path argument. The path is only absolute if the scandir() path argument was absolute. The path attribute will be of the same type (str or bytes) as the scandir() path argument. Use fsdecode() to decode byte filenames.

os.DirEntry.name

name The entry’s base filename, relative to the scandir() path argument. The name attribute will be of the same type (str or bytes) as the scandir() path argument. Use fsdecode() to decode byte filenames.

os.DirEntry.is_symlink()

is_symlink() Return True if this entry is a symbolic link (even if broken); return False if the entry points to a directory or any kind of file, or if it doesn’t exist anymore. The result is cached on the DirEntry object. Call os.path.islink() to fetch up-to-date information. On the first, uncached call, no system call is required in most cases. Specifically, neither Windows or Unix require a system call, except on certain Unix file systems, such as network file systems, that return dirent.d

os.DirEntry.is_file()

is_file(*, follow_symlinks=True) Return True if this entry is a file or a symbolic link pointing to a file; return False if the entry is or points to a directory or other non-file entry, or if it doesn’t exist anymore. If follow_symlinks is False, return True only if this entry is a file (without following symlinks); return False if the entry is a directory or other non-file entry, or if it doesn’t exist anymore. The result is cached on the DirEntry object. Caching, system calls made, and ex