Add some examples
This commit is contained in:
parent
0f67b0523a
commit
d72a9f249c
3 changed files with 21 additions and 0 deletions
11
examples/read_in.py
Executable file
11
examples/read_in.py
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
|
||||||
|
print("<h1>Hello!</h1>")
|
||||||
|
|
||||||
|
request = json.loads(sys.stdin.read())
|
||||||
|
|
||||||
|
|
||||||
|
print("<p>You're looking at {}.</p>".format(request['url']))
|
5
examples/simple.py
Executable file
5
examples/simple.py
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
print(sys.stdin.read())
|
5
examples/simple.sh
Executable file
5
examples/simple.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
read test
|
||||||
|
|
||||||
|
echo $test
|
Reference in a new issue