blob: 6ffc15708c36e2626f2acd8c4eb5af7f0686670a [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
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000044extern void init_codecs();
Andrew MacIntyre631e87f2003-04-21 14:33:04 +000045extern void init_csv();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000046extern void init_locale();
Andrew MacIntyre51801232003-01-02 12:40:41 +000047extern void init_random();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000048extern void init_sre();
Andrew MacIntyre51801232003-01-02 12:40:41 +000049extern void init_symtable();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000050extern void init_weakref();
51extern void initarray();
52extern void initbinascii();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000053extern void initcPickle();
54extern void initcStringIO();
55extern void initcmath();
Andrew MacIntyre51801232003-01-02 12:40:41 +000056extern void initdatetime();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000057extern void initdl();
58extern void initerrno();
59extern void initfcntl();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000060extern void initimageop();
Andrew MacIntyred4c9b162003-04-21 14:28:01 +000061extern void inititertools();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000062extern void initmath();
63extern void initmd5();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000064extern void initoperator();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000065extern void initpcre();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000066extern void initregex();
67extern void initrgbimg();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000068extern void initsha();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000069extern void initstrop();
70extern void initstruct();
71extern void inittermios();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000072extern void inittime();
73extern void inittiming();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000074extern void initxreadlines();
Andrew MacIntyre4a79e362002-06-10 08:04:29 +000075extern void initxxsubtype();
Andrew MacIntyre51801232003-01-02 12:40:41 +000076extern void initzipimport();
Andrew MacIntyre631e87f2003-04-21 14:33:04 +000077#if !HAVE_DYNAMIC_LOADING
78extern void init_curses();
79extern void init_curses_panel();
80extern void init_hotshot();
81extern void init_testcapi();
82extern void initbsddb185();
83extern void initbz2();
84extern void initfpectl();
85extern void initfpetest();
86extern void initparser();
87extern void initpwd();
88extern void initrotor();
89extern void initunicodedata();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000090extern void initzlib();
Andrew MacIntyre51801232003-01-02 12:40:41 +000091#ifdef USE_SOCKET
92extern void init_socket();
93extern void initselect();
94#endif
95#endif
Andrew MacIntyre41d97d62002-02-17 05:23:30 +000096/* -- ADDMODULE MARKER 1 -- */
97
98extern void PyMarshal_Init();
99extern void initimp();
Andrew MacIntyre51801232003-01-02 12:40:41 +0000100extern void initgc();
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000101
102struct _inittab _PyImport_Inittab[] = {
103
Andrew MacIntyre51801232003-01-02 12:40:41 +0000104 {"os2", initos2},
105 {"signal", initsignal},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000106#ifdef WITH_THREAD
Andrew MacIntyre51801232003-01-02 12:40:41 +0000107 {"thread", initthread},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000108#endif
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000109 {"_codecs", init_codecs},
Andrew MacIntyre58f22cc2003-06-09 08:16:02 +0000110 {"_csv", init_csv},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000111 {"_locale", init_locale},
Andrew MacIntyre51801232003-01-02 12:40:41 +0000112 {"_random", init_random},
113 {"_sre", init_sre},
114 {"_symtable", init_symtable},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000115 {"_weakref", init_weakref},
116 {"array", initarray},
117 {"binascii", initbinascii},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000118 {"cPickle", initcPickle},
119 {"cStringIO", initcStringIO},
120 {"cmath", initcmath},
Andrew MacIntyre51801232003-01-02 12:40:41 +0000121 {"datetime", initdatetime},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000122 {"dl", initdl},
123 {"errno", initerrno},
124 {"fcntl", initfcntl},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000125 {"imageop", initimageop},
Andrew MacIntyred4c9b162003-04-21 14:28:01 +0000126 {"itertools", inititertools},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000127 {"math", initmath},
128 {"md5", initmd5},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000129 {"operator", initoperator},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000130 {"pcre", initpcre},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000131 {"regex", initregex},
132 {"rgbimg", initrgbimg},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000133 {"sha", initsha},
134 {"strop", initstrop},
135 {"struct", initstruct},
136 {"termios", inittermios},
137 {"time", inittime},
138 {"timing", inittiming},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000139 {"xreadlines", initxreadlines},
Andrew MacIntyre4a79e362002-06-10 08:04:29 +0000140 {"xxsubtype", initxxsubtype},
Andrew MacIntyre51801232003-01-02 12:40:41 +0000141 {"zipimport", initzipimport},
Andrew MacIntyre631e87f2003-04-21 14:33:04 +0000142#if !HAVE_DYNAMIC_LOADING
143 {"_curses", init_curses},
144 {"_curses_panel", init_curses_panel},
145 {"_hotshot", init_hotshot},
146 {"_testcapi", init_testcapi},
147 {"bsddb185", initbsddb185},
148 {"bz2", initbz2},
149 {"fpectl", initfpectl},
150 {"fpetest", initfpetest},
151 {"parser", initparser},
152 {"pwd", initpwd},
153 {"rotor", initrotor},
154 {"unicodedata", initunicodedata},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000155 {"zlib", initzlib},
156#ifdef USE_SOCKET
Andrew MacIntyre51801232003-01-02 12:40:41 +0000157 {"_socket", init_socket},
158 {"select", initselect},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000159#endif
160#endif
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000161/* -- ADDMODULE MARKER 2 -- */
162
Andrew MacIntyre51801232003-01-02 12:40:41 +0000163 /* This module "lives in" with marshal.c */
164 {"marshal", PyMarshal_Init},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000165
Andrew MacIntyre51801232003-01-02 12:40:41 +0000166 /* This lives it with import.c */
167 {"imp", initimp},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000168
Andrew MacIntyre51801232003-01-02 12:40:41 +0000169 /* These entries are here for sys.builtin_module_names */
170 {"__main__", NULL},
171 {"__builtin__", NULL},
172 {"sys", NULL},
173 {"exceptions", NULL},
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000174
Andrew MacIntyre51801232003-01-02 12:40:41 +0000175 /* This lives in gcmodule.c */
176 {"gc", initgc},
177
178 /* Sentinel */
179 {0, 0}
Andrew MacIntyre41d97d62002-02-17 05:23:30 +0000180};