<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module os</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>os</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/lib/python3.1/os.py">/usr/lib/python3.1/os.py</a><br><a href="http://docs.python.org/library/os">Module Docs</a></font></td></tr></table>
<p><tt>OS routines for Mac, NT, or Posix depending on what system we're on.<br>
<br>
This exports:<br>
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.<br>
- os.path is either posixpath or ntpath<br>
- os.name is either 'posix', 'nt', 'os2' or 'ce'.<br>
- os.curdir is a string representing the current directory ('.' or ':')<br>
- os.pardir is a string representing the parent directory ('..' or '::')<br>
- os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')<br>
- os.extsep is the extension separator (always '.')<br>
- os.altsep is the alternate pathname separator (None or '/')<br>
- os.pathsep is the component separator used in $PATH etc<br>
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')<br>
- os.defpath is the default search path for executables<br>
- os.devnull is the file path of the null device ('/dev/null', etc.)<br>
<br>
Programs that import and use 'os' stand a better chance of being<br>
portable between different platforms. Of course, they must then<br>
only use functions that are defined by all platforms (e.g., unlink<br>
and opendir), and leave all pathname manipulation to os.path<br>
(e.g., split and join).</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copyreg.html">copyreg</a><br>
</td><td width="25%" valign=top><a href="errno.html">errno</a><br>
</td><td width="25%" valign=top><a href="posixpath.html">posixpath</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>(<a href="builtins.html#Exception">builtins.Exception</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="builtins.html#OSError">builtins.OSError</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="posix.html#stat_result">posix.stat_result</a>
</font></dt><dt><font face="helvetica, arial"><a href="posix.html#statvfs_result">posix.statvfs_result</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><strong>error</strong> = <a name="error">class OSError</a>(<a href="builtins.html#EnvironmentError">EnvironmentError</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>OS system call failed.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="builtins.html#OSError">OSError</a></dd>
<dd><a href="builtins.html#EnvironmentError">EnvironmentError</a></dd>
<dd><a href="builtins.html#Exception">Exception</a></dd>
<dd><a href="builtins.html#BaseException">BaseException</a></dd>
<dd><a href="builtins.html#object">object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="OSError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x7f28d265efc0><dd><tt>T.<a href="#error-__new__">__new__</a>(S, ...) -> a new <a href="builtins.html#object">object</a> with type S, a subtype of T</tt></dl>
<hr>
Methods inherited from <a href="builtins.html#EnvironmentError">EnvironmentError</a>:<br>
<dl><dt><a name="OSError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
<dl><dt><a name="OSError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="builtins.html#EnvironmentError">EnvironmentError</a>:<br>
<dl><dt><strong>errno</strong></dt>
<dd><tt>exception errno</tt></dd>
</dl>
<dl><dt><strong>filename</strong></dt>
<dd><tt>exception filename</tt></dd>
</dl>
<dl><dt><strong>strerror</strong></dt>
<dd><tt>exception strerror</tt></dd>
</dl>
<hr>
Methods inherited from <a href="builtins.html#BaseException">BaseException</a>:<br>
<dl><dt><a name="OSError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
<dl><dt><a name="OSError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
<dl><dt><a name="OSError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
<dl><dt><a name="OSError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
<dl><dt><a name="OSError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
<dl><dt><a name="OSError-with_traceback"><strong>with_traceback</strong></a>(...)</dt><dd><tt>Exception.<a href="#error-with_traceback">with_traceback</a>(tb) --<br>
set self.<strong>__traceback__</strong> to tb and return self.</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="builtins.html#BaseException">BaseException</a>:<br>
<dl><dt><strong>__cause__</strong></dt>
<dd><tt>exception cause</tt></dd>
</dl>
<dl><dt><strong>__context__</strong></dt>
<dd><tt>exception context</tt></dd>
</dl>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>__traceback__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="stat_result">class <strong>stat_result</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#stat_result">stat_result</a>: Result from stat or lstat.<br>
<br>
This <a href="builtins.html#object">object</a> may be accessed either as a tuple of<br>
(mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)<br>
or via the attributes st_mode, st_ino, st_dev, st_nlink, st_uid, and so on.<br>
<br>
Posix/windows: If your platform supports st_blksize, st_blocks, st_rdev,<br>
or st_flags, they are available as attributes only.<br>
<br>
See os.stat for more information.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="stat_result-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
<dl><dt><a name="stat_result-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
<dl><dt><a name="stat_result-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
<dl><dt><a name="stat_result-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
<dl><dt><a name="stat_result-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
<dl><dt><a name="stat_result-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
<dl><dt><a name="stat_result-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
<dl><dt><a name="stat_result-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
<dl><dt><a name="stat_result-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
<dl><dt><a name="stat_result-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
<dl><dt><a name="stat_result-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
<dl><dt><a name="stat_result-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
<dl><dt><a name="stat_result-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
<dl><dt><a name="stat_result-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
<dl><dt><a name="stat_result-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#stat_result-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>st_atime</strong></dt>
<dd><tt>time of last access</tt></dd>
</dl>
<dl><dt><strong>st_blksize</strong></dt>
<dd><tt>blocksize for filesystem I/O</tt></dd>
</dl>
<dl><dt><strong>st_blocks</strong></dt>
<dd><tt>number of blocks allocated</tt></dd>
</dl>
<dl><dt><strong>st_ctime</strong></dt>
<dd><tt>time of last change</tt></dd>
</dl>
<dl><dt><strong>st_dev</strong></dt>
<dd><tt>device</tt></dd>
</dl>
<dl><dt><strong>st_gid</strong></dt>
<dd><tt>group ID of owner</tt></dd>
</dl>
<dl><dt><strong>st_ino</strong></dt>
<dd><tt>inode</tt></dd>
</dl>
<dl><dt><strong>st_mode</strong></dt>
<dd><tt>protection bits</tt></dd>
</dl>
<dl><dt><strong>st_mtime</strong></dt>
<dd><tt>time of last modification</tt></dd>
</dl>
<dl><dt><strong>st_nlink</strong></dt>
<dd><tt>number of hard links</tt></dd>
</dl>
<dl><dt><strong>st_rdev</strong></dt>
<dd><tt>device type (if inode device)</tt></dd>
</dl>
<dl><dt><strong>st_size</strong></dt>
<dd><tt>total size, in bytes</tt></dd>
</dl>
<dl><dt><strong>st_uid</strong></dt>
<dd><tt>user ID of owner</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x7f28d26b2840><dd><tt>T.<a href="#stat_result-__new__">__new__</a>(S, ...) -> a new <a href="builtins.html#object">object</a> with type S, a subtype of T</tt></dl>
<dl><dt><strong>n_fields</strong> = 16</dl>
<dl><dt><strong>n_sequence_fields</strong> = 10</dl>
<dl><dt><strong>n_unnamed_fields</strong> = 3</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="statvfs_result">class <strong>statvfs_result</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#statvfs_result">statvfs_result</a>: Result from statvfs or fstatvfs.<br>
<br>
This <a href="builtins.html#object">object</a> may be accessed either as a tuple of<br>
(bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),<br>
or via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.<br>
<br>
See os.statvfs for more information.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="statvfs_result-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
<dl><dt><a name="statvfs_result-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
<dl><dt><a name="statvfs_result-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
<dl><dt><a name="statvfs_result-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
<dl><dt><a name="statvfs_result-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
<dl><dt><a name="statvfs_result-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
<dl><dt><a name="statvfs_result-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
<dl><dt><a name="statvfs_result-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
<dl><dt><a name="statvfs_result-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
<dl><dt><a name="statvfs_result-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
<dl><dt><a name="statvfs_result-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
<dl><dt><a name="statvfs_result-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
<dl><dt><a name="statvfs_result-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
<dl><dt><a name="statvfs_result-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
<dl><dt><a name="statvfs_result-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#statvfs_result-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>f_bavail</strong></dt>
</dl>
<dl><dt><strong>f_bfree</strong></dt>
</dl>
<dl><dt><strong>f_blocks</strong></dt>
</dl>
<dl><dt><strong>f_bsize</strong></dt>
</dl>
<dl><dt><strong>f_favail</strong></dt>
</dl>
<dl><dt><strong>f_ffree</strong></dt>
</dl>
<dl><dt><strong>f_files</strong></dt>
</dl>
<dl><dt><strong>f_flag</strong></dt>
</dl>
<dl><dt><strong>f_frsize</strong></dt>
</dl>
<dl><dt><strong>f_namemax</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x7f28d26b29e0><dd><tt>T.<a href="#statvfs_result-__new__">__new__</a>(S, ...) -> a new <a href="builtins.html#object">object</a> with type S, a subtype of T</tt></dl>
<dl><dt><strong>n_fields</strong> = 10</dl>
<dl><dt><strong>n_sequence_fields</strong> = 10</dl>
<dl><dt><strong>n_unnamed_fields</strong> = 0</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-WCOREDUMP"><strong>WCOREDUMP</strong></a>(...)</dt><dd><tt><a href="#-WCOREDUMP">WCOREDUMP</a>(status) -> bool<br>
<br>
Return True if the process returning 'status' was dumped to a core file.</tt></dd></dl>
<dl><dt><a name="-WEXITSTATUS"><strong>WEXITSTATUS</strong></a>(...)</dt><dd><tt><a href="#-WEXITSTATUS">WEXITSTATUS</a>(status) -> integer<br>
<br>
Return the process return code from 'status'.</tt></dd></dl>
<dl><dt><a name="-WIFCONTINUED"><strong>WIFCONTINUED</strong></a>(...)</dt><dd><tt><a href="#-WIFCONTINUED">WIFCONTINUED</a>(status) -> bool<br>
<br>
Return True if the process returning 'status' was continued from a<br>
job control stop.</tt></dd></dl>
<dl><dt><a name="-WIFEXITED"><strong>WIFEXITED</strong></a>(...)</dt><dd><tt><a href="#-WIFEXITED">WIFEXITED</a>(status) -> bool<br>
<br>
Return true if the process returning 'status' exited using the exit()<br>
system call.</tt></dd></dl>
<dl><dt><a name="-WIFSIGNALED"><strong>WIFSIGNALED</strong></a>(...)</dt><dd><tt><a href="#-WIFSIGNALED">WIFSIGNALED</a>(status) -> bool<br>
<br>
Return True if the process returning 'status' was terminated by a signal.</tt></dd></dl>
<dl><dt><a name="-WIFSTOPPED"><strong>WIFSTOPPED</strong></a>(...)</dt><dd><tt><a href="#-WIFSTOPPED">WIFSTOPPED</a>(status) -> bool<br>
<br>
Return True if the process returning 'status' was stopped.</tt></dd></dl>
<dl><dt><a name="-WSTOPSIG"><strong>WSTOPSIG</strong></a>(...)</dt><dd><tt><a href="#-WSTOPSIG">WSTOPSIG</a>(status) -> integer<br>
<br>
Return the signal that stopped the process that provided<br>
the 'status' value.</tt></dd></dl>
<dl><dt><a name="-WTERMSIG"><strong>WTERMSIG</strong></a>(...)</dt><dd><tt><a href="#-WTERMSIG">WTERMSIG</a>(status) -> integer<br>
<br>
Return the signal that terminated the process that provided the 'status'<br>
value.</tt></dd></dl>
<dl><dt><a name="-abort"><strong>abort</strong></a>(...)</dt><dd><tt><a href="#-abort">abort</a>() -> does not return!<br>
<br>
Abort the interpreter immediately. This 'dumps core' or otherwise fails<br>
in the hardest way possible on the hosting operating system.</tt></dd></dl>
<dl><dt><a name="-access"><strong>access</strong></a>(...)</dt><dd><tt><a href="#-access">access</a>(path, mode) -> True if granted, False otherwise<br>
<br>
Use the real uid/gid to test for access to a path. Note that most<br>
operations will use the effective uid/gid, therefore this routine can<br>
be used in a suid/sgid environment to test if the invoking user has the<br>
specified access to the path. The mode argument can be F_OK to test<br>
existence, or the inclusive-OR of R_OK, W_OK, and X_OK.</tt></dd></dl>
<dl><dt><a name="-chdir"><strong>chdir</strong></a>(...)</dt><dd><tt><a href="#-chdir">chdir</a>(path)<br>
<br>
Change the current working directory to the specified path.</tt></dd></dl>
<dl><dt><a name="-chmod"><strong>chmod</strong></a>(...)</dt><dd><tt><a href="#-chmod">chmod</a>(path, mode)<br>
<br>
Change the access permissions of a file.</tt></dd></dl>
<dl><dt><a name="-chown"><strong>chown</strong></a>(...)</dt><dd><tt><a href="#-chown">chown</a>(path, uid, gid)<br>
<br>
Change the owner and group id of path to the numeric uid and gid.</tt></dd></dl>
<dl><dt><a name="-chroot"><strong>chroot</strong></a>(...)</dt><dd><tt><a href="#-chroot">chroot</a>(path)<br>
<br>
Change root directory to path.</tt></dd></dl>
<dl><dt><a name="-close"><strong>close</strong></a>(...)</dt><dd><tt><a href="#-close">close</a>(fd)<br>
<br>
Close a file descriptor (for low level IO).</tt></dd></dl>
<dl><dt><a name="-closerange"><strong>closerange</strong></a>(...)</dt><dd><tt><a href="#-closerange">closerange</a>(fd_low, fd_high)<br>
<br>
Closes all file descriptors in [fd_low, fd_high), ignoring errors.</tt></dd></dl>
<dl><dt><a name="-confstr"><strong>confstr</strong></a>(...)</dt><dd><tt><a href="#-confstr">confstr</a>(name) -> string<br>
<br>
Return a string-valued system configuration variable.</tt></dd></dl>
<dl><dt><a name="-ctermid"><strong>ctermid</strong></a>(...)</dt><dd><tt><a href="#-ctermid">ctermid</a>() -> string<br>
<br>
Return the name of the controlling terminal for this process.</tt></dd></dl>
<dl><dt><a name="-device_encoding"><strong>device_encoding</strong></a>(...)</dt><dd><tt><a href="#-device_encoding">device_encoding</a>(fd) -> str<br>
<br>
Return a string describing the encoding of the device<br>
if the output is a terminal; else return None.</tt></dd></dl>
<dl><dt><a name="-dup"><strong>dup</strong></a>(...)</dt><dd><tt><a href="#-dup">dup</a>(fd) -> fd2<br>
<br>
Return a duplicate of a file descriptor.</tt></dd></dl>
<dl><dt><a name="-dup2"><strong>dup2</strong></a>(...)</dt><dd><tt><a href="#-dup2">dup2</a>(old_fd, new_fd)<br>
<br>
Duplicate file descriptor.</tt></dd></dl>
<dl><dt><a name="-execl"><strong>execl</strong></a>(file, *args)</dt><dd><tt><a href="#-execl">execl</a>(file, *args)<br>
<br>
Execute the executable file with argument list args, replacing the<br>
current process.</tt></dd></dl>
<dl><dt><a name="-execle"><strong>execle</strong></a>(file, *args)</dt><dd><tt><a href="#-execle">execle</a>(file, *args, env)<br>
<br>
Execute the executable file with argument list args and<br>
environment env, replacing the current process.</tt></dd></dl>
<dl><dt><a name="-execlp"><strong>execlp</strong></a>(file, *args)</dt><dd><tt><a href="#-execlp">execlp</a>(file, *args)<br>
<br>
Execute the executable file (which is searched for along $PATH)<br>
with argument list args, replacing the current process.</tt></dd></dl>
<dl><dt><a name="-execlpe"><strong>execlpe</strong></a>(file, *args)</dt><dd><tt><a href="#-execlpe">execlpe</a>(file, *args, env)<br>
<br>
Execute the executable file (which is searched for along $PATH)<br>
with argument list args and environment env, replacing the current<br>
process.</tt></dd></dl>
<dl><dt><a name="-execv"><strong>execv</strong></a>(...)</dt><dd><tt><a href="#-execv">execv</a>(path, args)<br>
<br>
Execute an executable path with arguments, replacing current process.<br>
<br>
path: path of executable file<br>
args: tuple or list of strings</tt></dd></dl>
<dl><dt><a name="-execve"><strong>execve</strong></a>(...)</dt><dd><tt><a href="#-execve">execve</a>(path, args, env)<br>
<br>
Execute a path with arguments and environment, replacing current process.<br>
<br>
path: path of executable file<br>
args: tuple or list of arguments<br>
env: dictionary of strings mapping to strings</tt></dd></dl>
<dl><dt><a name="-execvp"><strong>execvp</strong></a>(file, args)</dt><dd><tt>execp(file, args)<br>
<br>
Execute the executable file (which is searched for along $PATH)<br>
with argument list args, replacing the current process.<br>
args may be a list or tuple of strings.</tt></dd></dl>
<dl><dt><a name="-execvpe"><strong>execvpe</strong></a>(file, args, env)</dt><dd><tt><a href="#-execvpe">execvpe</a>(file, args, env)<br>
<br>
Execute the executable file (which is searched for along $PATH)<br>
with argument list args and environment env , replacing the<br>
current process.<br>
args may be a list or tuple of strings.</tt></dd></dl>
<dl><dt><a name="-fchdir"><strong>fchdir</strong></a>(...)</dt><dd><tt><a href="#-fchdir">fchdir</a>(fildes)<br>
<br>
Change to the directory of the given file descriptor. fildes must be<br>
opened on a directory, not a file.</tt></dd></dl>
<dl><dt><a name="-fchmod"><strong>fchmod</strong></a>(...)</dt><dd><tt><a href="#-fchmod">fchmod</a>(fd, mode)<br>
<br>
Change the access permissions of the file given by file<br>
descriptor fd.</tt></dd></dl>
<dl><dt><a name="-fchown"><strong>fchown</strong></a>(...)</dt><dd><tt><a href="#-fchown">fchown</a>(fd, uid, gid)<br>
<br>
Change the owner and group id of the file given by file descriptor<br>
fd to the numeric uid and gid.</tt></dd></dl>
<dl><dt><a name="-fdatasync"><strong>fdatasync</strong></a>(...)</dt><dd><tt><a href="#-fdatasync">fdatasync</a>(fildes)<br>
<br>
force write of file with filedescriptor to disk.<br>
does not force update of metadata.</tt></dd></dl>
<dl><dt><a name="-fork"><strong>fork</strong></a>(...)</dt><dd><tt><a href="#-fork">fork</a>() -> pid<br>
<br>
Fork a child process.<br>
Return 0 to child process and PID of child to parent process.</tt></dd></dl>
<dl><dt><a name="-forkpty"><strong>forkpty</strong></a>(...)</dt><dd><tt><a href="#-forkpty">forkpty</a>() -> (pid, master_fd)<br>
<br>
Fork a new process with a new pseudo-terminal as controlling tty.<br>
<br>
Like <a href="#-fork">fork</a>(), return 0 as pid to child process, and PID of child to parent.<br>
To both, return fd of newly opened pseudo-terminal.</tt></dd></dl>
<dl><dt><a name="-fpathconf"><strong>fpathconf</strong></a>(...)</dt><dd><tt><a href="#-fpathconf">fpathconf</a>(fd, name) -> integer<br>
<br>
Return the configuration limit name for the file descriptor fd.<br>
If there is no limit, return -1.</tt></dd></dl>
<dl><dt><a name="-fstat"><strong>fstat</strong></a>(...)</dt><dd><tt><a href="#-fstat">fstat</a>(fd) -> stat result<br>
<br>
Like <a href="#-stat">stat</a>(), but for an open file descriptor.</tt></dd></dl>
<dl><dt><a name="-fstatvfs"><strong>fstatvfs</strong></a>(...)</dt><dd><tt><a href="#-fstatvfs">fstatvfs</a>(fd) -> statvfs result<br>
<br>
Perform an fstatvfs system call on the given fd.</tt></dd></dl>
<dl><dt><a name="-fsync"><strong>fsync</strong></a>(...)</dt><dd><tt><a href="#-fsync">fsync</a>(fildes)<br>
<br>
force write of file with filedescriptor to disk.</tt></dd></dl>
<dl><dt><a name="-ftruncate"><strong>ftruncate</strong></a>(...)</dt><dd><tt><a href="#-ftruncate">ftruncate</a>(fd, length)<br>
<br>
Truncate a file to a specified length.</tt></dd></dl>
<dl><dt><a name="-getcwd"><strong>getcwd</strong></a>(...)</dt><dd><tt><a href="#-getcwd">getcwd</a>() -> path<br>
<br>
Return a unicode string representing the current working directory.</tt></dd></dl>
<dl><dt><a name="-getcwdb"><strong>getcwdb</strong></a>(...)</dt><dd><tt><a href="#-getcwdb">getcwdb</a>() -> path<br>
<br>
Return a bytes string representing the current working directory.</tt></dd></dl>
<dl><dt><a name="-getegid"><strong>getegid</strong></a>(...)</dt><dd><tt><a href="#-getegid">getegid</a>() -> egid<br>
<br>
Return the current process's effective group id.</tt></dd></dl>
<dl><dt><a name="-getenv"><strong>getenv</strong></a>(key, default<font color="#909090">=None</font>)</dt><dd><tt>Get an environment variable, return None if it doesn't exist.<br>
The optional second argument can specify an alternate default.</tt></dd></dl>
<dl><dt><a name="-geteuid"><strong>geteuid</strong></a>(...)</dt><dd><tt><a href="#-geteuid">geteuid</a>() -> euid<br>
<br>
Return the current process's effective user id.</tt></dd></dl>
<dl><dt><a name="-getgid"><strong>getgid</strong></a>(...)</dt><dd><tt><a href="#-getgid">getgid</a>() -> gid<br>
<br>
Return the current process's group id.</tt></dd></dl>
<dl><dt><a name="-getgroups"><strong>getgroups</strong></a>(...)</dt><dd><tt><a href="#-getgroups">getgroups</a>() -> list of group IDs<br>
<br>
Return list of supplemental group IDs for the process.</tt></dd></dl>
<dl><dt><a name="-getloadavg"><strong>getloadavg</strong></a>(...)</dt><dd><tt><a href="#-getloadavg">getloadavg</a>() -> (float, float, float)<br>
<br>
Return the number of processes in the system run queue averaged over<br>
the last 1, 5, and 15 minutes or raises OSError if the load average<br>
was unobtainable</tt></dd></dl>
<dl><dt><a name="-getlogin"><strong>getlogin</strong></a>(...)</dt><dd><tt><a href="#-getlogin">getlogin</a>() -> string<br>
<br>
Return the actual login name.</tt></dd></dl>
<dl><dt><a name="-getpgid"><strong>getpgid</strong></a>(...)</dt><dd><tt><a href="#-getpgid">getpgid</a>(pid) -> pgid<br>
<br>
Call the system call <a href="#-getpgid">getpgid</a>().</tt></dd></dl>
<dl><dt><a name="-getpgrp"><strong>getpgrp</strong></a>(...)</dt><dd><tt><a href="#-getpgrp">getpgrp</a>() -> pgrp<br>
<br>
Return the current process group id.</tt></dd></dl>
<dl><dt><a name="-getpid"><strong>getpid</strong></a>(...)</dt><dd><tt><a href="#-getpid">getpid</a>() -> pid<br>
<br>
Return the current process id</tt></dd></dl>
<dl><dt><a name="-getppid"><strong>getppid</strong></a>(...)</dt><dd><tt><a href="#-getppid">getppid</a>() -> ppid<br>
<br>
Return the parent's process id.</tt></dd></dl>
<dl><dt><a name="-getsid"><strong>getsid</strong></a>(...)</dt><dd><tt><a href="#-getsid">getsid</a>(pid) -> sid<br>
<br>
Call the system call <a href="#-getsid">getsid</a>().</tt></dd></dl>
<dl><dt><a name="-getuid"><strong>getuid</strong></a>(...)</dt><dd><tt><a href="#-getuid">getuid</a>() -> uid<br>
<br>
Return the current process's user id.</tt></dd></dl>
<dl><dt><a name="-isatty"><strong>isatty</strong></a>(...)</dt><dd><tt><a href="#-isatty">isatty</a>(fd) -> bool<br>
<br>
Return True if the file descriptor 'fd' is an open file descriptor<br>
connected to the slave end of a terminal.</tt></dd></dl>
<dl><dt><a name="-kill"><strong>kill</strong></a>(...)</dt><dd><tt><a href="#-kill">kill</a>(pid, sig)<br>
<br>
Kill a process with a signal.</tt></dd></dl>
<dl><dt><a name="-killpg"><strong>killpg</strong></a>(...)</dt><dd><tt><a href="#-killpg">killpg</a>(pgid, sig)<br>
<br>
Kill a process group with a signal.</tt></dd></dl>
<dl><dt><a name="-lchown"><strong>lchown</strong></a>(...)</dt><dd><tt><a href="#-lchown">lchown</a>(path, uid, gid)<br>
<br>
Change the owner and group id of path to the numeric uid and gid.<br>
This function will not follow symbolic links.</tt></dd></dl>
<dl><dt><a name="-link"><strong>link</strong></a>(...)</dt><dd><tt><a href="#-link">link</a>(src, dst)<br>
<br>
Create a hard link to a file.</tt></dd></dl>
<dl><dt><a name="-listdir"><strong>listdir</strong></a>(...)</dt><dd><tt><a href="#-listdir">listdir</a>(path) -> list_of_strings<br>
<br>
Return a list containing the names of the entries in the directory.<br>
<br>
path: path of directory to list<br>
<br>
The list is in arbitrary order. It does not include the special<br>
entries '.' and '..' even if they are present in the directory.</tt></dd></dl>
<dl><dt><a name="-lseek"><strong>lseek</strong></a>(...)</dt><dd><tt><a href="#-lseek">lseek</a>(fd, pos, how) -> newpos<br>
<br>
Set the current position of a file descriptor.</tt></dd></dl>
<dl><dt><a name="-lstat"><strong>lstat</strong></a>(...)</dt><dd><tt><a href="#-lstat">lstat</a>(path) -> stat result<br>
<br>
Like <a href="#-stat">stat</a>(path), but do not follow symbolic links.</tt></dd></dl>
<dl><dt><a name="-major"><strong>major</strong></a>(...)</dt><dd><tt><a href="#-major">major</a>(device) -> major number<br>
Extracts a device major number from a raw device number.</tt></dd></dl>
<dl><dt><a name="-makedev"><strong>makedev</strong></a>(...)</dt><dd><tt><a href="#-makedev">makedev</a>(major, minor) -> device number<br>
Composes a raw device number from the major and minor device numbers.</tt></dd></dl>
<dl><dt><a name="-makedirs"><strong>makedirs</strong></a>(name, mode<font color="#909090">=511</font>)</dt><dd><tt><a href="#-makedirs">makedirs</a>(path [, mode=0o777])<br>
<br>
Super-mkdir; create a leaf directory and all intermediate ones.<br>
Works like mkdir, except that any intermediate path segment (not<br>
just the rightmost) will be created if it does not exist. This is<br>
recursive.</tt></dd></dl>
<dl><dt><a name="-minor"><strong>minor</strong></a>(...)</dt><dd><tt><a href="#-minor">minor</a>(device) -> minor number<br>
Extracts a device minor number from a raw device number.</tt></dd></dl>
<dl><dt><a name="-mkdir"><strong>mkdir</strong></a>(...)</dt><dd><tt><a href="#-mkdir">mkdir</a>(path [, mode=0777])<br>
<br>
Create a directory.</tt></dd></dl>
<dl><dt><a name="-mkfifo"><strong>mkfifo</strong></a>(...)</dt><dd><tt><a href="#-mkfifo">mkfifo</a>(filename [, mode=0666])<br>
<br>
Create a FIFO (a POSIX named pipe).</tt></dd></dl>
<dl><dt><a name="-mknod"><strong>mknod</strong></a>(...)</dt><dd><tt><a href="#-mknod">mknod</a>(filename [, mode=0600, device])<br>
<br>
Create a filesystem node (file, device special file or named pipe)<br>
named filename. mode specifies both the permissions to use and the<br>
type of node to be created, being combined (bitwise OR) with one of<br>
S_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO. For S_IFCHR and S_IFBLK,<br>
device defines the newly created device special file (probably using<br>
os.<a href="#-makedev">makedev</a>()), otherwise it is ignored.</tt></dd></dl>
<dl><dt><a name="-nice"><strong>nice</strong></a>(...)</dt><dd><tt><a href="#-nice">nice</a>(inc) -> new_priority<br>
<br>
Decrease the priority of process by inc and return the new priority.</tt></dd></dl>
<dl><dt><a name="-open"><strong>open</strong></a>(...)</dt><dd><tt><a href="#-open">open</a>(filename, flag [, mode=0777]) -> fd<br>
<br>
Open a file (for low level IO).</tt></dd></dl>
<dl><dt><a name="-openpty"><strong>openpty</strong></a>(...)</dt><dd><tt><a href="#-openpty">openpty</a>() -> (master_fd, slave_fd)<br>
<br>
Open a pseudo-terminal, returning open fd's for both master and slave end.</tt></dd></dl>
<dl><dt><a name="-pathconf"><strong>pathconf</strong></a>(...)</dt><dd><tt><a href="#-pathconf">pathconf</a>(path, name) -> integer<br>
<br>
Return the configuration limit name for the file or directory path.<br>
If there is no limit, return -1.</tt></dd></dl>
<dl><dt><a name="-pipe"><strong>pipe</strong></a>(...)</dt><dd><tt><a href="#-pipe">pipe</a>() -> (read_end, write_end)<br>
<br>
Create a pipe.</tt></dd></dl>
<dl><dt><a name="-putenv"><strong>putenv</strong></a>(...)</dt><dd><tt><a href="#-putenv">putenv</a>(key, value)<br>
<br>
Change or add an environment variable.</tt></dd></dl>
<dl><dt><a name="-read"><strong>read</strong></a>(...)</dt><dd><tt><a href="#-read">read</a>(fd, buffersize) -> string<br>
<br>
Read a file descriptor.</tt></dd></dl>
<dl><dt><a name="-readlink"><strong>readlink</strong></a>(...)</dt><dd><tt><a href="#-readlink">readlink</a>(path) -> path<br>
<br>
Return a string representing the path to which the symbolic link points.</tt></dd></dl>
<dl><dt><a name="-remove"><strong>remove</strong></a>(...)</dt><dd><tt><a href="#-remove">remove</a>(path)<br>
<br>
Remove a file (same as <a href="#-unlink">unlink</a>(path)).</tt></dd></dl>
<dl><dt><a name="-removedirs"><strong>removedirs</strong></a>(name)</dt><dd><tt><a href="#-removedirs">removedirs</a>(path)<br>
<br>
Super-rmdir; remove a leaf directory and all empty intermediate<br>
ones. Works like rmdir except that, if the leaf directory is<br>
successfully removed, directories corresponding to rightmost path<br>
segments will be pruned away until either the whole path is<br>
consumed or an <a href="#error">error</a> occurs. Errors during this latter phase are<br>
ignored -- they generally mean that a directory was not empty.</tt></dd></dl>
<dl><dt><a name="-rename"><strong>rename</strong></a>(...)</dt><dd><tt><a href="#-rename">rename</a>(old, new)<br>
<br>
Rename a file or directory.</tt></dd></dl>
<dl><dt><a name="-renames"><strong>renames</strong></a>(old, new)</dt><dd><tt><a href="#-renames">renames</a>(old, new)<br>
<br>
Super-rename; create directories as necessary and delete any left<br>
empty. Works like rename, except creation of any intermediate<br>
directories needed to make the new pathname good is attempted<br>
first. After the rename, directories corresponding to rightmost<br>
path segments of the old name will be pruned way until either the<br>
whole path is consumed or a nonempty directory is found.<br>
<br>
Note: this function can fail with the new directory structure made<br>
if you lack permissions needed to unlink the leaf directory or<br>
file.</tt></dd></dl>
<dl><dt><a name="-rmdir"><strong>rmdir</strong></a>(...)</dt><dd><tt><a href="#-rmdir">rmdir</a>(path)<br>
<br>
Remove a directory.</tt></dd></dl>
<dl><dt><a name="-setegid"><strong>setegid</strong></a>(...)</dt><dd><tt><a href="#-setegid">setegid</a>(gid)<br>
<br>
Set the current process's effective group id.</tt></dd></dl>
<dl><dt><a name="-seteuid"><strong>seteuid</strong></a>(...)</dt><dd><tt><a href="#-seteuid">seteuid</a>(uid)<br>
<br>
Set the current process's effective user id.</tt></dd></dl>
<dl><dt><a name="-setgid"><strong>setgid</strong></a>(...)</dt><dd><tt><a href="#-setgid">setgid</a>(gid)<br>
<br>
Set the current process's group id.</tt></dd></dl>
<dl><dt><a name="-setgroups"><strong>setgroups</strong></a>(...)</dt><dd><tt><a href="#-setgroups">setgroups</a>(list)<br>
<br>
Set the groups of the current process to list.</tt></dd></dl>
<dl><dt><a name="-setpgid"><strong>setpgid</strong></a>(...)</dt><dd><tt><a href="#-setpgid">setpgid</a>(pid, pgrp)<br>
<br>
Call the system call <a href="#-setpgid">setpgid</a>().</tt></dd></dl>
<dl><dt><a name="-setpgrp"><strong>setpgrp</strong></a>(...)</dt><dd><tt><a href="#-setpgrp">setpgrp</a>()<br>
<br>
Make this process a session leader.</tt></dd></dl>
<dl><dt><a name="-setregid"><strong>setregid</strong></a>(...)</dt><dd><tt><a href="#-setregid">setregid</a>(rgid, egid)<br>
<br>
Set the current process's real and effective group ids.</tt></dd></dl>
<dl><dt><a name="-setreuid"><strong>setreuid</strong></a>(...)</dt><dd><tt><a href="#-setreuid">setreuid</a>(ruid, euid)<br>
<br>
Set the current process's real and effective user ids.</tt></dd></dl>
<dl><dt><a name="-setsid"><strong>setsid</strong></a>(...)</dt><dd><tt><a href="#-setsid">setsid</a>()<br>
<br>
Call the system call <a href="#-setsid">setsid</a>().</tt></dd></dl>
<dl><dt><a name="-setuid"><strong>setuid</strong></a>(...)</dt><dd><tt><a href="#-setuid">setuid</a>(uid)<br>
<br>
Set the current process's user id.</tt></dd></dl>
<dl><dt><a name="-spawnl"><strong>spawnl</strong></a>(mode, file, *args)</dt><dd><tt><a href="#-spawnl">spawnl</a>(mode, file, *args) -> integer<br>
<br>
Execute file with arguments from args in a subprocess.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-spawnle"><strong>spawnle</strong></a>(mode, file, *args)</dt><dd><tt><a href="#-spawnle">spawnle</a>(mode, file, *args, env) -> integer<br>
<br>
Execute file with arguments from args in a subprocess with the<br>
supplied environment.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-spawnlp"><strong>spawnlp</strong></a>(mode, file, *args)</dt><dd><tt><a href="#-spawnlp">spawnlp</a>(mode, file, *args) -> integer<br>
<br>
Execute file (which is looked for along $PATH) with arguments from<br>
args in a subprocess with the supplied environment.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-spawnlpe"><strong>spawnlpe</strong></a>(mode, file, *args)</dt><dd><tt><a href="#-spawnlpe">spawnlpe</a>(mode, file, *args, env) -> integer<br>
<br>
Execute file (which is looked for along $PATH) with arguments from<br>
args in a subprocess with the supplied environment.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-spawnv"><strong>spawnv</strong></a>(mode, file, args)</dt><dd><tt><a href="#-spawnv">spawnv</a>(mode, file, args) -> integer<br>
<br>
Execute file with arguments from args in a subprocess.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-spawnve"><strong>spawnve</strong></a>(mode, file, args, env)</dt><dd><tt><a href="#-spawnve">spawnve</a>(mode, file, args, env) -> integer<br>
<br>
Execute file with arguments from args in a subprocess with the<br>
specified environment.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-spawnvp"><strong>spawnvp</strong></a>(mode, file, args)</dt><dd><tt><a href="#-spawnvp">spawnvp</a>(mode, file, args) -> integer<br>
<br>
Execute file (which is looked for along $PATH) with arguments from<br>
args in a subprocess.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-spawnvpe"><strong>spawnvpe</strong></a>(mode, file, args, env)</dt><dd><tt><a href="#-spawnvpe">spawnvpe</a>(mode, file, args, env) -> integer<br>
<br>
Execute file (which is looked for along $PATH) with arguments from<br>
args in a subprocess with the supplied environment.<br>
If mode == P_NOWAIT return the pid of the process.<br>
If mode == P_WAIT return the process's exit code if it exits normally;<br>
otherwise return -SIG, where SIG is the signal that killed it.</tt></dd></dl>
<dl><dt><a name="-stat"><strong>stat</strong></a>(...)</dt><dd><tt><a href="#-stat">stat</a>(path) -> stat result<br>
<br>
Perform a stat system call on the given path.</tt></dd></dl>
<dl><dt><a name="-stat_float_times"><strong>stat_float_times</strong></a>(...)</dt><dd><tt><a href="#-stat_float_times">stat_float_times</a>([newval]) -> oldval<br>
<br>
Determine whether os.[lf]stat represents time stamps as float objects.<br>
If newval is True, future calls to <a href="#-stat">stat</a>() return floats, if it is False,<br>
future calls return ints. <br>
If newval is omitted, return the current setting.</tt></dd></dl>
<dl><dt><a name="-statvfs"><strong>statvfs</strong></a>(...)</dt><dd><tt><a href="#-statvfs">statvfs</a>(path) -> statvfs result<br>
<br>
Perform a statvfs system call on the given path.</tt></dd></dl>
<dl><dt><a name="-strerror"><strong>strerror</strong></a>(...)</dt><dd><tt><a href="#-strerror">strerror</a>(code) -> string<br>
<br>
Translate an <a href="#error">error</a> code to a message string.</tt></dd></dl>
<dl><dt><a name="-symlink"><strong>symlink</strong></a>(...)</dt><dd><tt><a href="#-symlink">symlink</a>(src, dst)<br>
<br>
Create a symbolic link pointing to src named dst.</tt></dd></dl>
<dl><dt><a name="-sysconf"><strong>sysconf</strong></a>(...)</dt><dd><tt><a href="#-sysconf">sysconf</a>(name) -> integer<br>
<br>
Return an integer-valued system configuration variable.</tt></dd></dl>
<dl><dt><a name="-system"><strong>system</strong></a>(...)</dt><dd><tt><a href="#-system">system</a>(command) -> exit_status<br>
<br>
Execute the command (a string) in a subshell.</tt></dd></dl>
<dl><dt><a name="-tcgetpgrp"><strong>tcgetpgrp</strong></a>(...)</dt><dd><tt><a href="#-tcgetpgrp">tcgetpgrp</a>(fd) -> pgid<br>
<br>
Return the process group associated with the terminal given by a fd.</tt></dd></dl>
<dl><dt><a name="-tcsetpgrp"><strong>tcsetpgrp</strong></a>(...)</dt><dd><tt><a href="#-tcsetpgrp">tcsetpgrp</a>(fd, pgid)<br>
<br>
Set the process group associated with the terminal given by a fd.</tt></dd></dl>
<dl><dt><a name="-times"><strong>times</strong></a>(...)</dt><dd><tt><a href="#-times">times</a>() -> (utime, stime, cutime, cstime, elapsed_time)<br>
<br>
Return a tuple of floating point numbers indicating process times.</tt></dd></dl>
<dl><dt><a name="-ttyname"><strong>ttyname</strong></a>(...)</dt><dd><tt><a href="#-ttyname">ttyname</a>(fd) -> string<br>
<br>
Return the name of the terminal device connected to 'fd'.</tt></dd></dl>
<dl><dt><a name="-umask"><strong>umask</strong></a>(...)</dt><dd><tt><a href="#-umask">umask</a>(new_mask) -> old_mask<br>
<br>
Set the current numeric umask and return the previous umask.</tt></dd></dl>
<dl><dt><a name="-uname"><strong>uname</strong></a>(...)</dt><dd><tt><a href="#-uname">uname</a>() -> (sysname, nodename, release, version, machine)<br>
<br>
Return a tuple identifying the current operating system.</tt></dd></dl>
<dl><dt><a name="-unlink"><strong>unlink</strong></a>(...)</dt><dd><tt><a href="#-unlink">unlink</a>(path)<br>
<br>
Remove a file (same as <a href="#-remove">remove</a>(path)).</tt></dd></dl>
<dl><dt><a name="-unsetenv"><strong>unsetenv</strong></a>(...)</dt><dd><tt><a href="#-unsetenv">unsetenv</a>(key)<br>
<br>
Delete an environment variable.</tt></dd></dl>
<dl><dt><a name="-utime"><strong>utime</strong></a>(...)</dt><dd><tt><a href="#-utime">utime</a>(path, (atime, mtime))<br>
<a href="#-utime">utime</a>(path, None)<br>
<br>
Set the access and modified time of the file to the given values. If the<br>
second form is used, set the access and modified times to the current time.</tt></dd></dl>
<dl><dt><a name="-wait"><strong>wait</strong></a>(...)</dt><dd><tt><a href="#-wait">wait</a>() -> (pid, status)<br>
<br>
Wait for completion of a child process.</tt></dd></dl>
<dl><dt><a name="-wait3"><strong>wait3</strong></a>(...)</dt><dd><tt><a href="#-wait3">wait3</a>(options) -> (pid, status, rusage)<br>
<br>
Wait for completion of a child process.</tt></dd></dl>
<dl><dt><a name="-wait4"><strong>wait4</strong></a>(...)</dt><dd><tt><a href="#-wait4">wait4</a>(pid, options) -> (pid, status, rusage)<br>
<br>
Wait for completion of a given child process.</tt></dd></dl>
<dl><dt><a name="-waitpid"><strong>waitpid</strong></a>(...)</dt><dd><tt><a href="#-waitpid">waitpid</a>(pid, options) -> (pid, status)<br>
<br>
Wait for completion of a given child process.</tt></dd></dl>
<dl><dt><a name="-walk"><strong>walk</strong></a>(top, topdown<font color="#909090">=True</font>, onerror<font color="#909090">=None</font>, followlinks<font color="#909090">=False</font>)</dt><dd><tt>Directory tree generator.<br>
<br>
For each directory in the directory tree rooted at top (including top<br>
itself, but excluding '.' and '..'), yields a 3-tuple<br>
<br>
dirpath, dirnames, filenames<br>
<br>
dirpath is a string, the path to the directory. dirnames is a list of<br>
the names of the subdirectories in dirpath (excluding '.' and '..').<br>
filenames is a list of the names of the non-directory files in dirpath.<br>
Note that the names in the lists are just names, with no path components.<br>
To get a full path (which begins with top) to a file or directory in<br>
dirpath, do os.path.join(dirpath, name).<br>
<br>
If optional arg 'topdown' is true or not specified, the triple for a<br>
directory is generated before the triples for any of its subdirectories<br>
(directories are generated top down). If topdown is false, the triple<br>
for a directory is generated after the triples for all of its<br>
subdirectories (directories are generated bottom up).<br>
<br>
When topdown is true, the caller can modify the dirnames list in-place<br>
(e.g., via del or slice assignment), and walk will only recurse into the<br>
subdirectories whose names remain in dirnames; this can be used to prune<br>
the search, or to impose a specific order of visiting. Modifying<br>
dirnames when topdown is false is ineffective, since the directories in<br>
dirnames have already been generated by the time dirnames itself is<br>
generated.<br>
<br>
By default errors from the os.<a href="#-listdir">listdir</a>() call are ignored. If<br>
optional arg 'onerror' is specified, it should be a function; it<br>
will be called with one argument, an os.<a href="#error">error</a> instance. It can<br>
report the <a href="#error">error</a> to continue with the walk, or raise the exception<br>
to abort the walk. Note that the filename is available as the<br>
filename attribute of the exception <a href="builtins.html#object">object</a>.<br>
<br>
By default, os.walk does not follow symbolic links to subdirectories on<br>
systems that support them. In order to get this functionality, set the<br>
optional argument 'followlinks' to true.<br>
<br>
Caution: if you pass a relative pathname for top, don't change the<br>
current working directory between resumptions of walk. walk never<br>
changes the current directory, and assumes that the client doesn't<br>
either.<br>
<br>
Example:<br>
<br>
import os<br>
from os.path import join, getsize<br>
for root, dirs, files in os.<a href="#-walk">walk</a>('python/Lib/email'):<br>
print(root, "consumes", end="")<br>
print(sum([getsize(join(root, name)) for name in files]), end="")<br>
print("bytes in", len(files), "non-directory files")<br>
if 'CVS' in dirs:<br>
dirs.<a href="#-remove">remove</a>('CVS') # don't visit CVS directories</tt></dd></dl>
<dl><dt><a name="-write"><strong>write</strong></a>(...)</dt><dd><tt><a href="#-write">write</a>(fd, string) -> byteswritten<br>
<br>
Write a string to a file descriptor.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>EX_CANTCREAT</strong> = 73<br>
<strong>EX_CONFIG</strong> = 78<br>
<strong>EX_DATAERR</strong> = 65<br>
<strong>EX_IOERR</strong> = 74<br>
<strong>EX_NOHOST</strong> = 68<br>
<strong>EX_NOINPUT</strong> = 66<br>
<strong>EX_NOPERM</strong> = 77<br>
<strong>EX_NOUSER</strong> = 67<br>
<strong>EX_OK</strong> = 0<br>
<strong>EX_OSERR</strong> = 71<br>
<strong>EX_OSFILE</strong> = 72<br>
<strong>EX_PROTOCOL</strong> = 76<br>
<strong>EX_SOFTWARE</strong> = 70<br>
<strong>EX_TEMPFAIL</strong> = 75<br>
<strong>EX_UNAVAILABLE</strong> = 69<br>
<strong>EX_USAGE</strong> = 64<br>
<strong>F_OK</strong> = 0<br>
<strong>NGROUPS_MAX</strong> = 65536<br>
<strong>O_APPEND</strong> = 1024<br>
<strong>O_ASYNC</strong> = 8192<br>
<strong>O_CREAT</strong> = 64<br>
<strong>O_DIRECT</strong> = 16384<br>
<strong>O_DIRECTORY</strong> = 65536<br>
<strong>O_DSYNC</strong> = 4096<br>
<strong>O_EXCL</strong> = 128<br>
<strong>O_LARGEFILE</strong> = 0<br>
<strong>O_NDELAY</strong> = 2048<br>
<strong>O_NOATIME</strong> = 262144<br>
<strong>O_NOCTTY</strong> = 256<br>
<strong>O_NOFOLLOW</strong> = 131072<br>
<strong>O_NONBLOCK</strong> = 2048<br>
<strong>O_RDONLY</strong> = 0<br>
<strong>O_RDWR</strong> = 2<br>
<strong>O_RSYNC</strong> = 4096<br>
<strong>O_SYNC</strong> = 4096<br>
<strong>O_TRUNC</strong> = 512<br>
<strong>O_WRONLY</strong> = 1<br>
<strong>R_OK</strong> = 4<br>
<strong>SEEK_CUR</strong> = 1<br>
<strong>SEEK_END</strong> = 2<br>
<strong>SEEK_SET</strong> = 0<br>
<strong>TMP_MAX</strong> = 238328<br>
<strong>WCONTINUED</strong> = 8<br>
<strong>WNOHANG</strong> = 1<br>
<strong>WUNTRACED</strong> = 2<br>
<strong>W_OK</strong> = 2<br>
<strong>X_OK</strong> = 1<br>
<strong>__all__</strong> = ['altsep', 'curdir', 'pardir', 'sep', 'pathsep', 'linesep', 'defpath', 'name', 'path', 'devnull', 'SEEK_SET', 'SEEK_CUR', 'SEEK_END', 'EX_CANTCREAT', 'EX_CONFIG', 'EX_DATAERR', 'EX_IOERR', 'EX_NOHOST', 'EX_NOINPUT', 'EX_NOPERM', ...]<br>
<strong>altsep</strong> = None<br>
<strong>confstr_names</strong> = {'CS_LFS64_CFLAGS': 1004, 'CS_LFS64_LDFLAGS': 1005, 'CS_LFS64_LIBS': 1006, 'CS_LFS64_LINTFLAGS': 1007, 'CS_LFS_CFLAGS': 1000, 'CS_LFS_LDFLAGS': 1001, 'CS_LFS_LIBS': 1002, 'CS_LFS_LINTFLAGS': 1003, 'CS_PATH': 0, 'CS_XBS5_ILP32_OFF32_CFLAGS': 1100, ...}<br>
<strong>curdir</strong> = '.'<br>
<strong>defpath</strong> = ':/bin:/usr/bin'<br>
<strong>devnull</strong> = '/dev/null'<br>
<strong>environ</strong> = <os._Environ object at 0x7f28d169be50><br>
<strong>linesep</strong> = '<font color="#c040c0">\n</font>'<br>
<strong>name</strong> = 'posix'<br>
<strong>pardir</strong> = '..'<br>
<strong>pathconf_names</strong> = {'PC_ASYNC_IO': 10, 'PC_CHOWN_RESTRICTED': 6, 'PC_FILESIZEBITS': 13, 'PC_LINK_MAX': 0, 'PC_MAX_CANON': 1, 'PC_MAX_INPUT': 2, 'PC_NAME_MAX': 3, 'PC_NO_TRUNC': 7, 'PC_PATH_MAX': 4, 'PC_PIPE_BUF': 5, ...}<br>
<strong>pathsep</strong> = ':'<br>
<strong>sep</strong> = '/'<br>
<strong>sysconf_names</strong> = {'SC_2_CHAR_TERM': 95, 'SC_2_C_BIND': 47, 'SC_2_C_DEV': 48, 'SC_2_C_VERSION': 96, 'SC_2_FORT_DEV': 49, 'SC_2_FORT_RUN': 50, 'SC_2_LOCALEDEF': 52, 'SC_2_SW_DEV': 51, 'SC_2_UPE': 97, 'SC_2_VERSION': 46, ...}</td></tr></table>
</body></html>