You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
2.7 KiB

Merged revisions 73995,74002,74005,74007-74008,74011,74019-74023 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73995 | vinay.sajip | 2009-07-13 07:21:05 -0400 (Mon, 13 Jul 2009) | 1 line Issue #6314: logging: Extra checks on the "level" argument in more places. ........ r74002 | marc-andre.lemburg | 2009-07-13 16:23:49 -0400 (Mon, 13 Jul 2009) | 6 lines Use a new global DEV_NULL instead of hard-coding /dev/null into the system command helper functions. See #6479 for some motivation. ........ r74005 | marc-andre.lemburg | 2009-07-13 17:28:33 -0400 (Mon, 13 Jul 2009) | 6 lines Use a different VER command output parser to address the localization issues mentioned in #3410. Prepare for Windows 7 (still commented out). ........ r74007 | michael.foord | 2009-07-14 13:58:12 -0400 (Tue, 14 Jul 2009) | 1 line Move TestRunner initialisation into unittest.TestProgram.runTests. Fixes issue 6418. ........ r74008 | benjamin.peterson | 2009-07-14 20:46:42 -0400 (Tue, 14 Jul 2009) | 1 line update year ........ r74011 | ezio.melotti | 2009-07-15 13:07:04 -0400 (Wed, 15 Jul 2009) | 1 line methods' names pep8ification ........ r74019 | amaury.forgeotdarc | 2009-07-15 17:29:27 -0400 (Wed, 15 Jul 2009) | 2 lines #6076 Add a title to the IDLE Preferences window. ........ r74020 | georg.brandl | 2009-07-16 03:18:07 -0400 (Thu, 16 Jul 2009) | 1 line #5910: fix kqueue for calls with more than one event. ........ r74021 | georg.brandl | 2009-07-16 03:33:04 -0400 (Thu, 16 Jul 2009) | 1 line #6486: start with built in functions rather than "built in objects". ........ r74022 | georg.brandl | 2009-07-16 03:38:35 -0400 (Thu, 16 Jul 2009) | 1 line #6481: fix typo in os.system() replacement. ........ r74023 | jesse.noller | 2009-07-16 10:23:04 -0400 (Thu, 16 Jul 2009) | 1 line Issue 6433: multiprocessing.pool.map hangs on empty list ........
17 years ago
  1. .. _library-intro:
  2. ************
  3. Introduction
  4. ************
  5. The "Python library" contains several different kinds of components.
  6. It contains data types that would normally be considered part of the "core" of a
  7. language, such as numbers and lists. For these types, the Python language core
  8. defines the form of literals and places some constraints on their semantics, but
  9. does not fully define the semantics. (On the other hand, the language core does
  10. define syntactic properties like the spelling and priorities of operators.)
  11. The library also contains built-in functions and exceptions --- objects that can
  12. be used by all Python code without the need of an :keyword:`import` statement.
  13. Some of these are defined by the core language, but many are not essential for
  14. the core semantics and are only described here.
  15. The bulk of the library, however, consists of a collection of modules. There are
  16. many ways to dissect this collection. Some modules are written in C and built
  17. in to the Python interpreter; others are written in Python and imported in
  18. source form. Some modules provide interfaces that are highly specific to
  19. Python, like printing a stack trace; some provide interfaces that are specific
  20. to particular operating systems, such as access to specific hardware; others
  21. provide interfaces that are specific to a particular application domain, like
  22. the World Wide Web. Some modules are available in all versions and ports of
  23. Python; others are only available when the underlying system supports or
  24. requires them; yet others are available only when a particular configuration
  25. option was chosen at the time when Python was compiled and installed.
  26. This manual is organized "from the inside out:" it first describes the built-in
  27. data types, then the built-in functions and exceptions, and finally the modules,
  28. grouped in chapters of related modules. The ordering of the chapters as well as
  29. the ordering of the modules within each chapter is roughly from most relevant to
  30. least important.
  31. This means that if you start reading this manual from the start, and skip to the
  32. next chapter when you get bored, you will get a reasonable overview of the
  33. available modules and application areas that are supported by the Python
  34. library. Of course, you don't *have* to read it like a novel --- you can also
  35. browse the table of contents (in front of the manual), or look for a specific
  36. function, module or term in the index (in the back). And finally, if you enjoy
  37. learning about random subjects, you choose a random page number (see module
  38. :mod:`random`) and read a section or two. Regardless of the order in which you
  39. read the sections of this manual, it helps to start with chapter
  40. :ref:`built-in-funcs`, as the remainder of the manual assumes familiarity with
  41. this material.
  42. Let the show begin!