AdventOfCode/2019/day21.py
2019-12-22 01:00:00 +01:00

23 lines
418 B
Python

"""Pipe springscript file to stdin. Comments (#) can be escaped with grep -v."""
import sys
from intcode import AIC
def main():
codes = AIC.parse_file("day21.txt")
ss = SSIC(codes, script=sys.stdin.read())
ss.run()
class SSIC(AIC):
def __init__(self, *args, script="", **kwargs):
super().__init__(*args, **kwargs)
self.input_text = script
if __name__ == "__main__":
main()