AdventOfCode/2019/day21.py

23 lines
418 B
Python
Raw Normal View History

2019-12-22 01:00:00 +01:00
"""Pipe springscript file to stdin. Comments (#) can be escaped with grep -v."""
2019-12-21 22:04:47 +01:00
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()