python \xb5\xe7\xc6\xb1\xc7\xb0\xd6\xc3\xd6\xf7\xbb\xfa

# !/usr/bin/env python
# -*- coding: utf-8 -*-
import cx_Oracle
from pprint import pprint
import csv
import time
import re
import binascii

conn = cx_Oracle.connect('tlcbuser/[email protected]/tlyy')
cursor = conn.cursor()
xsql="select * from tlcb_mon_device a where a.ipaddr='10.3.244.1'"
r = cursor.execute(xsql)
print r
arr=[]
for x in r:
 print x

C:\Python27\python.exe C:/Users/tlcb/PycharmProjects/untitled/a6.py
>
('DP_244.1', 'IBM AIX', '10.3.244.1', 'UTF-8', '\xb5\xe7\xc6\xb1\xc7\xb0\xd6\xc3\xd6\xf7\xbb\xfa', 'ECDS', '\xc2\xde\xba\xaf', '1', 'FTP')

# !/usr/bin/env python
# -*- coding: utf-8 -*-
import cx_Oracle
from pprint import pprint
import csv
import time
import re
import binascii

conn = cx_Oracle.connect('tlcbuser/[email protected]/tlyy')
cursor = conn.cursor()
xsql="select * from tlcb_mon_device a where a.ipaddr='10.3.244.1'"
r = cursor.execute(xsq

你可能感兴趣的:(python,高级编程)