aardio 文本窗体调用数据问题

废话不多说,直接开干!
aardio 文本窗体调用数据问题_第1张图片
这位同学,刚入行aadrio

import win.ui;
import console;
import py;

var pyCode = /**    
import math
def fun(x,y,XX,B):
    return B / y * math.exp(-math.pi * B * B * (XX- x) * (XX- x) / (y * y))

**/
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add(
button2={cls="button";text="确定";left=579;top=105;right=676;bottom=140;z=6};
edit={cls="edit";text="1";left=57;top=103;right=131;bottom=135;edge=1;z=1};
edit2={cls="edit";text="6";left=55;top=158;right=132;bottom=194;edge=1;multiline=1;z=7};
edit3={cls="edit";text="2";left=160;top=107;right=234;bottom=139;edge=1;z=2};
edit4={cls="edit";text="3";left=268;top=105;right=342;bottom=137;edge=1;z=3};
edit5={cls="edit";text="4";left=361;top=104;right=435;bottom=136;edge=1;z=4};
edit6={cls="edit";text="5";left=449;top=103;right=523;bottom=135;edge=1;z=5};
edit7={cls="edit";text="7";left=159;top=163;right=246;bottom=199;edge=1;z=8};
edit8={cls="edit";text="8";left=273;top=165;right=360;bottom=195;edge=1;z=9}
)
/*}}*/

winform.button2.oncommand = function(id,event){
 	 x=tonumber(winform.edit.text);
     y=tonumber(winform.edit2.text);
     XX=tonumber(winform.edit3.text);
     B=tonumber(winform.edit4.text);
     H=tonumber(winform.edit5.text);
     r=tonumber(winform.edit6.text);
     
    //把Python3代码放进py虚拟机执行
    py.exec(pyCode) 
    //调用虚拟机里python3 __main__ 模块下的函数
    
	winform.edit7.text = tostring(py.main.fun(x,y,XX,B));
    winform.edit8.text=tostring(py.main.integrate);
   
   
}

winform.show();
win.loopMessage();
return winform;

你可能感兴趣的:(aardio,vue.js,webpack,javascript)