os.read()

os.read(fd, n) Read at most n bytes from file descriptor fd. Return a bytestring containing the bytes read. If the end of the file referred to by fd has been reached, an empty bytes object is returned. Note This function is intended for low-level I/O and must be applied to a file descriptor as returned by os.open() or pipe(). To read a “file object” returned by the built-in function open() or by popen() or fdopen(), or sys.stdin, use its read() or readline() methods. Changed in version 3.

os.pwrite()

os.pwrite(fd, str, offset) Write bytestring to a file descriptor, fd, from offset, leaving the file offset unchanged. Availability: Unix. New in version 3.3.

os.putenv()

os.putenv(key, value) Set the environment variable named key to the string value. Such changes to the environment affect subprocesses started with os.system(), popen() or fork() and execv(). Availability: most flavors of Unix, Windows. Note On some platforms, including FreeBSD and Mac OS X, setting environ may cause memory leaks. Refer to the system documentation for putenv. When putenv() is supported, assignments to items in os.environ are automatically translated into corresponding calls

os.pread()

os.pread(fd, buffersize, offset) Read from a file descriptor, fd, at a position of offset. It will read up to buffersize number of bytes. The file offset remains unchanged. Availability: Unix. New in version 3.3.

os.posix_fallocate()

os.posix_fallocate(fd, offset, len) Ensures that enough disk space is allocated for the file specified by fd starting from offset and continuing for len bytes. Availability: Unix. New in version 3.3.

os.posix_fadvise()

os.posix_fadvise(fd, offset, len, advice) Announces an intention to access data in a specific pattern thus allowing the kernel to make optimizations. The advice applies to the region of the file specified by fd starting at offset and continuing for len bytes. advice is one of POSIX_FADV_NORMAL, POSIX_FADV_SEQUENTIAL, POSIX_FADV_RANDOM, POSIX_FADV_NOREUSE, POSIX_FADV_WILLNEED or POSIX_FADV_DONTNEED. Availability: Unix. New in version 3.3.

os.popen()

os.popen(cmd, mode='r', buffering=-1) Open a pipe to or from command cmd. The return value is an open file object connected to the pipe, which can be read or written depending on whether mode is 'r' (default) or 'w'. The buffering argument has the same meaning as the corresponding argument to the built-in open() function. The returned file object reads or writes text strings rather than bytes. The close method returns None if the subprocess exited successfully, or the subprocess’s return cod

os.plock()

os.plock(op) Lock program segments into memory. The value of op (defined in <sys/lock.h>) determines which segments are locked. Availability: Unix.

os.pipe2()

os.pipe2(flags) Create a pipe with flags set atomically. flags can be constructed by ORing together one or more of these values: O_NONBLOCK, O_CLOEXEC. Return a pair of file descriptors (r, w) usable for reading and writing, respectively. Availability: some flavors of Unix. New in version 3.3.

os.pipe()

os.pipe() Create a pipe. Return a pair of file descriptors (r, w) usable for reading and writing, respectively. The new file descriptor is non-inheritable. Availability: Unix, Windows. Changed in version 3.4: The new file descriptors are now non-inheritable.