Error importing MySQLdb when embedding python
yohamed at concentric.net
Tue May 2 19:23:26 EDT 2000
I am trying to embed python in a C++ application. Here is the gist of the
handler.py is as follows:
When I do this, I get the following error:
moe: embed >./embedpython
Traceback (innermost last):
File "test2.py", line 3, in ?
line 19, in ?
: undefined symbol: PyType_Type
If I take out the "import MySQLdb" line, the problem goes away (duh). If I
run handler.py directly from the command-line it works fine so MySQLdb is
set up properly (I have written more complicated scripts that demonstrate it
working). I'm not really sure what the error message is telling me about
PyType_Type. Does anyone have any ideas what is going on? This is my first
real attempt at using Python so I may be attempting a bit much at first, but
I have a need for embedding and I would prefer to take this opportunity to
learn Python (as opposed to doing it in Perl which I know cold).
Thanks for any help!
-Moe (please cc: yohamed AT concentric DOT net)
More information about the Python-list