Showing
1 changed file
with
1 additions
and
10 deletions
... | @@ -12,15 +12,7 @@ var app = express(); | ... | @@ -12,15 +12,7 @@ var app = express(); |
12 | const { info } = require('console'); | 12 | const { info } = require('console'); |
13 | 13 | ||
14 | var { PythonShell } = require('python-shell'); | 14 | var { PythonShell } = require('python-shell'); |
15 | -var pyshell = new PythonShell('weather_chat.py'); | 15 | +let pyshell = new PythonShell('weather_chat.py', {mode: 'text'}); |
16 | - | ||
17 | -let options = { | ||
18 | - mode: 'text', | ||
19 | - pythonPath: '', | ||
20 | - pythonOptions: ['-u'], | ||
21 | - scriptPath: '', | ||
22 | - args: ['value1', 'value2', 'value3'] | ||
23 | -}; | ||
24 | 16 | ||
25 | app.use(bodyParser.json()); | 17 | app.use(bodyParser.json()); |
26 | 18 | ||
... | @@ -99,7 +91,6 @@ function chatWeather(replyToken){ | ... | @@ -99,7 +91,6 @@ function chatWeather(replyToken){ |
99 | 91 | ||
100 | pyshell.send('request') | 92 | pyshell.send('request') |
101 | pyshell.on('message', function(data){ | 93 | pyshell.on('message', function(data){ |
102 | - console.log(data); | ||
103 | PM = data; | 94 | PM = data; |
104 | }); | 95 | }); |
105 | 96 | ... | ... |
-
Please register or login to post a comment