Dataset Viewer
Auto-converted to Parquet Duplicate
title
stringlengths
4
62
text
stringlengths
12
9.02k
python_version
stringclasses
1 value
length
int64
12
9.02k
url
stringlengths
59
91
Extending and Embedding the Python Interpreter
--- node1.html node1.html --- # Extending and Embedding the Python Interpreter Guido van Rossum Dept. AA, CWI, P.O. Box 94079 1090 GB Amsterdam, The Netherlands E-mail: guido@cwi.nl 10 April 1995 Release 1.2 Copyright © 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, The Netherlands. All Rights Reserved Permiss...
1.2
4,322
https://docs.python.org/{python_version}/python-ext/ext.html
Footnotes
guido@cwi.nl
1.2
12
https://docs.python.org/{python_version}/python-ext/footnode.html
Contents
--- node2.html ext.html ext.html --- ## Contents - Extending Python with C or C++ code (node2.html#SECTION00200000000000000000) - Introduction (node3.html#SECTION00210000000000000000) A Simple Example (node4.html#SECTION00220000000000000000) Intermezzo: Errors and Exceptions (node5.html#SECTION00230000000000000000) Bac...
1.2
2,049
https://docs.python.org/{python_version}/python-ext/node1.html
Format Strings for PyArg_ParseTuple()
--- node11.html node2.html node9.html node1.html --- # Format Strings for PyArg_ParseTuple() The `PyArg_ParseTuple()` function is declared as follows: ```text int PyArg_ParseTuple(PyObject *arg, char *format, ...); ``` The arg argument must be a tuple object containing an argument list passed from Python to a C functio...
1.2
3,043
https://docs.python.org/{python_version}/python-ext/node10.html
The Py_BuildValue() Function
--- node12.html node2.html node10.html node1.html --- # The Py_BuildValue() Function This function is the counterpart to `PyArg_ParseTuple()`. It is declared as follows: ```text PyObject *Py_BuildValue(char *format, ...); ``` It recognizes a set of format units similar to the ones recognized by `PyArg_ParseTuple()`, bu...
1.2
2,303
https://docs.python.org/{python_version}/python-ext/node11.html
Reference Counts
--- node13.html node2.html node11.html node1.html --- # Reference Counts --- - Introduction (node13.html#SECTION002101000000000000000) Reference Counting in Python (node14.html#SECTION002102000000000000000) Ownership Rules (node15.html#SECTION002103000000000000000) Thin Ice (node16.html#SECTION002104000000000000000) NU...
1.2
391
https://docs.python.org/{python_version}/python-ext/node12.html
Introduction
--- node14.html node12.html node12.html node1.html --- ## Introduction In languages like C or C++, the programmer is responsible for dynamic allocation and deallocation of memory on the heap. In C, this is done using the functions `malloc()` and `free()`. In C++, the operators `new` and `delete` are used with essential...
1.2
3,401
https://docs.python.org/{python_version}/python-ext/node13.html
Reference Counting in Python
--- node15.html node12.html node13.html node1.html --- ## Reference Counting in Python There are two macros, `Py_INCREF(x)` and `Py_DECREF(x)`, which handle the incrementing and decrementing of the reference count. `Py_DECREF()` also frees the object when the count reaches zero. For flexibility, it doesn't call `free()...
1.2
2,349
https://docs.python.org/{python_version}/python-ext/node14.html
Ownership Rules
--- node16.html node12.html node14.html node1.html --- ## Ownership Rules Whenever an object reference is passed into or out of a function, it is part of the function's interface specification whether ownership is transferred with the reference or not. Most functions that return a reference to an object pass on ownersh...
1.2
2,417
https://docs.python.org/{python_version}/python-ext/node15.html
Thin Ice
--- node17.html node12.html node15.html node1.html --- ## Thin Ice There are a few situations where seemingly harmless use of a borrowed reference can lead to problems. These all have to do with implicit invocations of the interpreter, which can cause the owner of a reference to dispose of it. The first and most import...
1.2
3,056
https://docs.python.org/{python_version}/python-ext/node16.html
NULL Pointers
--- node18.html node12.html node16.html node1.html --- ## NULL Pointers In general, functions that take object references as arguments don't expect you to pass them `NULL` pointers, and will dump core (or cause later core dumps) if you do so. Functions that return object references generally return `NULL` only to indic...
1.2
1,527
https://docs.python.org/{python_version}/python-ext/node17.html
Writing Extensions in C++
--- node19.html node2.html node17.html node1.html --- # Writing Extensions in C++ It is possible to write extension modules in C++. Some restrictions apply: since the main program (the Python interpreter) is compiled and linked by the C compiler, global or static objects with constructors cannot be used. All functions ...
1.2
755
https://docs.python.org/{python_version}/python-ext/node18.html
Embedding Python in another application
--- node20.html ext.html node18.html node1.html --- # Embedding Python in another application Embedding Python is similar to extending it, but not quite. The difference is that when you extend Python, the main program of the application is still the Python interpreter, while if you embed Python, the main program may ha...
1.2
1,367
https://docs.python.org/{python_version}/python-ext/node19.html
Extending Python with C or C++ code
--- node3.html ext.html node1.html node1.html --- # Extending Python with C or C++ code --- - Introduction (node3.html#SECTION00210000000000000000) A Simple Example (node4.html#SECTION00220000000000000000) Intermezzo: Errors and Exceptions (node5.html#SECTION00230000000000000000) Back to the Example (node6.html#SECTION...
1.2
1,169
https://docs.python.org/{python_version}/python-ext/node2.html
Embedding Python in C++
--- node21.html node19.html node19.html node1.html --- # Embedding Python in C++ It is also possible to embed Python in a C++ program; precisely how this is done will depend on the details of the C++ system used; in general you will need to write the main program in C++, and use the C++ compiler to compile and link you...
1.2
402
https://docs.python.org/{python_version}/python-ext/node20.html
Dynamic Loading
--- node22.html ext.html node20.html node1.html --- # Dynamic Loading On most modern systems it is possible to configure Python to support dynamic loading of extension modules implemented in C. When shared libraries are used dynamic loading is configured automatically; otherwise you have to select it as a build option ...
1.2
1,832
https://docs.python.org/{python_version}/python-ext/node21.html
Configuring and Building the Interpreter for Dynamic Loading
--- node23.html node21.html node21.html node1.html --- # Configuring and Building the Interpreter for Dynamic Loading There are three styles of dynamic loading: one using shared libraries, one using SGI IRIX 4 dynamic loading, and one using GNU dynamic loading. --- - Shared Libraries (node23.html#SECTION004110000000000...
1.2
474
https://docs.python.org/{python_version}/python-ext/node22.html
Shared Libraries
--- node24.html node22.html node22.html node1.html --- ## Shared Libraries The following systems support dynamic loading using shared libraries: SunOS 4; Solaris 2; SGI IRIX 5 (but not SGI IRIX 4!); and probably all systems derived from SVR4, or at least those SVR4 derivatives that support shared libraries (are there a...
1.2
551
https://docs.python.org/{python_version}/python-ext/node23.html
SGI IRIX 4 Dynamic Loading
--- node25.html node22.html node23.html node1.html --- ## SGI IRIX 4 Dynamic Loading Only SGI IRIX 4 supports dynamic loading of modules using SGI dynamic loading. (SGI IRIX 5 might also support it but it is inferior to using shared libraries so there is no reason to; a small test didn't work right away so I gave up tr...
1.2
993
https://docs.python.org/{python_version}/python-ext/node24.html
GNU Dynamic Loading
--- node26.html node22.html node24.html node1.html --- ## GNU Dynamic Loading GNU dynamic loading supports (according to its ``README`' file) the following hardware and software combinations: VAX (Ultrix), Sun 3 (SunOS 3.4 and 4.0), Sparc (SunOS 4.0), Sequent Symmetry (Dynix), and Atari ST. There is no reason to use it...
1.2
1,331
https://docs.python.org/{python_version}/python-ext/node25.html
Building a Dynamically Loadable Module
--- node27.html node21.html node25.html node1.html --- # Building a Dynamically Loadable Module Since there are three styles of dynamic loading, there are also three groups of instructions for building a dynamically loadable module. Instructions common for all three styles are given first. Assuming your module is calle...
1.2
1,335
https://docs.python.org/{python_version}/python-ext/node26.html
Shared Libraries
--- node28.html node26.html node26.html node1.html --- ## Shared Libraries You must link the `.o' file to produce a shared library. This is done using a special invocation of the Unix loader/linker, ld(1). Unfortunately the invocation differs slightly per system. On SunOS 4, use ```text ld spammodule.o -o spammodule.so...
1.2
878
https://docs.python.org/{python_version}/python-ext/node27.html
SGI IRIX 4 Dynamic Loading
--- node29.html node26.html node27.html node1.html --- ## SGI IRIX 4 Dynamic Loading IMPORTANT: You must compile your extension module with the additional C flag `-G0' (or `-G 0'). This instruct the assembler to generate position-independent code. You don't need to link the resulting ``spammodule.o`' file; just copy it...
1.2
1,268
https://docs.python.org/{python_version}/python-ext/node28.html
GNU Dynamic Loading
--- node30.html node26.html node28.html node1.html --- ## GNU Dynamic Loading Just copy ``spammodule.o`' into a directory along the Python module search path. If your extension modules uses additional system libraries, you must create a file ``spammodule.libs`' in the same directory as the ``spammodule.o`'. This file s...
1.2
469
https://docs.python.org/{python_version}/python-ext/node29.html
Introduction
--- node4.html node2.html node2.html node1.html --- # Introduction It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can't be done directly in Python: they can implement new built-in object types, and they can call C library functions ...
1.2
770
https://docs.python.org/{python_version}/python-ext/node3.html
About this document ...
--- ext.html node29.html node1.html --- # About this document ... Extending and Embedding the Python Interpreter This document was generated using the LaTeX2HTML (http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html) translator Version 95.1 (Fri Jan 20 1995) Copyright © 1993, 1994, Nikos Drakos (http://...
1.2
605
https://docs.python.org/{python_version}/python-ext/node30.html
A Simple Example
--- node5.html node2.html node3.html node1.html --- # A Simple Example Let's create an extension module called `spam' (the favorite food of Monty Python fans...) and let's say we want to create a Python interface to the C library function `system()`.footnode.html#522 This function takes a null-terminated character stri...
1.2
3,349
https://docs.python.org/{python_version}/python-ext/node4.html
Intermezzo: Errors and Exceptions
--- node6.html node2.html node4.html node1.html --- # Intermezzo: Errors and Exceptions An important convention throughout the Python interpreter is the following: when a function fails, it should set an exception condition and return an error value (usually a `NULL` pointer). Exceptions are stored in a static global v...
1.2
5,544
https://docs.python.org/{python_version}/python-ext/node5.html
Back to the Example
--- node7.html node2.html node5.html node1.html --- # Back to the Example Going back to our example function, you should now be able to understand this statement: ```text if (!PyArg_ParseTuple(args, "s", &command)) return NULL; ``` It returns `NULL` (the error indicator for functions returning object pointers) if an er...
1.2
1,739
https://docs.python.org/{python_version}/python-ext/node6.html
The Module's Method Table and Initialization Function
--- node8.html node2.html node6.html node1.html --- # The Module's Method Table and Initialization Function I promised to show how `spam_system()` is called from Python programs. First, we need to list its name and address in a ``method table'': ```text static PyMethodDef SpamMethods[] = { ... {"system", spam_system, 1...
1.2
1,476
https://docs.python.org/{python_version}/python-ext/node7.html
Compilation and Linkage
--- node9.html node2.html node7.html node1.html --- # Compilation and Linkage There are two more things to do before you can use your new extension: compiling and linking it with the Python system. If you use dynamic loading, the details depend on the style of dynamic loading your system uses; see the chapter on Dynami...
1.2
1,213
https://docs.python.org/{python_version}/python-ext/node8.html
Calling Python Functions From C
--- node10.html node2.html node8.html node1.html --- # Calling Python Functions From C So far we have concentrated on making C functions callable from Python. The reverse is also useful: calling Python functions from C. This is especially the case for libraries that support so-called ``callback'' functions. If a C inte...
1.2
4,996
https://docs.python.org/{python_version}/python-ext/node9.html
__builtin__ -- Python library reference
__builtin__ -- Python library reference Prev: imp (imp.html) Top: Top (top.html) # 3.9. Built-in Module `__builtin__` This module provides direct access to all `built-in' identifiers of Python; e.g. `__builtin__.open` is the full name for the built-in function `open`. See the section on Built-in Functions in the previ...
1.2
332
https://docs.python.org/{python_version}/python-lib/__builtin__.html
__main__ -- Python library reference
__main__ -- Python library reference Prev: __builtin__ (__builtin__.html) Top: Top (top.html) # 3.10. Built-in Module `__main__` This module represents the (otherwise anonymous) scope in which the interpreter's main program executes --- commands read either from standard input or from a script file.
1.2
300
https://docs.python.org/{python_version}/python-lib/__main__.html
aifc -- Python library reference
aifc -- Python library reference Prev: imageop (imageop.html) Top: Top (top.html) # 12.3. Standard Module `aifc` This module provides support for reading and writing AIFF and AIFF-C files. AIFF is Audio Interchange File Format, a format for storing digital audio samples in a file. AIFF-C is a newer version of the for...
1.2
1,623
https://docs.python.org/{python_version}/python-lib/aifc.html
al -- Python library reference
al -- Python library reference Prev: SGI IRIX Specific Services (sgi_irix_specific_services.html) Top: Top (top.html) # 16.1. Built-in Module `al` This module provides access to the audio facilities of the SGI Indy and Indigo workstations. See section 3A of the IRIX man pages for details. You'll need to read those ma...
1.2
1,222
https://docs.python.org/{python_version}/python-lib/al.html
AL (uppercase) -- Python library reference
AL (uppercase) -- Python library reference Prev: al (al.html) Top: Top (top.html) # 16.2. Standard Module `AL` This module defines symbolic constants needed to use the built-in module `al` (see above); they are equivalent to those defined in the C header file <audio.h> except that the name prefix `AL_' is omitted. Rea...
1.2
397
https://docs.python.org/{python_version}/python-lib/al__uppercase_.html
alias objects -- Python library reference
alias objects -- Python library reference Prev: FSSpec objects (fsspec_objects.html) Top: Top (top.html) ## 14.6.2. alias objects Note that it is currently not possible to directly manipulate a resource as an alias object. Hence, after calling Update or after Resolve indicates that the alias has changed the Python prog...
1.2
409
https://docs.python.org/{python_version}/python-lib/alias_objects.html
array -- Python library reference
array -- Python library reference Prev: whrandom (whrandom.html) Top: Top (top.html) # 5.4. Built-in Module `array` This module defines a new object type which can efficiently represent an array of basic values: characters, integers, floating point numbers. Arrays are sequence types and behave very much like lists, ex...
1.2
1,230
https://docs.python.org/{python_version}/python-lib/array.html
Audio Device Objects -- Python library reference
Audio Device Objects -- Python library reference Prev: sunaudiodev (sunaudiodev.html) Top: Top (top.html) ## 17.1.1. Audio Device Objects The audio device objects are returned by `open` define the following methods (except `control` objects which only provide getinfo, setinfo and drain): There is a companion module, `S...
1.2
707
https://docs.python.org/{python_version}/python-lib/audio_device_objects.html
audioop -- Python library reference
audioop -- Python library reference Prev: Multimedia Services (multimedia_services.html) Top: Top (top.html) # 12.1. Built-in Module `audioop` The `audioop` module contains some useful operations on sound fragments. It operates on sound fragments consisting of signed integer samples 8, 16 or 32 bits wide, stored in Pyt...
1.2
1,969
https://docs.python.org/{python_version}/python-lib/audioop.html
Bit-string Operations -- Python library reference
Bit-string Operations -- Python library reference Prev: Numeric Types (numeric_types.html) Top: Top (top.html) ### 2.1.4.1. Bit-string Operations on Integer Types Plain and long integer types support additional operations that make sense only for bit-strings. Negative numbers are treated as their 2's complement value ...
1.2
790
https://docs.python.org/{python_version}/python-lib/bit-string_operations.html
Bitmap Objects -- Python library reference
Bitmap Objects -- Python library reference Prev: Menu Objects (menu_objects.html) Top: Top (top.html) ## 15.1.5. Bitmap Objects A bitmap represents a rectangular array of bits. The top left bit has coordinate (0, 0). A bitmap can be drawn with the `bitmap` method of a drawing object. Bitmaps are currently not available...
1.2
373
https://docs.python.org/{python_version}/python-lib/bitmap_objects.html
Boolean Operations -- Python library reference
Boolean Operations -- Python library reference Prev: Truth Value Testing (truth_value_testing.html) Top: Top (top.html) ## 2.1.2. Boolean Operations These are the Boolean operations, ordered by ascending priority: Notes:
1.2
221
https://docs.python.org/{python_version}/python-lib/boolean_operations.html
Built-in Functions -- Python library reference
Built-in Functions -- Python library reference Prev: Exceptions (exceptions.html) Top: Top (top.html) # 2.3. Built-in Functions The Python interpreter has a number of functions built into it that are always available. They are listed here in alphabetical order. ## ---------- Footnotes ---------- (1) (#footnoteref1) It...
1.2
1,032
https://docs.python.org/{python_version}/python-lib/built-in_functions.html
Built-in Objects -- Python library reference
Built-in Objects -- Python library reference Prev: Introduction (introduction.html) Top: Top (top.html) # 2. Built-in Types, Exceptions and Functions Names for built-in exceptions and functions are found in a separate symbol table. This table is searched last when the interpreter looks up the meaning of a name, so loc...
1.2
1,101
https://docs.python.org/{python_version}/python-lib/built-in_objects.html
Calibration -- Python library reference
Calibration -- Python library reference Prev: Limitations (limitations.html) Top: Top (top.html) # 10.7. Calibration The profiler class has a hard coded constant that is added to each event handling time to compensate for the overhead of calling the time function, and socking away the results. The following procedure ...
1.2
1,802
https://docs.python.org/{python_version}/python-lib/calibration.html
cd -- Python library reference
cd -- Python library reference Prev: AL (uppercase) (al__uppercase_.html) Top: Top (top.html) # 16.3. Built-in Module `cd` This module provides an interface to the Silicon Graphics CD library. It is available only on Silicon Graphics systems. The way the library works is as follows. A program opens the CD-ROM device wi...
1.2
1,686
https://docs.python.org/{python_version}/python-lib/cd.html
cgi -- Python library reference
cgi -- Python library reference Prev: Internet and WWW (internet_and_www.html) Top: Top (top.html) # 11.1. Standard Module `cgi` This module makes it easy to write Python scripts that run in a WWW server using the Common Gateway Interface. It was written by Michael McLay and subsequently modified by Steve Majewski and...
1.2
2,337
https://docs.python.org/{python_version}/python-lib/cgi.html
CGI Example -- Python library reference
CGI Example -- Python library reference Prev: cgi (cgi.html) Top: Top (top.html) ## 11.1.1. Example This example assumes that you have a WWW server up and running, e.g. NCSA's `httpd`. Place the following file in a convenient spot in the WWW server's directory tree. E.g., if you place it in the subdirectory test of the...
1.2
1,533
https://docs.python.org/{python_version}/python-lib/cgi_example.html
Classes and Instances -- Python library reference
Classes and Instances -- Python library reference Prev: Modules (modules.html) Top: Top (top.html) ### 2.1.7.2. Classes and Class Instances (See Chapters 3 and 7 of the Python Reference Manual for these.)
1.2
204
https://docs.python.org/{python_version}/python-lib/classes_and_instances.html
Code Objects -- Python library reference
Code Objects -- Python library reference Prev: Methods (methods.html) Top: Top (top.html) ### 2.1.7.5. Code Objects Code objects are used by the implementation to represent ``pseudo-compiled'' executable Python code such as a function body. They differ from function objects because they don't contain a reference to the...
1.2
690
https://docs.python.org/{python_version}/python-lib/code_objects.html
Comparisons -- Python library reference
Comparisons -- Python library reference Prev: Boolean Operations (boolean_operations.html) Top: Top (top.html) ## 2.1.3. Comparisons Comparison operations are supported by all objects. They all have the same priority (which is higher than that of the Boolean operations). Comparisons can be chained arbitrarily, e.g. `x...
1.2
1,255
https://docs.python.org/{python_version}/python-lib/comparisons.html
Concept Index -- Python library reference
Concept Index -- Python library reference Prev: Module Index (module_index.html) Top: Top (top.html) # Concept Index
1.2
116
https://docs.python.org/{python_version}/python-lib/concept_index.html
Configuration Objects -- Python library reference
Configuration Objects -- Python library reference Prev: al (al.html) Top: Top (top.html) ## 16.1.1. Configuration Objects Configuration objects (returned by `al.newconfig()` have the following methods:
1.2
201
https://docs.python.org/{python_version}/python-lib/configuration_objects.html
connection object -- Python library reference
connection object -- Python library reference Prev: ctb (ctb.html) Top: Top (top.html) ## 14.3.1. connection object For all connection methods that take a timeout argument, a value of `-1` is indefinite, meaning that the command runs to completion.
1.2
248
https://docs.python.org/{python_version}/python-lib/connection_object.html
console window object -- Python library reference
console window object -- Python library reference Prev: macconsole options object (macconsole_options_object.html) Top: Top (top.html) ## 14.4.2. console window object
1.2
167
https://docs.python.org/{python_version}/python-lib/console_window_object.html
copy -- Python library reference
copy -- Python library reference Prev: shelve (shelve.html) Top: Top (top.html) # 3.6. Standard Module `copy` This module provides generic (shallow and deep) copying operations. Interface summary: For module specific errors, `copy.error` is raised. The difference between shallow and deep copying is only relevant for co...
1.2
1,706
https://docs.python.org/{python_version}/python-lib/copy.html
Cryptographic Services -- Python library reference
Cryptographic Services -- Python library reference Prev: Multimedia Services (multimedia_services.html) Top: Top (top.html) # 13. Cryptographic Services The modules described in this chapter implement various algorithms of a cryptographic nature. They are available at the discretion of the installation. Here's an ove...
1.2
716
https://docs.python.org/{python_version}/python-lib/cryptographic_services.html
ctb -- Python library reference
ctb -- Python library reference Prev: macpath (macpath.html) Top: Top (top.html) # 14.3. Built-in Module `ctb` This module provides a partial interface to the Macintosh Communications Toolbox. Currently, only Connection Manager tools are supported. It may not be available in all Mac Python versions. ## Menu
1.2
309
https://docs.python.org/{python_version}/python-lib/ctb.html
dbm -- Python library reference
dbm -- Python library reference Prev: grp (grp.html) Top: Top (top.html) # 8.5. Built-in Module `dbm` Dbm provides python programs with an interface to the unix `ndbm` database library. Dbm objects are of the mapping type, so they can be handled just like objects of the built-in dictionary type, except that keys and v...
1.2
463
https://docs.python.org/{python_version}/python-lib/dbm.html
Debugger Commands -- Python library reference
Debugger Commands -- Python library reference Prev: The Python Debugger (the_python_debugger.html) Top: Top (top.html) # 9.1. Debugger Commands The debugger recognizes the following commands. Most commands can be abbreviated to one or two letters; e.g. ```h(elp)`'' means that either ```h`'' or ```help`'' can be used t...
1.2
1,298
https://docs.python.org/{python_version}/python-lib/debugger_commands.html
Deterministic Profiling -- Python library reference
Deterministic Profiling -- Python library reference Prev: Instant Users Manual (instant_users_manual.html) Top: Top (top.html) # 10.4. What Is Deterministic Profiling? Deterministic profiling is meant to reflect the fact that all function call, function return, and exception events are monitored, and precise timings ar...
1.2
1,847
https://docs.python.org/{python_version}/python-lib/deterministic_profiling.html
dnr result object -- Python library reference
dnr result object -- Python library reference Prev: macdnr (macdnr.html) Top: Top (top.html) ## 14.5.1. dnr result object Since the DNR calls all execute asynchronously you do not get the results back immediately. Instead, you get a dnr result object. You can check this object to see whether the query is complete, an...
1.2
751
https://docs.python.org/{python_version}/python-lib/dnr_result_object.html
Drawing Objects -- Python library reference
Drawing Objects -- Python library reference Prev: Window Objects (window_objects.html) Top: Top (top.html) ## 15.1.3. Drawing Objects Drawing objects are created exclusively by the window method `begindrawing()`. Only one drawing object can exist at any given time; the drawing object must be deleted to finish drawing. ...
1.2
427
https://docs.python.org/{python_version}/python-lib/drawing_objects.html
Examples -- Python library reference
Examples -- Python library reference Prev: imp (imp.html) Top: Top (top.html) ## 3.8.1. Examples The following function emulates the default import statement:
1.2
158
https://docs.python.org/{python_version}/python-lib/examples.html
Exceptions -- Python library reference
Exceptions -- Python library reference Prev: Types (types.html) Top: Top (top.html) # 2.2. Built-in Exceptions Exceptions are string objects. Two distinct string objects with the same value are different exceptions. This is done to force programmers to use exception names rather than their string value when specifyin...
1.2
1,101
https://docs.python.org/{python_version}/python-lib/exceptions.html
fcntl -- Python library reference
fcntl -- Python library reference Prev: TERMIOS (termios.html) Top: Top (top.html) # 8.9. Built-in Module `fcntl` This module performs file control and I/O control on file descriptors. It is an interface to the fcntl() and ioctl() UNIX routines. File descriptors can be obtained with the fileno() method of a file or soc...
1.2
788
https://docs.python.org/{python_version}/python-lib/fcntl.html
File Objects -- Python library reference
File Objects -- Python library reference Prev: The Null Object (the_null_object.html) Top: Top (top.html) ### 2.1.7.8. File Objects File objects are implemented using C's `stdio` package and can be created with the built-in function `open()` described under Built-in Functions below. They are also returned by some othe...
1.2
1,110
https://docs.python.org/{python_version}/python-lib/file_objects.html
fl -- Python library reference
fl -- Python library reference Prev: cd (cd.html) Top: Top (top.html) # 16.4. Built-in Module `fl` This module provides an interface to the FORMS Library by Mark Overmars. The source for the library can be retrieved by anonymous ftp from host `ftp.cs.ruu.nl', directory SGI/FORMS. It was last tested with version 2.0b....
1.2
1,670
https://docs.python.org/{python_version}/python-lib/fl.html
FL (uppercase) -- Python library reference
FL (uppercase) -- Python library reference Prev: fl (fl.html) Top: Top (top.html) # 16.5. Standard Module `FL` This module defines symbolic constants needed to use the built-in module `fl` (see above); they are equivalent to those defined in the C header file <forms.h> except that the name prefix `FL_' is omitted. Rea...
1.2
397
https://docs.python.org/{python_version}/python-lib/fl__uppercase_.html
FL Functions -- Python library reference
FL Functions -- Python library reference Prev: fl (fl.html) Top: Top (top.html) ## 16.4.1. Functions Defined in Module `fl` Module `fl` defines the following functions. For more information about what they do, see the description of the equivalent C function in the FORMS documentation:
1.2
287
https://docs.python.org/{python_version}/python-lib/fl_functions.html
flp -- Python library reference
flp -- Python library reference Prev: FL (uppercase) (fl__uppercase_.html) Top: Top (top.html) # 16.6. Standard Module `flp` This module defines functions that can read form definitions created by the `form designer' (`fdesign`) program that comes with the FORMS library (see module `fl` above). For now, see the file fl...
1.2
435
https://docs.python.org/{python_version}/python-lib/flp.html
fm -- Python library reference
fm -- Python library reference Prev: flp (flp.html) Top: Top (top.html) # 16.7. Built-in Module `fm` This module provides access to the IRIS Font Manager library. It is available only on Silicon Graphics machines. See also: 4Sight User's Guide, Section 1, Chapter 5: Using the IRIS Font Manager. This is not yet a full i...
1.2
648
https://docs.python.org/{python_version}/python-lib/fm.html
Form Objects -- Python library reference
Form Objects -- Python library reference Prev: FL Functions (fl_functions.html) Top: Top (top.html) ## 16.4.2. Form Objects Form objects (returned by `fl.make_form()` above) have the following methods. Each method corresponds to a C function whose name is prefixed with `fl_'; and whose first argument is a form pointer...
1.2
698
https://docs.python.org/{python_version}/python-lib/form_objects.html
FORMS Objects -- Python library reference
FORMS Objects -- Python library reference Prev: Form Objects (form_objects.html) Top: Top (top.html) ## 16.4.3. FORMS Objects Besides methods specific to particular kinds of FORMS objects, all FORMS objects also have the following methods: FORMS objects have these data attributes; see the FORMS documentation:
1.2
310
https://docs.python.org/{python_version}/python-lib/forms_objects.html
FSSpec objects -- Python library reference
FSSpec objects -- Python library reference Prev: macfs (macfs.html) Top: Top (top.html) ## 14.6.1. FSSpec objects
1.2
113
https://docs.python.org/{python_version}/python-lib/fsspec_objects.html
FTP Objects -- Python library reference
FTP Objects -- Python library reference Prev: ftplib (ftplib.html) Top: Top (top.html) ## 11.4.1. FTP Objects FTP instances have the following methods:
1.2
151
https://docs.python.org/{python_version}/python-lib/ftp_objects.html
ftplib -- Python library reference
ftplib -- Python library reference Prev: httplib (httplib.html) Top: Top (top.html) # 11.4. Standard Module `ftplib` This module defines the class `FTP` and a few related items. The `FTP` class implements the client side of the FTP protocol. You can use this to write Python programs that perform a variety of automate...
1.2
613
https://docs.python.org/{python_version}/python-lib/ftplib.html
Functions -- Python library reference
Functions -- Python library reference Prev: Classes and Instances (classes_and_instances.html) Top: Top (top.html) ### 2.1.7.3. Functions Function objects are created by function definitions. The only operation on a function object is to call it: `func ( argument-list )`. There are really two flavors of function objec...
1.2
786
https://docs.python.org/{python_version}/python-lib/functions.html
gdbm -- Python library reference
gdbm -- Python library reference Prev: dbm (dbm.html) Top: Top (top.html) # 8.6. Built-in Module `gdbm` Gdbm provides python programs with an interface to the GNU `gdbm` database library. Gdbm objects are of the mapping type, so they can be handled just like objects of the built-in dictionary type, except that keys an...
1.2
536
https://docs.python.org/{python_version}/python-lib/gdbm.html
Generic Operating System Services -- Python library reference
Generic Operating System Services -- Python library reference Prev: Miscellaneous Services (miscellaneous_services.html) Top: Top (top.html) # 6. Generic Operating System Services The modules described in this chapter provide interfaces to operating system features that are available on (almost) all operating systems, ...
1.2
499
https://docs.python.org/{python_version}/python-lib/generic_operating_system_services.html
getopt -- Python library reference
getopt -- Python library reference Prev: time (time.html) Top: Top (top.html) # 6.3. Standard Module `getopt` This module helps scripts to parse the command line arguments in `sys.argv`. It uses the same conventions as the UNIX `getopt()` function (including the special meanings of arguments of the form `-' and `--'). ...
1.2
1,537
https://docs.python.org/{python_version}/python-lib/getopt.html
gl -- Python library reference
gl -- Python library reference Prev: fm (fm.html) Top: Top (top.html) # 16.8. Built-in Module `gl` This module provides access to the Silicon Graphics Graphics Library. It is available only on Silicon Graphics machines. Warning: Some illegal calls to the GL library cause the Python interpreter to dump core. In particul...
1.2
1,752
https://docs.python.org/{python_version}/python-lib/gl.html
GL and DEVICE -- Python library reference
GL and DEVICE -- Python library reference Prev: gl (gl.html) Top: Top (top.html) # 16.9. Standard Modules `GL` and `DEVICE` These modules define the constants used by the Silicon Graphics Graphics Library that C programmers find in the header files <gl/gl.h> and <gl/device.h>. Read the module source files for details.
1.2
319
https://docs.python.org/{python_version}/python-lib/gl_and_device.html
gopherlib -- Python library reference
gopherlib -- Python library reference Prev: ftplib (ftplib.html) Top: Top (top.html) # 11.5. Standard Module `gopherlib` This module provides a minimal implementation of client side of the the Gopher protocol. It is used by the module `urllib` to handle URLs that use the Gopher protocol. The module defines the followi...
1.2
788
https://docs.python.org/{python_version}/python-lib/gopherlib.html
grp -- Python library reference
grp -- Python library reference Prev: pwd (pwd.html) Top: Top (top.html) # 8.4. Built-in Module `grp` This module provides access to the UNIX group database. It is available on all UNIX versions. Group database entries are reported as 4-tuples containing the following items from the group database (see <grp.h>), in ord...
1.2
679
https://docs.python.org/{python_version}/python-lib/grp.html
HotProfile Class -- Python library reference
HotProfile Class -- Python library reference Prev: OldProfile Class (oldprofile_class.html) Top: Top (top.html) ## 10.8.2. HotProfile Class This profiler is the fastest derived profile example. It does not calculate caller-callee relationships, and does not calculate cumulative time under a function. It only calculat...
1.2
545
https://docs.python.org/{python_version}/python-lib/hotprofile_class.html
How It Works -- Python library reference
How It Works -- Python library reference Prev: Debugger Commands (debugger_commands.html) Top: Top (top.html) # 9.2. How It Works Some changes were made to the interpreter: - • sys.settrace(func) sets the global trace function • there can also a local trace function (see later) Trace functions have three arguments: (fr...
1.2
733
https://docs.python.org/{python_version}/python-lib/how_it_works.html
htmllib -- Python library reference
htmllib -- Python library reference Prev: urlparse (urlparse.html) Top: Top (top.html) # 11.8. Standard Module `htmllib` This module defines a number of classes which can serve as a basis for parsing text files formatted in HTML (HyperText Mark-up Language). The classes are not directly concerned with I/O --- the have ...
1.2
3,145
https://docs.python.org/{python_version}/python-lib/htmllib.html
HTTP Example -- Python library reference
HTTP Example -- Python library reference Prev: HTTP Objects (http_objects.html) Top: Top (top.html) ## 11.3.2. Example Here is an example session:
1.2
146
https://docs.python.org/{python_version}/python-lib/http_example.html
HTTP Objects -- Python library reference
HTTP Objects -- Python library reference Prev: httplib (httplib.html) Top: Top (top.html) ## 11.3.1. HTTP Objects `HTTP` instances have the following methods:
1.2
158
https://docs.python.org/{python_version}/python-lib/http_objects.html
httplib -- Python library reference
httplib -- Python library reference Prev: urllib (urllib.html) Top: Top (top.html) # 11.3. Standard Module `httplib` This module defines a class which implements the client side of the HTTP protocol. It is normally not used directly --- the module `urllib` uses it to handle URLs that use HTTP. The module defines one c...
1.2
1,310
https://docs.python.org/{python_version}/python-lib/httplib.html
imageop -- Python library reference
imageop -- Python library reference Prev: audioop (audioop.html) Top: Top (top.html) # 12.2. Built-in Module `imageop` The `imageop` module contains some useful operations on images. It operates on images consisting of 8 or 32 bit pixels stored in Python strings. This is the same format as used by `gl.lrectwrite` and ...
1.2
399
https://docs.python.org/{python_version}/python-lib/imageop.html
imgfile -- Python library reference
imgfile -- Python library reference Prev: GL and DEVICE (gl_and_device.html) Top: Top (top.html) # 16.10. Built-in Module `imgfile` The imgfile module allows python programs to access SGI imglib image files (also known as .rgb files). The module is far from complete, but is provided anyway since the functionality that...
1.2
458
https://docs.python.org/{python_version}/python-lib/imgfile.html
imp -- Python library reference
imp -- Python library reference Prev: marshal (marshal.html) Top: Top (top.html) # 3.8. Built-in Module `imp` This module provides an interface to the mechanisms used to implement the `import` statement. It defines the following constants and functions: The following constants with integer values, defined in the modul...
1.2
391
https://docs.python.org/{python_version}/python-lib/imp.html
Instant Users Manual -- Python library reference
Instant Users Manual -- Python library reference Prev: Profiler Changes (profiler_changes.html) Top: Top (top.html) # 10.3. Instant Users Manual This section is provided for users that ``don't want to read the manual.'' It provides a very brief overview, and allows a user to rapidly perform profiling on an existing app...
1.2
2,942
https://docs.python.org/{python_version}/python-lib/instant_users_manual.html
Internal Objects -- Python library reference
Internal Objects -- Python library reference Prev: File Objects (file_objects.html) Top: Top (top.html) ### 2.1.7.9. Internal Objects (See the Python Reference Manual for these.)
1.2
178
https://docs.python.org/{python_version}/python-lib/internal_objects.html
Internet and WWW -- Python library reference
Internet and WWW -- Python library reference Prev: The Python Profiler (the_python_profiler.html) Top: Top (top.html) # 11. Internet and WWW Services The modules described in this chapter provide various services to World-Wide Web (WWW) clients and/or services, and a few modules related to news and email. They are all...
1.2
523
https://docs.python.org/{python_version}/python-lib/internet_and_www.html
Introduction -- Python library reference
Introduction -- Python library reference Prev: Top (top.html) Top: Top (top.html) # 1. Introduction The ``Python library'' contains several different kinds of components. It contains data types that would normally be considered part of the ``core'' of a language, such as numbers and lists. For these types, the Python l...
1.2
2,597
https://docs.python.org/{python_version}/python-lib/introduction.html
End of preview. Expand in Data Studio

Python Docs 2004

Original dump: https://www.python.org/ftp/python/doc/

Python Docs 2004 is a filtered and cleaned collection of Python documentation from every major Python release published before 2004.

Stats

Version Size Lines
2.3 2.2MB 1215
2.2 1.7MB 1142
2.1 1.3MB 891
2.0 1.2MB 895
1.6 1MB 720
1.5 837KB 449
1.4 744KB 397
1.3 569KB 408
1.2 513KB 384
Total 10.1MB 6501

Notice

This dataset is a filtered and cleaned version of the original Python documentation. We do not claim ownership of the original content. Copyright remains with the Python Software Foundation and other contributors. Redistribution is subject to the original license.

License

Python Software Foundation License Version 2.

Downloads last month
-