本文整理汇总了Python中Session.Session.marketSummarySocket方法的典型用法代码示例。如果您正苦于以下问题:Python Session.marketSummarySocket方法的具体用法?Python Session.marketSummarySocket怎么用?Python Session.marketSummarySocket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Session.Session
的用法示例。
在下文中一共展示了Session.marketSummarySocket方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from Session import Session [as 别名]
# 或者: from Session.Session import marketSummarySocket [as 别名]
# options
# for i in tmpInstList[2]:
# instList.append(i)
# print instList
print "total : " + str(len(instList))
# exit();
# #-- truncated for speeding up developement
# instList =instList[0:150];
# #-- end truncation
# index,credentials,fr,to
s = Session(users[lgIdx]['user'],users[lgIdx]['pwd'])
s.login()
socketMktSum = s.marketSummarySocket();
mktsumThread = threading.Thread(target=marketSumParser,args=(socketMktSum,))
mktsumThread.start()
lgIdx+=1
s = Session(users[lgIdx]['user'],users[lgIdx]['pwd'])
s.login()
socketTicker = s.tickerSocket();
tickerThread = threading.Thread(target=tickerParser,args=(socketTicker,))
tickerThread.start()
lgIdx+=1
# ---bypass for speeding up development
# np.save('tmpInstList.txt', instList)
# instList=np.load('tmpInstList.txt.npy')
# print len(instList)