From 0594e6dc46fee9849aa272684ac5422f9de261e1 Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 29 May 2018 13:43:06 +0200 Subject: [PATCH] Modernize vnpy/api/sec --- vnpy/api/sec/__init__.py | 7 +- vnpy/api/sec/pyscript/generate_data_type.py | 3 +- .../api/sec/pyscript/generate_md_functions.py | 5 +- vnpy/api/sec/pyscript/generate_struct.py | 3 +- .../api/sec/pyscript/generate_td_functions.py | 5 +- vnpy/api/sec/test/md_test.py | 86 ++-- vnpy/api/sec/test/td_test.py | 376 +++++++++--------- 7 files changed, 247 insertions(+), 238 deletions(-) diff --git a/vnpy/api/sec/__init__.py b/vnpy/api/sec/__init__.py index 58843bbd..98f521e9 100644 --- a/vnpy/api/sec/__init__.py +++ b/vnpy/api/sec/__init__.py @@ -1,5 +1,6 @@ # encoding: UTF-8 -from vnsecmd import MdApi -from vnsectd import TdApi -import sec_data_type as DATA_TYPE \ No newline at end of file +from __future__ import absolute_import +from .vnsecmd import MdApi +from .vnsectd import TdApi +from . import sec_data_type as DATA_TYPE \ No newline at end of file diff --git a/vnpy/api/sec/pyscript/generate_data_type.py b/vnpy/api/sec/pyscript/generate_data_type.py index 9be99c04..1d4ffc4c 100644 --- a/vnpy/api/sec/pyscript/generate_data_type.py +++ b/vnpy/api/sec/pyscript/generate_data_type.py @@ -2,6 +2,7 @@ # C++和Python类型映射 +from __future__ import print_function type_map = { 'int': 'int', 'long': 'long', @@ -97,7 +98,7 @@ def main(cpp_filename, py_filename): cpp_f.close() py_f.close() - print u'data_type处理完成' + print(u'data_type处理完成') if __name__ == '__main__': diff --git a/vnpy/api/sec/pyscript/generate_md_functions.py b/vnpy/api/sec/pyscript/generate_md_functions.py index b11f90d7..87d778ad 100644 --- a/vnpy/api/sec/pyscript/generate_md_functions.py +++ b/vnpy/api/sec/pyscript/generate_md_functions.py @@ -1,5 +1,6 @@ # encoding: UTF-8 +from __future__ import print_function from generate_data_type import pre_process import sec_struct @@ -69,7 +70,7 @@ def process_function(cpp_line): args_type_list.append(l[0]) args_name_list.append(l[1]) - print args_type_list + print(args_type_list) if args_type_list and args_type_list[0] in STRUCT_DICT: create_function(fc_name, args_type_list, args_name_list) @@ -298,4 +299,4 @@ header_process_f.close() header_on_f.close() header_function_f.close() -print API_NAME + u'处理完成' \ No newline at end of file +print(API_NAME + u'处理完成') \ No newline at end of file diff --git a/vnpy/api/sec/pyscript/generate_struct.py b/vnpy/api/sec/pyscript/generate_struct.py index 9048ccb8..8bee3e6a 100644 --- a/vnpy/api/sec/pyscript/generate_struct.py +++ b/vnpy/api/sec/pyscript/generate_struct.py @@ -1,5 +1,6 @@ # encoding: UTF-8 +from __future__ import print_function from generate_data_type import pre_process import sec_data_type @@ -62,7 +63,7 @@ def main(cpp_filename, py_filename): cpp_f.close() py_f.close() - print u'struct处理完成' + print(u'struct处理完成') if __name__ == '__main__': diff --git a/vnpy/api/sec/pyscript/generate_td_functions.py b/vnpy/api/sec/pyscript/generate_td_functions.py index 1a574fdb..c3bc68dd 100644 --- a/vnpy/api/sec/pyscript/generate_td_functions.py +++ b/vnpy/api/sec/pyscript/generate_td_functions.py @@ -1,5 +1,6 @@ # encoding: UTF-8 +from __future__ import print_function from generate_data_type import pre_process import sec_struct @@ -69,7 +70,7 @@ def process_function(cpp_line): args_type_list.append(l[0]) args_name_list.append(l[1]) - print args_type_list + print(args_type_list) if args_type_list and args_type_list[0] in STRUCT_DICT: create_function(fc_name, args_type_list, args_name_list) @@ -298,4 +299,4 @@ header_process_f.close() header_on_f.close() header_function_f.close() -print API_NAME + u'处理完成' \ No newline at end of file +print(API_NAME + u'处理完成') \ No newline at end of file diff --git a/vnpy/api/sec/test/md_test.py b/vnpy/api/sec/test/md_test.py index cd2ab5a4..c304e392 100644 --- a/vnpy/api/sec/test/md_test.py +++ b/vnpy/api/sec/test/md_test.py @@ -1,7 +1,9 @@ # encoding: UTF-8 +from __future__ import print_function import sys +from six.moves import input from vnsecmd import MdApi @@ -9,7 +11,7 @@ from vnsecmd import MdApi def print_dict(d): """输出字典""" for k, v in d.items(): - print '%s:%s' %(k, v) + print('%s:%s' %(k, v)) ######################################################################## @@ -24,119 +26,119 @@ class TestMdApi(MdApi): #---------------------------------------------------------------------- def onFrontConnected(self): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onFrontDisconnected(self, reason): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRtnNotice(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspError(self, error): """""" - print sys._getframe().f_code.co_name - print locals() - print dict(error) + print(sys._getframe().f_code.co_name) + print(locals()) + print(dict(error)) #---------------------------------------------------------------------- def onRspStockUserLogin(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockUserLogout(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPUserLogin(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) print_dict(data) print_dict(error) #---------------------------------------------------------------------- def onRspSOPUserLogout(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLUserLogin(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLUserLogout(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockSubMarketData(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockUnSubMarketData(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPSubMarketData(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPUnSubMarketData(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onStockMarketData(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onSOPMarketData(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockAvailableQuot(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSopAvailableQuot(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspUserMDPasswordUpdate(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) if __name__ == '__main__': @@ -157,5 +159,5 @@ if __name__ == '__main__': } api.reqSOPUserLogin(req) - - raw_input() \ No newline at end of file + + input() diff --git a/vnpy/api/sec/test/td_test.py b/vnpy/api/sec/test/td_test.py index 742845ce..b12474b3 100644 --- a/vnpy/api/sec/test/td_test.py +++ b/vnpy/api/sec/test/td_test.py @@ -1,7 +1,9 @@ # encoding: UTF-8 +from __future__ import print_function import sys +from six.moves import input from vnsectd import TdApi @@ -9,7 +11,7 @@ from vnsectd import TdApi def print_dict(d): """输出字典""" for k, v in d.items(): - print '%s:%s' %(k, v) + print('%s:%s' %(k, v)) ######################################################################## @@ -24,556 +26,556 @@ class TestTdApi(TdApi): #---------------------------------------------------------------------- def onFrontConnected(self, ): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onFrontDisconnected(self, reason): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRtnNotice(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspError(self, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockUserLogin(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockUserLogout(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockUserPasswordUpdate(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockEntrustOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockWithdrawOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryEntrustOrder(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryRealTimeTrade(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQrySerialTrade(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryPosition(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryCapitalAccountInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryAccountInfo(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryShareholderInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockTransferFunds(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockEntrustBatchOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockWithdrawBatchOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockCalcAbleEntrustQty(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockCalcAblePurchaseETFQty(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryFreezeFundsDetail(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryFreezeStockDetail(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryTransferStockDetail(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryTransferFundsDetail(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryStockInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryStockStaticInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspStockQryTradeTime(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onStockEntrustOrderRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onStockTradeRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onStockWithdrawOrderRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPUserLogin(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) print_dict(data) print_dict(error) #---------------------------------------------------------------------- def onRspSOPUserLogout(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPUserPasswordUpdate(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPEntrustOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPGroupSplit(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryGroupPosition(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPLockOUnLockStock(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPWithdrawOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryEntrustOrder(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQrySerialTrade(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryPosition(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryCollateralPosition(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryCapitalAccountInfo(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryAccountInfo(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryShareholderInfo(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPCalcAbleEntrustQty(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryAbleLockStock(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryContactInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPExectueOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryExecAssiInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryTradeTime(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryExchangeInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryCommission(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryDeposit(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspSOPQryContractObjectInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onSOPEntrustOrderRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onSOPTradeRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onSOPWithdrawOrderRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLUserLogin(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLUserLogout(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryAbleFinInfo(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryAbleSloInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLTransferCollateral(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLDirectRepayment(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLRepayStockTransfer(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLEntrustCrdtOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLEntrustOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLCalcAbleEntrustCrdtQty(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryCrdtFunds(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryCrdtContract(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryCrdtConChangeInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLTransferFunds(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryAccountInfo(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryCapitalAccountInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryShareholderInfo(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryPosition(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryEntrustOrder(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQrySerialTrade(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryRealTimeTrade(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryFreezeFundsDetail(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryFreezeStockDetail(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryTransferFundsDetail(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLWithdrawOrder(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQrySystemTime(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryTransferredContract(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLDesirableFundsOut(self, data, error): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryGuaranteedContract(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onRspFASLQryUnderlyingContract(self, data, error, flag): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onFASLEntrustOrderRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onFASLTradeRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) #---------------------------------------------------------------------- def onFASLWithdrawOrderRtn(self, data): """""" - print sys._getframe().f_code.co_name - print locals() + print(sys._getframe().f_code.co_name) + print(locals()) @@ -595,5 +597,5 @@ if __name__ == '__main__': } api.reqSOPUserLogin(req) - - raw_input() \ No newline at end of file + + input()