blob: 0a0b901ceed1af4fe3665c4a30e68d9651064eab [file] [log] [blame]
Andrew MacIntyre41d97d62002-02-17 05:23:30 +00001/* -*- C -*- ***********************************************
2Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3The Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI or Corporation for National Research Initiatives or
13CNRI not be used in advertising or publicity pertaining to
14distribution of the software without specific, written prior
15permission.
16
17While CWI is the initial source for this software, a modified version
18is made available by the Corporation for National Research Initiatives
19(CNRI) at the Internet address ftp://ftp.python.org.
20
21STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
22REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
23MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
24CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
25DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
26PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
27TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28PERFORMANCE OF THIS SOFTWARE.
29
30******************************************************************/
31
32/* Module configuration */
33
34/* This file contains the table of built-in modules.
35 See init_builtin() in import.c. */
36
37#include "Python.h"
38
Andrew MacIntyre51801232003-01-02 12:40:41 +000039extern void initos2();
40extern void initsignal();
41#ifdef WITH_THREAD
42extern void initthread();
43#endif
44#if !HAVE_DYNAMIC_LOADING
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000045extern void init_codecs();
46extern void init_curses();
47extern void init_curses_panel();
48extern void init_hotshot();
49extern void init_locale();
Andrew MacIntyre51801232003-01-02 12:40:41 +000050extern void init_random();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000051extern void init_sre();
Andrew MacIntyre51801232003-01-02 12:40:41 +000052extern void init_symtable();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000053extern void init_testcapi();
54extern void init_weakref();
55extern void initarray();
56extern void initbinascii();
Andrew MacIntyre51801232003-01-02 12:40:41 +000057extern void initbsddb185();
58extern void initbz2();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000059extern void initcPickle();
60extern void initcStringIO();
61extern void initcmath();
Andrew MacIntyre51801232003-01-02 12:40:41 +000062extern void initdatetime();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000063extern void initdl();
64extern void initerrno();
65extern void initfcntl();
66extern void initfpectl();
67extern void initfpetest();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000068extern void initimageop();
69extern void initmath();
70extern void initmd5();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000071extern void initoperator();
72extern void initparser();
73extern void initpcre();
74extern void initpwd();
75extern void initregex();
76extern void initrgbimg();
77extern void initrotor();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000078extern void initsha();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000079extern void initstrop();
80extern void initstruct();
81extern void inittermios();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000082extern void inittime();
83extern void inittiming();
84extern void initunicodedata();
85extern void initxreadlines();
Andrew MacIntyre4a79e362002-06-10 08:04:29 +000086extern void initxxsubtype();
Andrew MacIntyre51801232003-01-02 12:40:41 +000087extern void initzipimport();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000088extern void initzlib();
Andrew MacIntyre51801232003-01-02 12:40:41 +000089#ifdef USE_SOCKET
90extern void init_socket();
91extern void initselect();
92#endif
93#endif
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000094/* -- ADDMODULE MARKER 1 -- */
95
96extern void PyMarshal_Init();
97extern void initimp();
Andrew MacIntyre51801232003-01-02 12:40:41 +000098extern void initgc();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000099
100struct _inittab _PyImport_Inittab[] = {
101
Andrew MacIntyre51801232003-01-02 12:40:41 +0000102 {"os2", initos2},
103 {"signal", initsignal},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000104#ifdef WITH_THREAD
Andrew MacIntyre51801232003-01-02 12:40:41 +0000105 {"thread", initthread},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000106#endif
107#if !HAVE_DYNAMIC_LOADING
108 {"_codecs", init_codecs},
109 {"_curses", init_curses},
110 {"_curses_panel", init_curses_panel},
111 {"_hotshot", init_hotshot},
112 {"_locale", init_locale},
Andrew MacIntyre51801232003-01-02 12:40:41 +0000113 {"_random", init_random},
114 {"_sre", init_sre},
115 {"_symtable", init_symtable},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000116 {"_testcapi", init_testcapi},
117 {"_weakref", init_weakref},
118 {"array", initarray},
119 {"binascii", initbinascii},
Andrew MacIntyre51801232003-01-02 12:40:41 +0000120 {"bsddb185", initbsddb185},
121 {"bz2", initbz2},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000122 {"cPickle", initcPickle},
123 {"cStringIO", initcStringIO},
124 {"cmath", initcmath},
Andrew MacIntyre51801232003-01-02 12:40:41 +0000125 {"datetime", initdatetime},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000126 {"dl", initdl},
127 {"errno", initerrno},
128 {"fcntl", initfcntl},
129 {"fpectl", initfpectl},
130 {"fpetest", initfpetest},
131 {"imageop", initimageop},
132 {"math", initmath},
133 {"md5", initmd5},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000134 {"operator", initoperator},
135 {"parser", initparser},
136 {"pcre", initpcre},
137 {"pwd", initpwd},
138 {"regex", initregex},
139 {"rgbimg", initrgbimg},
140 {"rotor", initrotor},
141 {"sha", initsha},
142 {"strop", initstrop},
143 {"struct", initstruct},
144 {"termios", inittermios},
145 {"time", inittime},
146 {"timing", inittiming},
147 {"unicodedata", initunicodedata},
148 {"xreadlines", initxreadlines},
Andrew MacIntyre4a79e362002-06-10 08:04:29 +0000149 {"xxsubtype", initxxsubtype},
Andrew MacIntyre51801232003-01-02 12:40:41 +0000150 {"zipimport", initzipimport},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000151 {"zlib", initzlib},
152#ifdef USE_SOCKET
Andrew MacIntyre51801232003-01-02 12:40:41 +0000153 {"_socket", init_socket},
154 {"select", initselect},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000155#endif
156#endif
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000157/* -- ADDMODULE MARKER 2 -- */
158
Andrew MacIntyre51801232003-01-02 12:40:41 +0000159 /* This module "lives in" with marshal.c */
160 {"marshal", PyMarshal_Init},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000161
Andrew MacIntyre51801232003-01-02 12:40:41 +0000162 /* This lives it with import.c */
163 {"imp", initimp},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000164
Andrew MacIntyre51801232003-01-02 12:40:41 +0000165 /* These entries are here for sys.builtin_module_names */
166 {"__main__", NULL},
167 {"__builtin__", NULL},
168 {"sys", NULL},
169 {"exceptions", NULL},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000170
Andrew MacIntyre51801232003-01-02 12:40:41 +0000171 /* This lives in gcmodule.c */
172 {"gc", initgc},
173
174 /* Sentinel */
175 {0, 0}
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000176};