#coding=utf-8
import threading
import time
import cx_Oracle
from pprint import pprint
import csv
import sys
reload(sys)
table_name = "dbtest.csv"
sys.setdefaultencoding('utf-8')
if len(sys.argv) != 3:
sys.exit()
script=sys.argv[0]
x=sys.argv[1]
print type(x)
y=sys.argv[2]
owner = "outdata"
dbuser='outdata'
dbpass='outdata'
dbip='10.2.231.60'
dbservice='outdata'
conn = cx_Oracle.connect(dbuser,dbpass,dbip+'/'+dbservice)
cursor = conn.cursor()
cursor.execute("SELECT TPP_DETAIL FROM TD_PRELOAN_REPORT_PLATFRDAL tlcb WHERE tlcb.TPP_REPORTID = :a AND tlcb.TPP_ITEMID = :b ",a=x,b=y)
#cursor.execute(None,{'a':x,'b':y,'c':z})
d={}
info = cursor.fetchall()
print info