Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
34 lines (23 loc) · 915 Bytes

File metadata and controls

34 lines (23 loc) · 915 Bytes
Copy raw file
Download raw file
Outline
Edit and raw actions

:mod:`uerrno` -- system error codes

.. module:: uerrno
   :synopsis: system error codes

|see_cpython_module| :mod:`cpython:errno`.

This module provides access to symbolic error codes for OSError exception.

Constants

.. data:: EEXIST, EAGAIN, etc.

    Error codes, based on ANSI C/POSIX standard. All error codes start with
    "E". Errors are usually accessible as ``exc.args[0]``
    where ``exc`` is an instance of `OSError`. Usage example::

        try:
            os.mkdir("my_dir")
        except OSError as exc:
            if exc.args[0] == uerrno.EEXIST:
                print("Directory already exists")

.. data:: errorcode

    Dictionary mapping numeric error codes to strings with symbolic error
    code (see above)::

        >>> print(uerrno.errorcode[uerrno.EEXIST])
        EEXIST
Morty Proxy This is a proxified and sanitized view of the page, visit original site.