import win.ui;
/*DSG{{*/
mainForm = win.form(text="aardio工程_pandas_py";right=757;bottom=467;bgcolor=15780518)
mainForm.add(
button={cls="button";text="Button";left=192;top=368;right=344;bottom=416;z=1};
edit={cls="edit";left=96;top=72;right=664;bottom=344;ah=1;aw=1;edge=1;multiline=1;vscroll=1;z=2}
)
/*}}*/
import py3;
import process.python
var tushare = py3.import("tushare");
var pyCode = /**
import tushare as ts
ts.set_token('69ec8c63daca1e4e25db909abf3c85509b47bbd6e87acdb29ae5cce1')
pro = ts.pro_api()
x = pro.stock_company(exchange='SZSE', fields='ts_code,manager,main_business')
print(x.info())
print(x.head())
**/
mainForm.button.oncommand = function(id,event){
var py = process.python.exec(pyCode)
py.logResponse(mainForm.edit)
}
mainForm.show();
return win.loopMessage();