Seungmi

부분 수정

Showing 1 changed file with 5 additions and 6 deletions
......@@ -11,8 +11,8 @@ const bodyParser = require('body-parser');
var app = express();
const { info } = require('console');
var { PythonShell } = require('python-shell');
let pyshell = new PythonShell('weather_chat.py', {mode: 'text'});
var {PythonShell} = require('python-shell');
var pyshell = new PythonShell('weather_chat.py');
app.use(bodyParser.json());
......@@ -87,11 +87,10 @@ function chatUse(replyToken){
}
function chatWeather(replyToken){
var PM = " ";
pyshell.send('request')
pyshell.on('message', function(data){
PM = data;
pyshell.on('message', function (data) {
console.log(data);
});
request.post(
......