| OLD | NEW |
| 1 :mod:`os` --- Miscellaneous operating system interfaces | 1 :mod:`os` --- Miscellaneous operating system interfaces |
| 2 ======================================================= | 2 ======================================================= |
| 3 | 3 |
| 4 .. module:: os | 4 .. module:: os |
| 5 :synopsis: Miscellaneous operating system interfaces. | 5 :synopsis: Miscellaneous operating system interfaces. |
| 6 | 6 |
| 7 | 7 |
| 8 This module provides a portable way of using operating system dependent | 8 This module provides a portable way of using operating system dependent |
| 9 functionality. If you just want to read or write a file see :func:`open`, if | 9 functionality. If you just want to read or write a file see :func:`open`, if |
| 10 you want to manipulate paths, see the :mod:`os.path` module, and if you want to | 10 you want to manipulate paths, see the :mod:`os.path` module, and if you want to |
| (...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 have typed on a command line. For the C programmer, this is the ``argv[0]`` | 1658 have typed on a command line. For the C programmer, this is the ``argv[0]`` |
| 1659 passed to a program's :cfunc:`main`. For example, ``os.execv('/bin/echo', | 1659 passed to a program's :cfunc:`main`. For example, ``os.execv('/bin/echo', |
| 1660 ['foo', 'bar'])`` will only print ``bar`` on standard output; ``foo`` will seem | 1660 ['foo', 'bar'])`` will only print ``bar`` on standard output; ``foo`` will seem |
| 1661 to be ignored. | 1661 to be ignored. |
| 1662 | 1662 |
| 1663 | 1663 |
| 1664 .. function:: abort() | 1664 .. function:: abort() |
| 1665 | 1665 |
| 1666 Generate a :const:`SIGABRT` signal to the current process. On Unix, the defa
ult | 1666 Generate a :const:`SIGABRT` signal to the current process. On Unix, the defa
ult |
| 1667 behavior is to produce a core dump; on Windows, the process immediately retur
ns | 1667 behavior is to produce a core dump; on Windows, the process immediately retur
ns |
| 1668 an exit code of ``3``. Be aware that programs which use :func:`signal.signal
` | 1668 an exit code of ``3``. Be aware that calling this function will not call the |
| 1669 to register a handler for :const:`SIGABRT` will behave differently. | 1669 Python signal handler registered for :const:`SIGABRT` with |
| 1670 :func:`signal.signal`. |
| 1670 | 1671 |
| 1671 Availability: Unix, Windows. | 1672 Availability: Unix, Windows. |
| 1672 | 1673 |
| 1673 | 1674 |
| 1674 .. function:: execl(path, arg0, arg1, ...) | 1675 .. function:: execl(path, arg0, arg1, ...) |
| 1675 execle(path, arg0, arg1, ..., env) | 1676 execle(path, arg0, arg1, ..., env) |
| 1676 execlp(file, arg0, arg1, ...) | 1677 execlp(file, arg0, arg1, ...) |
| 1677 execlpe(file, arg0, arg1, ..., env) | 1678 execlpe(file, arg0, arg1, ..., env) |
| 1678 execv(path, args) | 1679 execv(path, args) |
| 1679 execve(path, args, env) | 1680 execve(path, args, env) |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2472 Return a string of *n* random bytes suitable for cryptographic use. | 2473 Return a string of *n* random bytes suitable for cryptographic use. |
| 2473 | 2474 |
| 2474 This function returns random bytes from an OS-specific randomness source. Th
e | 2475 This function returns random bytes from an OS-specific randomness source. Th
e |
| 2475 returned data should be unpredictable enough for cryptographic applications, | 2476 returned data should be unpredictable enough for cryptographic applications, |
| 2476 though its exact quality depends on the OS implementation. On a UNIX-like | 2477 though its exact quality depends on the OS implementation. On a UNIX-like |
| 2477 system this will query /dev/urandom, and on Windows it will use CryptGenRando
m. | 2478 system this will query /dev/urandom, and on Windows it will use CryptGenRando
m. |
| 2478 If a randomness source is not found, :exc:`NotImplementedError` will be raise
d. | 2479 If a randomness source is not found, :exc:`NotImplementedError` will be raise
d. |
| 2479 | 2480 |
| 2480 .. versionadded:: 2.4 | 2481 .. versionadded:: 2.4 |
| 2481 | 2482 |
| OLD | NEW |