Example app structure. round 1.

This commit is contained in:
Travis Reeder
2017-09-14 16:09:28 -07:00
parent fdc3e76359
commit 75e2051169
25 changed files with 194 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
import sys
import os
import json
sys.stderr.write("Starting Python Function\n")
name = "I speak Python too"
try:
if not os.isatty(sys.stdin.fileno()):
try:
obj = json.loads(sys.stdin.read())
if obj["name"] != "":
name = obj["name"]
except ValueError:
# ignore it
sys.stderr.write("no input, but that's ok\n")
except:
pass
print "Hello, " + name + "!"