Initial Commit

This commit is contained in:
OmniLottie
2026-03-01 21:36:54 +08:00
commit a386c803e1
199 changed files with 42253 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
from contextlib import contextmanager
@contextmanager
def open_file(file_or_name, mode="w"):
if isinstance(file_or_name, str):
obj = open(file_or_name, mode)
try:
yield obj
finally:
obj.close()
else:
yield file_or_name