Python2.6 Cx_Oracle Linux下编译安装
时间:2010-12-20 来源:双宇
代码
[oracle@crmdevpdb ~]$ python
Python 2.6.4 (r264:75706, Dec 20 2010, 20:13:54)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle as oracle
>>> con=oracle.connect("SIEBEL/SIEBEL@DEVP")
>>> cur=con.cursor()
>>> cur.execute("select * from s_party")
<__builtin__.OracleCursor on <cx_Oracle.Connection to SIEBEL@DEVP>>
>>> res=cur.fetchone()
>>> for i in res:
... print i
...
1-3SFF
2010-02-01 16:32:09
1-J6N
2010-02-01 16:51:47
1-J6N
2
0
Organization
1-3SFF
Y
2010-02-01 16:52:41
User
Organization
?2
None
>>>
Python 2.6.4 (r264:75706, Dec 20 2010, 20:13:54)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle as oracle
>>> con=oracle.connect("SIEBEL/SIEBEL@DEVP")
>>> cur=con.cursor()
>>> cur.execute("select * from s_party")
<__builtin__.OracleCursor on <cx_Oracle.Connection to SIEBEL@DEVP>>
>>> res=cur.fetchone()
>>> for i in res:
... print i
...
1-3SFF
2010-02-01 16:32:09
1-J6N
2010-02-01 16:51:47
1-J6N
2
0
Organization
1-3SFF
Y
2010-02-01 16:52:41
User
Organization
?2
None
>>>
相关资源:
Python2.6.tar.bz2包
cx_Oracle.tar.gz包
相关阅读 更多 +