<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
<link rel=
"STYLESHEET" href=
"dist.css" type='text/css'
/>
<link rel=
"SHORTCUT ICON" href=
"../icons/pyfav.png" type=
"image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index'
/>
<link rel=
"first" href=
"dist.html" title='Distributing Python Modules'
/>
<link rel='index' href='genindex.html' title='Index'
/>
<link rel='last' href='about.html' title='About this document...'
/>
<link rel='help' href='about.html' title='About this document...'
/>
<link rel=
"next" href=
"distutils-term.html" />
<link rel=
"prev" href=
"simple-example.html" />
<link rel=
"parent" href=
"intro.html" />
<link rel=
"next" href=
"distutils-term.html" />
<meta name='aesop' content='information'
/>
<title>1.3 General Python terminology
</title>
<div id='top-navigation-panel' xml:id='top-navigation-panel'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"1.2 A Simple Example"
href=
"simple-example.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"1. An Introduction to"
href=
"intro.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"1.4 Distutils-specific terminology"
href=
"distutils-term.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Distributing Python Modules
</td>
<td class='online-navigation'
><img src='../icons/blank.png'
border='
0' height='
32' alt='' width='
32'
/></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"simple-example.html">1.2 A Simple Example
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"intro.html">1. An Introduction to
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"distutils-term.html">1.4 Distutils-specific terminology
</A>
<!--End of Navigation Panel-->
<H1><A NAME=
"SECTION001300000000000000000"></A>
<A NAME=
"python-terms"></A>
1.3 General Python terminology
If you're reading this document, you probably have a good idea of what
modules, extensions, and so forth are. Nevertheless, just to be sure
that everyone is operating from a common starting point, we offer the
following glossary of common Python terms:
<DT><STRONG>module
</STRONG></DT>
<DD>the basic unit of code reusability in Python: a block of
code imported by some other code. Three types of modules concern us
here: pure Python modules, extension modules, and packages.
<DT><STRONG>pure Python module
</STRONG></DT>
<DD>a module written in Python and contained in a
single
<span class=
"file">.py
</span> file (and possibly associated
<span class=
"file">.pyc
</span> and/or
<span class=
"file">.pyo
</span> files). Sometimes referred to as a ``pure module.''
<DT><STRONG>extension module
</STRONG></DT>
<DD>a module written in the low-level language of
the Python implementation: C/C++ for Python, Java for Jython.
Typically contained in a single dynamically loadable pre-compiled
file, e.g. a shared object (
<span class=
"file">.so
</span>) file for Python extensions on
<span class=
"Unix">Unix
</span>, a DLL (given the
<span class=
"file">.pyd
</span> extension) for Python extensions
on Windows, or a Java class file for Jython extensions. (Note that
currently, the Distutils only handles C/C++ extensions for Python.)
<DT><STRONG>package
</STRONG></DT>
<DD>a module that contains other modules; typically contained
in a directory in the filesystem and distinguished from other
directories by the presence of a file
<span class=
"file">__init__.py
</span>.
<DT><STRONG>root package
</STRONG></DT>
<DD>the root of the hierarchy of packages. (This isn't
really a package, since it doesn't have an
<span class=
"file">__init__.py
</span>
file. But we have to call it something.) The vast majority of the
standard library is in the root package, as are many small, standalone
third-party modules that don't belong to a larger module collection.
Unlike regular packages, modules in the root package can be found in
many directories: in fact, every directory listed in
<code>sys.path
</code>
contributes modules to the root package.
<div class='online-navigation'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"1.2 A Simple Example"
href=
"simple-example.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"1. An Introduction to"
href=
"intro.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"1.4 Distutils-specific terminology"
href=
"distutils-term.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Distributing Python Modules
</td>
<td class='online-navigation'
><img src='../icons/blank.png'
border='
0' height='
32' alt='' width='
32'
/></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"simple-example.html">1.2 A Simple Example
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"intro.html">1. An Introduction to
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"distutils-term.html">1.4 Distutils-specific terminology
</A>
<span class=
"release-info">Release
2.4.2, documentation updated on
28 September
2005.
</span>
<!--End of Navigation Panel-->
See
<i><a href=
"about.html">About this document...
</a></i> for information on suggesting changes.