You are here : python_2 -> os

os

os.access() Use the real uid/gid to test for access to path.
os.chdir() Change the current working directory to path.
os.chflags() Set the flags of path to the numeric flags.
os.chmod() Change the mode of path to the numeric mode.
os.chown() Change the owner and group id of path to the numeric uid and gid.
os.chroot() Change the root directory of the current process to path.
os.close() Close file descriptor fd.
os.closerange() Close all file descriptors from fd_low (inclusive) to fd_high (exclusive), ignoring errors.
os.dup() Return a duplicate of file descriptor fd.
os.dup2() Duplicate file descriptor fd to fd2, closing the latter first if necessary.
os.fchdir() Change the current working directory to the directory represented by the file descriptor fd.
os.fchmod() Change the mode of the file given by fd to the numeric mode.
os.fchown() Change the owner and group id of the file given by fd to the numeric uid and gid.
os.fdatasync() Force write of file with filedescriptor fd to disk.
os.fdopen() Return an open file object connected to the file descriptor fd.
os.fpathconf() Return system configuration information relevant to an open file. name specifies the configuration value to retrieve.
os.fstat() Return status for file descriptor fd, like stat().
os.fstatvfs() Return information about the filesystem containing the file associated with file descriptor fd, like statvfs().
os.fsync() Force write of file with filedescriptor fd to disk.
os.ftruncate() Truncate the file corresponding to file descriptor fd, so that it is at most length bytes in size.
os.getcwd() Return a string representing the current working directory.
os.getcwdu() Return a Unicode object representing the current working directory.
os.isatty() Return True if the file descriptor fd is open and connected to a tty(-like) device, else False.
os.lchflags() Set the flags of path to the numeric flags, like chflags(), but do not follow symbolic links.
os.lchmod() Change the mode of path to the numeric mode.
os.lchown() Change the owner and group id of path to the numeric uid and gid. This function will not follow symbolic links.
os.link() Create a hard link pointing to src named dst.
os.listdir() Return a list containing the names of the entries in the directory given by path.
os.lseek() Set the current position of file descriptor fd to position pos, modified by how.
os.lstat() Like stat(), but do not follow symbolic links.
os.major() Extract the device major number from a raw device number.
os.makedev() Compose a raw device number from the major and minor device numbers.
os.makedirs() Recursive directory creation function.
os.minor() Extract the device minor number from a raw device number .
os.mkdir() Create a directory named path with numeric mode mode.
os.mkfifo() Create a FIFO (a named pipe) named path with numeric mode mode. The default mode is 0666 (octal).
os.mknod() Create a filesystem node (file, device special file or named pipe) named filename.
os.open() Open the file file and set various flags according to flags and possibly its mode according to mode.
os.openpty() Open a new pseudo-terminal pair. Return a pair of file descriptors (master, slave) for the pty and the tty, respectively.
os.pathconf() Return system configuration information relevant to a named file.
os.pipe() Create a pipe. Return a pair of file descriptors (r, w) usable for reading and writing, respectively.
os.popen() Open a pipe to or from command.
os.read() Read at most n bytes from file descriptor fd. Return a string containing the bytes read. If the end of the file referred to by fd has been reached, an empty string is returned.
os.readlink() Return a string representing the path to which the symbolic link points.
os.remove() Remove the file path.
os.removedirs() Remove directories recursively.
os.rename() Rename the file or directory src to dst.
os.renames() Recursive directory or file renaming function.
os.rmdir() Remove the directory path
os.stat() Perform a stat system call on the given path.
os.stat.float.times() Determine whether stat_result represents time stamps as float objects.
os.statvfs() Perform a statvfs system call on the given path.
os.symlink() Create a symbolic link pointing to src named dst.
os.tcgetpgrp() Return the process group associated with the terminal given by fd (an open file descriptor as returned by open()).
os.tcsetpgrp() Set the process group associated with the terminal given by fd (an open file descriptor as returned by open()) to pg.
os.tempnam() Return a unique path name that is reasonable for creating a temporary file.
os.tmpfile() Return a new file object opened in update mode (w+b).
os.tmpnam() Return a unique path name that is reasonable for creating a temporary file.
os.ttyname() Return a string which specifies the terminal device associated with file descriptor fd. If fd is not associated with a terminal device, an exception is raised.
os.unlink() Remove the file path.
os.utime() Set the access and modified times of the file specified by path.
os.walk() Generate the file names in a directory tree by walking the tree either top-down or bottom-up.
os.write() Write the string str to file descriptor fd. Return the number of bytes actually written.