📄 module-errno.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>6.18 errno -- Standard errno system symbols</title>
<META NAME="description" CONTENT="6.18 errno -- Standard errno system symbols">
<META NAME="keywords" CONTENT="lib">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="STYLESHEET" href="lib.css" tppabs="http://www.python.org/doc/current/lib/lib.css">
<LINK REL="next" href="module-glob.html" tppabs="http://www.python.org/doc/current/lib/module-glob.html">
<LINK REL="previous" href="module-tempfile.html" tppabs="http://www.python.org/doc/current/lib/module-tempfile.html">
<LINK REL="up" href="allos.html" tppabs="http://www.python.org/doc/current/lib/allos.html">
<LINK REL="next" href="module-glob.html" tppabs="http://www.python.org/doc/current/lib/module-glob.html">
</head>
<body>
<DIV CLASS="navigation"><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="module-tempfile.html" tppabs="http://www.python.org/doc/current/lib/module-tempfile.html"><img src="previous.gif" tppabs="http://www.python.org/doc/current/icons/previous.gif" border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="allos.html" tppabs="http://www.python.org/doc/current/lib/allos.html"><img src="up.gif" tppabs="http://www.python.org/doc/current/icons/up.gif" border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="module-glob.html" tppabs="http://www.python.org/doc/current/lib/module-glob.html"><img src="next.gif" tppabs="http://www.python.org/doc/current/icons/next.gif" border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html"><img src="contents.gif" tppabs="http://www.python.org/doc/current/icons/contents.gif" border="0" height="32"
alt="Contents" width="32"></A></td>
<td><a href="modindex.html" tppabs="http://www.python.org/doc/current/lib/modindex.html" title="Module Index"><img src="modules.gif" tppabs="http://www.python.org/doc/current/icons/modules.gif" border="0" height="32"
alt="Module Index" width="32"></a></td>
<td><A href="genindex.html" tppabs="http://www.python.org/doc/current/lib/genindex.html"><img src="index.gif" tppabs="http://www.python.org/doc/current/icons/index.gif" border="0" height="32"
alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="module-tempfile.html" tppabs="http://www.python.org/doc/current/lib/module-tempfile.html">6.17 tempfile </A>
<b class="navlabel">Up:</b> <a class="sectref" href="allos.html" tppabs="http://www.python.org/doc/current/lib/allos.html">6. Generic Operating System</A>
<b class="navlabel">Next:</b> <a class="sectref" href="module-glob.html" tppabs="http://www.python.org/doc/current/lib/module-glob.html">6.19 glob </A>
<br><hr></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION0081800000000000000000">
6.18 <tt class="module">errno</tt> --
Standard errno system symbols</A>
</H1>
<P>
<P>
This module makes available standard <code>errno</code> system symbols.
The value of each symbol is the corresponding integer value.
The names and descriptions are borrowed from <span class="file">linux/include/errno.h</span>,
which should be pretty all-inclusive.
<P>
<dl><dt><b><a name='l2h-1348'><tt>errorcode</tt></a></b>
<dd>
Dictionary providing a mapping from the errno value to the string
name in the underlying system. For instance,
<code>errno.errorcode[errno.EPERM]</code> maps to <code>'EPERM'</code>.
</dl>
<P>
To translate a numeric error code to an error message, use
<tt class="function">os.strerror()</tt>.
<P>
Of the following list, symbols that are not used on the current
platform are not defined by the module. The specific list of defined
symbols is available as <code>errno.errorcode.keys()</code>. Symbols
available can include:
<P>
<dl><dt><b><a name='l2h-1349'><tt>EPERM</tt></a></b>
<dd> Operation not permitted </dl>
<dl><dt><b><a name='l2h-1350'><tt>ENOENT</tt></a></b>
<dd> No such file or directory </dl>
<dl><dt><b><a name='l2h-1351'><tt>ESRCH</tt></a></b>
<dd> No such process </dl>
<dl><dt><b><a name='l2h-1352'><tt>EINTR</tt></a></b>
<dd> Interrupted system call </dl>
<dl><dt><b><a name='l2h-1353'><tt>EIO</tt></a></b>
<dd> I/O error </dl>
<dl><dt><b><a name='l2h-1354'><tt>ENXIO</tt></a></b>
<dd> No such device or address </dl>
<dl><dt><b><a name='l2h-1355'><tt>E2BIG</tt></a></b>
<dd> Arg list too long </dl>
<dl><dt><b><a name='l2h-1356'><tt>ENOEXEC</tt></a></b>
<dd> Exec format error </dl>
<dl><dt><b><a name='l2h-1357'><tt>EBADF</tt></a></b>
<dd> Bad file number </dl>
<dl><dt><b><a name='l2h-1358'><tt>ECHILD</tt></a></b>
<dd> No child processes </dl>
<dl><dt><b><a name='l2h-1359'><tt>EAGAIN</tt></a></b>
<dd> Try again </dl>
<dl><dt><b><a name='l2h-1360'><tt>ENOMEM</tt></a></b>
<dd> Out of memory </dl>
<dl><dt><b><a name='l2h-1361'><tt>EACCES</tt></a></b>
<dd> Permission denied </dl>
<dl><dt><b><a name='l2h-1362'><tt>EFAULT</tt></a></b>
<dd> Bad address </dl>
<dl><dt><b><a name='l2h-1363'><tt>ENOTBLK</tt></a></b>
<dd> Block device required </dl>
<dl><dt><b><a name='l2h-1364'><tt>EBUSY</tt></a></b>
<dd> Device or resource busy </dl>
<dl><dt><b><a name='l2h-1365'><tt>EEXIST</tt></a></b>
<dd> File exists </dl>
<dl><dt><b><a name='l2h-1366'><tt>EXDEV</tt></a></b>
<dd> Cross-device link </dl>
<dl><dt><b><a name='l2h-1367'><tt>ENODEV</tt></a></b>
<dd> No such device </dl>
<dl><dt><b><a name='l2h-1368'><tt>ENOTDIR</tt></a></b>
<dd> Not a directory </dl>
<dl><dt><b><a name='l2h-1369'><tt>EISDIR</tt></a></b>
<dd> Is a directory </dl>
<dl><dt><b><a name='l2h-1370'><tt>EINVAL</tt></a></b>
<dd> Invalid argument </dl>
<dl><dt><b><a name='l2h-1371'><tt>ENFILE</tt></a></b>
<dd> File table overflow </dl>
<dl><dt><b><a name='l2h-1372'><tt>EMFILE</tt></a></b>
<dd> Too many open files </dl>
<dl><dt><b><a name='l2h-1373'><tt>ENOTTY</tt></a></b>
<dd> Not a typewriter </dl>
<dl><dt><b><a name='l2h-1374'><tt>ETXTBSY</tt></a></b>
<dd> Text file busy </dl>
<dl><dt><b><a name='l2h-1375'><tt>EFBIG</tt></a></b>
<dd> File too large </dl>
<dl><dt><b><a name='l2h-1376'><tt>ENOSPC</tt></a></b>
<dd> No space left on device </dl>
<dl><dt><b><a name='l2h-1377'><tt>ESPIPE</tt></a></b>
<dd> Illegal seek </dl>
<dl><dt><b><a name='l2h-1378'><tt>EROFS</tt></a></b>
<dd> Read-only file system </dl>
<dl><dt><b><a name='l2h-1379'><tt>EMLINK</tt></a></b>
<dd> Too many links </dl>
<dl><dt><b><a name='l2h-1380'><tt>EPIPE</tt></a></b>
<dd> Broken pipe </dl>
<dl><dt><b><a name='l2h-1381'><tt>EDOM</tt></a></b>
<dd> Math argument out of domain of func </dl>
<dl><dt><b><a name='l2h-1382'><tt>ERANGE</tt></a></b>
<dd> Math result not representable </dl>
<dl><dt><b><a name='l2h-1383'><tt>EDEADLK</tt></a></b>
<dd> Resource deadlock would occur </dl>
<dl><dt><b><a name='l2h-1384'><tt>ENAMETOOLONG</tt></a></b>
<dd> File name too long </dl>
<dl><dt><b><a name='l2h-1385'><tt>ENOLCK</tt></a></b>
<dd> No record locks available </dl>
<dl><dt><b><a name='l2h-1386'><tt>ENOSYS</tt></a></b>
<dd> Function not implemented </dl>
<dl><dt><b><a name='l2h-1387'><tt>ENOTEMPTY</tt></a></b>
<dd> Directory not empty </dl>
<dl><dt><b><a name='l2h-1388'><tt>ELOOP</tt></a></b>
<dd> Too many symbolic links encountered </dl>
<dl><dt><b><a name='l2h-1389'><tt>EWOULDBLOCK</tt></a></b>
<dd> Operation would block </dl>
<dl><dt><b><a name='l2h-1390'><tt>ENOMSG</tt></a></b>
<dd> No message of desired type </dl>
<dl><dt><b><a name='l2h-1391'><tt>EIDRM</tt></a></b>
<dd> Identifier removed </dl>
<dl><dt><b><a name='l2h-1392'><tt>ECHRNG</tt></a></b>
<dd> Channel number out of range </dl>
<dl><dt><b><a name='l2h-1393'><tt>EL2NSYNC</tt></a></b>
<dd> Level 2 not synchronized </dl>
<dl><dt><b><a name='l2h-1394'><tt>EL3HLT</tt></a></b>
<dd> Level 3 halted </dl>
<dl><dt><b><a name='l2h-1395'><tt>EL3RST</tt></a></b>
<dd> Level 3 reset </dl>
<dl><dt><b><a name='l2h-1396'><tt>ELNRNG</tt></a></b>
<dd> Link number out of range </dl>
<dl><dt><b><a name='l2h-1397'><tt>EUNATCH</tt></a></b>
<dd> Protocol driver not attached </dl>
<dl><dt><b><a name='l2h-1398'><tt>ENOCSI</tt></a></b>
<dd> No CSI structure available </dl>
<dl><dt><b><a name='l2h-1399'><tt>EL2HLT</tt></a></b>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -