Advertisement
Guest User

agiscript.py

a guest
Nov 8th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. import sys
  4.  
  5.  
  6. def read_one_line_of_input():
  7.     raw = sys.stdin.readline()
  8.     return raw.strip()
  9.  
  10.  
  11. with open('/var/log/agiscript.log', 'w') as log:
  12.     line = read_one_line_of_input()
  13.     while line:
  14.         log.write(f"READ: '{line}'\n")
  15.         line = read_one_line_of_input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement