Skip to content

Instantly share code, notes, and snippets.

@kunal732
Created December 11, 2015 21:29
Show Gist options
  • Save kunal732/325bd3a780185bc5ee37 to your computer and use it in GitHub Desktop.
Save kunal732/325bd3a780185bc5ee37 to your computer and use it in GitHub Desktop.
kunaldemo
from flask import Flask, request
import json
import httplib
import os
app = Flask(__name__)
@app.route('/email', methods=['POST'])
def form():
subject=request.form['subject']
cmd = "osascript -e 'say\""+subject+" \" using \"Deranged\"'"
os.system(cmd)
return "OK"
if __name__ == '__main__':
app.run()▫
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment