1
0

b/c...py: notify the user when reading STDIN

Notify the user when the script reads bytebeat code from STDIN
This commit is contained in:
Intel A80486DX2-66 2024-08-26 17:38:58 +03:00
parent 4e72ba90dc
commit b8323731cb
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -67,6 +67,7 @@ def rewrite_file(path: str, content: str):
def read_from_file_or_stdin(path: str) -> str:
if path == "-":
print("Reading from STDIN...", flush=True)
return "\n".join(stdin)
elif exists(path):
return read_file(path)