Codes:
import cx_Oracle
import cx_Oracle
connection =
cx_Oracle.connect("vpxadmin55/oracle")
cursor = connection.cursor()
select_ver = cursor.execute("select * from
vpx_version") select_convert = list() for row in cursor:
select_convert.append(row)
print "vCenter version : ", row[0], row[1]
print "vCenter version 2: ", row
print "vCenter version with str: ", str(row)
print "vCenter version 2: ", row
print "vCenter version with str: ", str(row)
Output
vCenter version :
550 VirtualCenter Database 5.5
vCenter version 2: (550, u'VirtualCenter Database 5.5')
vCenter version 2: (550, u'VirtualCenter Database 5.5')
vCenter version with str: (550, u'VirtualCenter Database 5.5')
u' is the UNICODE indicator.