Other misc changes to python scripts and init pushed

This commit is contained in:
2017-01-29 18:36:36 +01:00
parent d24067b5e0
commit 48f27a27a5
297 changed files with 47322 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import sys
# simple argument echo script
for v in sys.argv[1:]:
print v
+4
View File
@@ -0,0 +1,4 @@
import sys
# simple binary echo script
sys.stdout.write(sys.stdin.read())
+5
View File
@@ -0,0 +1,5 @@
import sys, json
# simple JSON echo script
for line in sys.stdin:
print json.dumps(json.loads(line))
+5
View File
@@ -0,0 +1,5 @@
import sys, json
# simple JSON echo script
for line in sys.stdin:
print line[:-1]
+6
View File
@@ -0,0 +1,6 @@
# simple error script
def divide_by_zero():
print 1/0
divide_by_zero()
+3
View File
@@ -0,0 +1,3 @@
import sys
exit_code = int(sys.argv[1]) if len(sys.argv) > 1 else 0
sys.exit(exit_code)