import tushare
import time
def getdata(share):
data=tushare.get_realtime_quotes(share.code)
share.name=data.loc[0][0]
share.price=float(data.loc[0][3])
share.high=data.loc[0][4]
share.low=data.loc[0][5]
share.volumn=data.loc[0][8]
share.amount=data.loc[0][9]
share.pre_open=data.loc[0][1]
share.pre_close=data.loc[0][2]
share.time1=data.loc[0][30]
share.describe="股票名:"+share.name,"当前价格:"+str(share.price)
return share
class share():
def __init__(self,code,buy,sale):
self.name=""
self.price=""
self.high=""
self.low=""
self.volumn=