bot2.py
from flask import Flask, request
import requests
from twilio.twiml.messaging_response import MessagingResponse
app = Flask(__name__)
@app.route('/bot', methods=['POST'])
def bot():
incoming_msg = request.values.get('Body', '').lower()
resp = MessagingResponse()
msg = resp.message()
constparam = incoming_msg
print(constparam)
msg.body(constparam)
return str(resp)
if __name__ == '__main__':
app.run()
dummy.py
from bot2 import app,bot
import time
while 1:
print(bot.constparam)
time.sleep(5)
I want to use constparam variable of bot2.py in dummy.py