Shofel2_T124_python/venv/lib/python3.10/site-packages/antlr4/StdinStream.py

12 lines
303 B
Python
Raw Normal View History

2024-05-25 16:45:07 +00:00
import codecs
import sys
from antlr4.InputStream import InputStream
class StdinStream(InputStream):
def __init__(self, encoding:str='ascii', errors:str='strict') -> None:
bytes = sys.stdin.buffer.read()
data = codecs.decode(bytes, encoding, errors)
super().__init__(data)