• Home
  • Raw
  • Download

Lines Matching +full:unix +full:- +full:like

1 :mod:`os` --- Miscellaneous operating system interfaces
13 module, and for high-level file and directory handling see the :mod:`shutil`
18 * The design of all built-in operating system dependent modules of Python is
28 * An "Availability: Unix" note means that this function is commonly found on
29 Unix systems. It does not make any claims about its existence on a specific
32 * If not separately noted, all functions that claim "Availability: Unix" are
33 supported on Mac OS X, which builds on a Unix core.
47 An alias for the built-in :exc:`OSError` exception.
58 system-dependent version information.
64 .. _os-procinfo:
67 ------------------
100 passed to the appropriate process-creation functions to cause child processes
118 These functions are described in :ref:`os-file-dir`.
125 Availability: Unix.
133 Availability: Unix.
142 Availability: Unix.
151 Availability: Unix.
158 Availability: Unix.
163 other Unix platforms. If the Python interpreter was built with a
166 this list is limited to a system-defined number of entries, typically 16,
183 Availability: Unix.
196 Availability: Unix.
204 Availability: Unix.
215 Availability: Unix.
224 Availability: Unix, Windows.
233 Availability: Unix.
241 Availability: Unix.
251 Availability: Unix.
262 Availability: Unix.
270 Availability: most flavors of Unix, Windows.
281 Availability: most flavors of Unix, Windows.
298 Availability: Unix.
305 Availability: Unix.
312 Availability: Unix.
321 Availability: Unix.
326 system-defined maximum number of effective group ids, typically 16.
333 which version is implemented (if any). See the Unix manual for the semantics.
335 Availability: Unix.
341 process with id *pid* to the process group with id *pgrp*. See the Unix manual
344 Availability: Unix.
351 Availability: Unix.
358 Availability: Unix.
367 Availability: Unix.
376 Availability: Unix.
381 Call the system call :c:func:`getsid`. See the Unix manual for the semantics.
383 Availability: Unix.
390 Call the system call :c:func:`setsid`. See the Unix manual for the semantics.
392 Availability: Unix.
401 Availability: Unix.
411 Availability: Unix, Windows.
418 Availability: Unix, Windows.
427 Return a 5-tuple containing information identifying the current operating
434 Availability: recent flavors of Unix.
450 Availability: most flavors of Unix, Windows.
453 .. _os-newstreams:
456 --------------------
467 to the built-in :func:`open` function. If :func:`fdopen` raises an
470 Availability: Unix, Windows.
477 On Unix, when the *mode* argument starts with ``'a'``, the *O_APPEND* flag is
487 the corresponding argument to the built-in :func:`open` function. The exit
493 Availability: Unix, Windows.
497 especially the :ref:`subprocess-replacements` section.
512 Availability: Unix, Windows.
527 Also, for each of these variants, on Unix, *cmd* may be a sequence, in which
535 available on Unix.
538 functions, see :ref:`popen2-flow-control`.
543 Execute *cmd* as a sub-process and return the file objects ``(child_stdin,
548 especially the :ref:`subprocess-replacements` section.
550 Availability: Unix, Windows.
557 Execute *cmd* as a sub-process and return the file objects ``(child_stdin,
562 especially the :ref:`subprocess-replacements` section.
564 Availability: Unix, Windows.
571 Execute *cmd* as a sub-process and return the file objects ``(child_stdin,
576 especially the :ref:`subprocess-replacements` section.
578 Availability: Unix, Windows.
591 .. _os-fd-ops:
594 --------------------------
602 is slightly deceptive; on Unix platforms, sockets and pipes are also referenced
614 Availability: Unix, Windows.
618 This function is intended for low-level I/O and must be applied to a file
620 object" returned by the built-in function :func:`open` or by :func:`popen` or
635 Availability: Unix, Windows.
644 Availability: Unix, Windows.
651 Availability: Unix, Windows.
659 Availability: Unix.
667 and *gid*. To leave one of the ids unchanged, set it to -1.
669 Availability: Unix.
679 Availability: Unix.
690 standards (POSIX.1, Unix 95, Unix 98, and others). Some platforms define
700 Availability: Unix.
705 Return status for file descriptor *fd*, like :func:`~os.stat`.
707 Availability: Unix, Windows.
713 descriptor *fd*, like :func:`statvfs`.
715 Availability: Unix.
720 Force write of file with filedescriptor *fd* to disk. On Unix, this calls the
727 Availability: Unix, and Windows starting in 2.2.3.
735 Availability: Unix.
741 tty(-like) device, else ``False``.
752 Availability: Unix, Windows.
762 Availability: Windows, Unix.
774 For a description of the flag and mode values, see the C run-time documentation;
775 flag constants (like :const:`O_RDONLY` and :const:`O_WRONLY`) are defined in
776 this module too (see :ref:`open-constants`). In particular, on Windows adding
779 Availability: Unix, Windows.
783 This function is intended for low-level I/O. For normal usage, use the
784 built-in function :func:`open`, which returns a "file object" with
793 Open a new pseudo-terminal pair. Return a pair of file descriptors ``(master,
797 Availability: some flavors of Unix.
805 Availability: Unix, Windows.
814 Availability: Unix, Windows.
818 This function is intended for low-level I/O and must be applied to a file
820 returned by the built-in function :func:`open` or by :func:`popen` or
830 Availability: Unix.
838 Availability: Unix.
847 Availability: Unix.
855 Availability: Unix, Windows.
859 This function is intended for low-level I/O and must be applied to a file
861 object" returned by the built-in function :func:`open` or by :func:`popen` or
866 .. _open-constants:
874 their availability and use, consult the :manpage:`open(2)` manual page on Unix
875 or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windows.
886 The above constants are available on Unix and Windows.
896 The above constants are only available on Unix.
922 .. _os-file-dir:
925 ---------------------
935 :const:`False` if not. See the Unix man page :manpage:`access(2)` for more
938 Availability: Unix, Windows.
970 permissions semantics beyond the usual POSIX permission-bit model.
1003 Availability: Unix, Windows.
1012 Availability: Unix.
1021 Availability: Unix, Windows.
1028 Availability: Unix, Windows.
1051 Availability: Unix.
1059 Unix.
1091 Availability: Unix, Windows.
1095 Although Windows supports :func:`chmod`, you can only set the file's read-only
1104 one of the ids unchanged, set it to -1.
1106 Availability: Unix.
1111 Set the flags of *path* to the numeric *flags*, like :func:`chflags`, but do not
1114 Availability: Unix.
1125 Availability: Unix.
1135 Availability: Unix.
1144 Availability: Unix.
1154 Availability: Unix, Windows.
1157 On Windows NT/2k/XP and Unix, if *path* is a Unicode object, the result will be
1176 Availability: Unix.
1178 FIFOs are pipes that can be accessed like regular files. FIFOs exist until they
1182 doesn't open the FIFO --- it just creates the rendezvous point.
1233 platform-dependent. On some platforms, they are ignored and you should call
1239 Availability: Unix, Windows.
1248 Recursive directory creation function. Like :func:`mkdir`, but makes all
1249 intermediate-level directories needed to contain the leaf directory. Raises an
1272 standards (POSIX.1, Unix 95, Unix 98, and others). Some platforms define
1282 Availability: Unix.
1290 Unix.
1303 Availability: Unix.
1311 remove a file that is in use causes an exception to be raised; on Unix, the
1315 Availability: Unix, Windows.
1322 Remove directories recursively. Works like :func:`rmdir` except that, if the
1337 :exc:`OSError` will be raised. On Unix, if *dst* exists and is a file, it will
1339 Unix flavors if *src* and *dst* are on different filesystems. If successful,
1345 Availability: Unix, Windows.
1350 Recursive directory or file renaming function. Works like :func:`rename`, except
1369 Availability: Unix, Windows.
1380 * :attr:`st_mode` - protection bits,
1381 * :attr:`st_ino` - inode number,
1382 * :attr:`st_dev` - device,
1383 * :attr:`st_nlink` - number of hard links,
1384 * :attr:`st_uid` - user id of owner,
1385 * :attr:`st_gid` - group id of owner,
1386 * :attr:`st_size` - size of file, in bytes,
1387 * :attr:`st_atime` - time of most recent access,
1388 * :attr:`st_mtime` - time of most recent content modification,
1389 * :attr:`st_ctime` - platform dependent; time of most recent metadata change on
1390 Unix, or the time of creation on Windows)
1397 On some Unix systems (such as Linux), the following attributes may also be
1400 * :attr:`st_blocks` - number of 512-byte blocks allocated for file
1401 * :attr:`st_blksize` - filesystem blocksize for efficient file system I/O
1402 * :attr:`st_rdev` - type of device if an inode device
1403 * :attr:`st_flags` - user defined flags for file
1405 On other Unix systems (such as FreeBSD), the following attributes may be
1408 * :attr:`st_gen` - file generation number
1409 * :attr:`st_birthtime` - time of file creation
1422 or FAT32 file systems, :attr:`st_mtime` has 2-second resolution, and
1423 :attr:`st_atime` has only 1-day resolution. See your operating system
1448 Availability: Unix, Windows.
1501 Availability: Unix.
1511 Availability: Unix.
1522 cleanup is provided. On Unix, the environment variable :envvar:`TMPDIR`
1530 :func:`tmpfile` (section :ref:`os-newstreams`) instead.
1532 Availability: Unix, Windows.
1546 :func:`tmpfile` (section :ref:`os-newstreams`) instead.
1548 Availability: Unix, Windows. This function probably shouldn't be used on
1564 :func:`remove`; the :func:`unlink` name is its traditional Unix
1567 Availability: Unix, Windows.
1574 time. (The effect is similar to running the Unix program :program:`touch` on
1575 the path.) Otherwise, *times* must be a 2-tuple of numbers, of the form
1586 Availability: Unix, Windows.
1596 either top-down or bottom-up. For each directory in the tree rooted at directory
1597 *top* (including *top* itself), it yields a 3-tuple ``(dirpath, dirnames,
1602 *filenames* is a list of the names of the non-directory files in *dirpath*.
1609 (directories are generated top-down). If *topdown* is ``False``, the triple
1611 (directories are generated bottom-up). No matter the value of *topdown*, the
1615 When *topdown* is ``True``, the caller can modify the *dirnames* list in-place
1621 no effect on the behavior of the walk, because in bottom-up mode the directories
1649 This example displays the number of bytes taken by non-directory files in each
1658 print "bytes in", len(files), "non-directory files"
1662 In the next example, walking the tree bottom-up is essential: :func:`rmdir`
1679 .. _os-process:
1682 ------------------
1697 Generate a :const:`SIGABRT` signal to the current process. On Unix, the default
1703 Availability: Unix, Windows.
1716 do not return. On Unix, the new executable is loaded into the current process,
1727 command-line arguments are passed. The "l" variants are perhaps the easiest
1752 Availability: Unix, Windows.
1760 Availability: Unix, Windows.
1773 Some of these may not be available on all Unix platforms, since there is some
1782 Availability: Unix.
1792 Availability: Unix.
1801 Availability: Unix.
1810 Availability: Unix.
1819 Availability: Unix.
1828 Availability: Unix.
1837 Availability: Unix.
1846 Availability: Unix.
1856 Availability: Unix.
1866 Availability: Unix.
1875 Availability: Unix.
1884 Availability: Unix.
1895 Availability: Unix.
1905 Availability: Unix.
1915 Availability: Unix.
1924 Availability: Unix.
1931 Exit code that means something like "an entry was not found".
1933 Availability: Unix.
1950 Availability: Unix.
1955 Fork a child process, using a new pseudo-terminal as the child's controlling
1958 master end of the pseudo-terminal. For a more portable approach, use the
1961 Availability: some flavors of Unix.
1992 Availability: Unix.
2001 Availability: Unix.
2009 Availability: Unix.
2019 are described in section :ref:`os-newstreams`.
2036 :ref:`subprocess-replacements` section.)
2040 exits normally, or ``-signal``, where *signal* is the signal that killed the
2045 command-line arguments are passed. The "l" variants are perhaps the easiest
2081 Availability: Unix, Windows. :func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp`
2083 :func:`spawnve` are not thread-safe on Windows; we advise you to use the
2097 Availability: Unix, Windows.
2107 of the process the run is successful, or ``-signal`` if a signal kills the
2110 Availability: Unix, Windows.
2133 When *operation* is not specified or ``'open'``, this acts like double-clicking
2166 On Unix, the return value is the exit status of the process encoded in the
2169 the Python function is system-dependent.
2175 the command run; on systems using a non-native shell, consult your shell
2181 :ref:`subprocess-replacements` section in the :mod:`subprocess` documentation
2184 Availability: Unix, Windows.
2189 Return a 5-tuple of floating point numbers indicating accumulated (processor
2192 fixed point in the past, in that order. See the Unix manual page
2196 Availability: Unix, Windows
2202 and exit status indication: a 16-bit number, whose low byte is the signal number
2207 Availability: Unix.
2212 The details of this function differ on Unix and Windows.
2214 On Unix: Wait for completion of a child process given by process id *pid*, and
2221 child in the process group of the current process. If *pid* is ``-1``, the
2223 ``-1``, status is requested for any process in the process group ``-pid`` (the
2227 returns -1.
2231 (shifting makes cross-platform use of the function easier). A *pid* less than or
2241 3-element tuple containing the child's process id, exit status indication, and
2247 Availability: Unix.
2254 Similar to :func:`waitpid`, except a 3-element tuple, containing the child's
2260 Availability: Unix.
2270 Availability: Unix.
2278 Availability: Some Unix systems.
2288 Availability: Unix.
2302 Availability: Unix.
2312 Availability: Unix.
2322 Availability: Unix.
2330 Availability: Unix.
2338 Availability: Unix.
2346 Availability: Unix.
2353 Availability: Unix.
2360 Availability: Unix.
2363 .. _os-path:
2366 --------------------------------
2371 Return string-valued system configuration values. *name* specifies the
2374 Unix 95, Unix 98, and others). Some platforms define additional names as well.
2387 Availability: Unix
2396 Availability: Unix.
2405 Availability: Unix.
2412 Return integer-valued system configuration values. If the configuration value
2413 specified by *name* isn't defined, ``-1`` is returned. The comments regarding
2417 Availability: Unix.
2426 Availability: Unix.
2431 Higher-level operations on pathnames are defined in the :mod:`os.path` module.
2452 is not sufficient to be able to parse or concatenate pathnames --- use
2453 :func:`os.path.split` and :func:`os.path.join` --- but it is occasionally
2504 .. _os-miscfunc:
2507 -----------------------
2514 This function returns random bytes from an OS-specific randomness source. The
2516 though its exact quality depends on the OS implementation. On a UNIX-like
2521 For an easy-to-use interface to the random number generator