UNPKG

586 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const index_1 = require("./index");
4const options = {
5 scriptPath: 'C:\\dev\\python-shell',
6 env: { PYTHONIOENCODING: 'utf8' },
7};
8const pyTeste = new index_1.PythonShell('a.py', options);
9pyTeste
10 .on('message', (line) => {
11 console.log(line);
12})
13 .on('stderr', (std) => {
14 console.log(std);
15})
16 .on('error', err => {
17 console.log('err');
18 console.log(err);
19})
20 .on('close', () => {
21 console.log('Programa finalizado');
22});
23//# sourceMappingURL=a.js.map
\No newline at end of file