跳到主要内容
CNode

node js 调用python

问答
Qquanpf2481发布于 8 年前最后回复 8 年前
446190

想在node中调用已经写好的python文件,应该怎么样来操作呢??谢谢

查看回复

回复 (4)

W
winterZhao#48 年前

@quanpf2481 var exec = require('child_process').exec; exec('python a.py',function(error,stdout ,stderr ){ console.log(stdout); });

C
chloe#38 年前

chile_process 或者你用python来写个服务服务,node调用

Q
quanpf2481#28 年前
引用 winterZhaonode的child process模块

@winterZhao 谢谢回答,请问有没有例子参考呢??

W
winterZhao#18 年前

node的child_process模块

参与回复

登录后即可参与回复。登录