Skip to main content

errno

Symbolic names for the C errno values. Used by OSError.errno and by code that needs to distinguish between failure modes.

Source-of-record: Modules/errnomodule.c, errno docs.

Tables

errorcode maps int to symbolic name. The module surface is a flat namespace of integer constants. Common groups:

GroupExamples
Generic POSIXEPERM, ENOENT, ESRCH, EINTR, EIO, ENXIO, E2BIG, ENOEXEC, EBADF, ECHILD, EAGAIN, EWOULDBLOCK, ENOMEM, EACCES, EFAULT, ENOTBLK, EBUSY, EEXIST, EXDEV, ENODEV, ENOTDIR, EISDIR, EINVAL, ENFILE, EMFILE, ENOTTY, ETXTBSY, EFBIG, ENOSPC, ESPIPE, EROFS, EMLINK, EPIPE, EDOM, ERANGE.
NetworkingEADDRINUSE, EADDRNOTAVAIL, ECONNREFUSED, ECONNRESET, ECONNABORTED, ENETUNREACH, EHOSTUNREACH, ETIMEDOUT, ENOTCONN, EISCONN, EPIPE, EAFNOSUPPORT, EPROTONOSUPPORT.
FilesystemENAMETOOLONG, ENOLCK, ENOSYS, ENOTEMPTY, ELOOP, ENOMSG, EIDRM.
StreamEOVERFLOW, ECANCELED, EOWNERDEAD, ENOTRECOVERABLE.

Gopy status

AreaState
All POSIX errno symbolsComplete.
Windows extras (WSA*)Windows builds only; partial.

Reference

  • CPython 3.14: errno.
  • Modules/errnomodule.c.
  • module/errno/. gopy port.