mirror of
https://github.com/KevinMidboe/fanController.git
synced 2026-09-07 16:32:50 +00:00
Other misc changes to python scripts and init pushed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
import sys
|
||||
|
||||
# simple argument echo script
|
||||
for v in sys.argv[1:]:
|
||||
print v
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import sys
|
||||
|
||||
# simple binary echo script
|
||||
sys.stdout.write(sys.stdin.read())
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import sys, json
|
||||
|
||||
# simple JSON echo script
|
||||
for line in sys.stdin:
|
||||
print json.dumps(json.loads(line))
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import sys, json
|
||||
|
||||
# simple JSON echo script
|
||||
for line in sys.stdin:
|
||||
print line[:-1]
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
# simple error script
|
||||
|
||||
def divide_by_zero():
|
||||
print 1/0
|
||||
|
||||
divide_by_zero()
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import sys
|
||||
exit_code = int(sys.argv[1]) if len(sys.argv) > 1 else 0
|
||||
sys.exit(exit_code)
|
||||
Reference in New Issue
Block a user