• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* -*- C -*- ***********************************************
2 Copyright (c) 2000, BeOpen.com.
3 Copyright (c) 1995-2000, Corporation for National Research Initiatives.
4 Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
5 All rights reserved.
6 
7 See the file "Misc/COPYRIGHT" for information on usage and
8 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9 ******************************************************************/
10 
11 /* Module configuration */
12 
13 /* This file contains the table of built-in modules.
14    See init_builtin() in import.c. */
15 
16 #include "Python.h"
17 
18 extern void initarray(void);
19 extern void initaudioop(void);
20 extern void initbinascii(void);
21 extern void initcmath(void);
22 extern void initerrno(void);
23 extern void initimageop(void);
24 extern void initmath(void);
25 extern void initmd5(void);
26 extern void initnt(void);
27 extern void initos2(void);
28 extern void initoperator(void);
29 extern void initposix(void);
30 extern void initrgbimg(void);
31 extern void initsignal(void);
32 extern void initselect(void);
33 extern void init_socket(void);
34 extern void initstrop(void);
35 extern void initstruct(void);
36 extern void inittime(void);
37 extern void initthread(void);
38 extern void initcStringIO(void);
39 extern void initcPickle(void);
40 extern void initpcre(void);
41 #ifdef WIN32
42 extern void initmsvcrt(void);
43 #endif
44 
45 /* -- ADDMODULE MARKER 1 -- */
46 
47 extern void PyMarshal_Init(void);
48 extern void initimp(void);
49 
50 struct _inittab _PyImport_Inittab[] = {
51 
52         {"array", initarray},
53 #ifdef M_I386
54         {"audioop", initaudioop},
55 #endif
56         {"binascii", initbinascii},
57         {"cmath", initcmath},
58         {"errno", initerrno},
59 //        {"imageop", initimageop},
60         {"math", initmath},
61         {"md5", initmd5},
62 #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__)
63         {"nt", initnt}, /* Use the NT os functions, not posix */
64 #else
65 #if defined(PYOS_OS2)
66         {"os2", initos2},
67 #else
68         {"posix", initposix},
69 #endif
70 #endif
71         {"operator", initoperator},
72 //        {"rgbimg", initrgbimg},
73         {"signal", initsignal},
74 #ifdef USE_SOCKET
75         {"_socket", init_socket},
76         {"select", initselect},
77 #endif
78         {"strop", initstrop},
79         {"struct", initstruct},
80         {"time", inittime},
81 #ifdef WITH_THREAD
82         {"thread", initthread},
83 #endif
84         {"cStringIO", initcStringIO},
85         {"cPickle", initcPickle},
86         {"pcre", initpcre},
87 #ifdef WIN32
88         {"msvcrt", initmsvcrt},
89 #endif
90 
91 /* -- ADDMODULE MARKER 2 -- */
92 
93         /* This module "lives in" with marshal.c */
94         {"marshal", PyMarshal_Init},
95 
96         /* This lives it with import.c */
97         {"imp", initimp},
98 
99         /* These entries are here for sys.builtin_module_names */
100         {"__main__", NULL},
101         {"__builtin__", NULL},
102         {"sys", NULL},
103 
104         /* Sentinel */
105         {0, 0}
106 };
107