nodejs 执行python脚本
来源:互联网 发布:js两个对象数组合并 编辑:程序博客网 时间:2024/05/16 06:16
nodejs提供了child_process用于调用外部程序
child_process.exec(command[, options][, callback])
代码如下Python代码见另一篇文章
const cp=require('child_process')
var arg1='美元',
arg2='日元'
cp.exec('python test_py.py '+arg1+' '+arg2+' ', (err, stdout,stderr) => {
if (err)console.log('stderr',err);
if (stdout)console.log('stdout',stdout);
})
输出结果
阅读全文
0 0
- nodejs 执行python脚本
- nodejs -- 执行bat脚本
- 如何执行python脚本
- Python脚本定期执行
- Python脚本定期执行
- python linux 脚本执行
- Python 执行MySQL 脚本
- centos执行Python脚本
- python自动执行脚本
- Python执行shell脚本
- crontab 定时执行python脚本
- Centos定时执行python脚本
- python 执行sh脚本文件
- crontab 定时执行python脚本
- 在命令行执行python脚本
- python编写定时器执行脚本
- ant编译脚本执行python
- 多python脚本同时执行
- JAVA算法-快速排序
- 测试Python刷阅读量
- Android-广播
- orb_slam整体编程思路及代码解析(1)
- linux下ftp服务器的搭建
- nodejs 执行python脚本
- Nginx简介
- MonkeyJcript使用monkey循环操作一个场景
- Linux下0号进程的前世(init_task进程)今生(idle进程)----Linux进程的管理与调度(五)
- 数据结构第三周项目-求集合并集
- Leetcode 41. First Missing Positive
- 程序员如何快速成长
- 编程规范
- 第十三周 【项目1