[XML-SIG] what's wrong with me ?
祝顺民
zhusm@neusoft.com
Fri, 14 Sep 2001 11:41:32 +0800
这是 MIME 格式的具有很多部分消息。
--Boundary_(ID_QJuJKTI5pvxuC/v+Ky5A1w)
Content-type: text/plain; charset=gb2312
Content-transfer-encoding: QUOTED-PRINTABLE
god help me ?please,see the below.
1 #include <stdio.h>
2 #include <string.h>
3 #include "Python.h"
4
5
6 int main(int argc,char **argv)
7 {
8
9 PyObject * item;
10 PyObject * POB0 =3D NULL, *POB1 =3D NULL;
11
12 Py_SetProgramName(argv[0]);//pass the programme'name to=
the python
13 Py_Initialize(); //initialize the python.
14
15 PyRun_SimpleString("print hello");
16 PyRun_SimpleString("from xml.dom.minidom import parse")=
;
17
18 printf("are you ok\n");
19 Py_Finalize();
20 return 1;
21 }
22
gcc is pass .
root@zhusm:/home/zhusm/pythontest# ./test
Traceback (most recent call last):
File "<string>", line 1, in ?
NameError: There is no variable named 'hello'
Traceback (most recent call last):
File "<string>", line 1, in ?
File "/usr/lib/python2.0/xml/dom/minidom.py", line 19, in ?
from StringIO import StringIO
File "/usr/lib/python2.0/StringIO.py", line 32, in ?
import errno
ImportError: /usr/lib/python2.0/errnomodule.so: undefined symbol: PyI=
nt_FromLong
are you ok
--Boundary_(ID_QJuJKTI5pvxuC/v+Ky5A1w)
Content-type: text/html; charset=gb2312
Content-transfer-encoding: QUOTED-PRINTABLE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb231=
2">
<META content=3D"MSHTML 6.00.2462.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#c0c0c0>
<DIV><FONT size=3D2> god help me ?please,see the below.</F=
ONT></DIV>
<DIV><FONT size=3D2> 1 #include=20
<stdio.h><BR> 2 #include=20
<string.h><BR> 3 #include=20
"Python.h"<BR> 4<BR> 5<BR> &=
nbsp; =20
6 int main(int argc,char **argv)<BR> 7 {<BR> &=
nbsp; =20
8<BR> 9 &n=
bsp;=20
PyObject * item;<BR> =20
10 PyObject * POB0 =
=3D NULL, *POB1=20
=3D NULL;<BR> 11<BR> =20
12 =20
Py_SetProgramName(argv[0]);//pass the programme'name to the=20
python<BR> 13 &n=
bsp;=20
Py_Initialize(); //initiali=
ze the=20
python.<BR> 14<BR> =20
15 PyRun_SimpleString=
("print=20
hello");<BR> 16 =
=20
PyRun_SimpleString("from xml.dom.minidom import parse");<BR> &nb=
sp;=20
17<BR> 18 =
=20
printf("are you ok\n");<BR> =20
19 =20
Py_Finalize();<BR> =20
20 return 1;<BR> =
; 21=20
}<BR> 22</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>gcc is pass .</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2><A=20
href=3D"mailto:root@zhusm:/home/zhusm/pythontest">root@zhusm:/home/zh=
usm/pythontest</A>#=20
=2E/test<BR>Traceback (most recent call last):<BR> File "<st=
ring>",=20
line 1, in ?<BR>NameError: There is no variable named 'hello'<BR>Trac=
eback (most=20
recent call last):<BR> File "<string>", line 1, in ?<BR>&=
nbsp; File=20
"/usr/lib/python2.0/xml/dom/minidom.py", line 19, in ?<BR>  =
; =20
=66rom StringIO import StringIO<BR> File "/usr/lib/python2.0/St=
ringIO.py",=20
line 32, in ?<BR> import errno<BR>ImportError:=20
/usr/lib/python2.0/errnomodule.so: undefined symbol: PyInt_FromLong<B=
R>are you=20
ok</FONT></DIV></BODY></HTML>
--Boundary_(ID_QJuJKTI5pvxuC/v+Ky5A1w)--