python-lottie  0.6.11+devcecd248
A framework to work with lottie files and telegram animated stickers (tgs)
file.py
Go to the documentation of this file.
1 from contextlib import contextmanager
2 
3 
4 @contextmanager
5 def open_file(file_or_name, mode="w"):
6  if isinstance(file_or_name, str):
7  obj = open(file_or_name, mode)
8  try:
9  yield obj
10  finally:
11  obj.close()
12  else:
13  yield file_or_name
lottie.utils.file.open_file
def open_file(file_or_name, mode="w")
Definition: file.py:5