Skip to content

Instantly share code, notes, and snippets.

View sxddhxrthx's full-sized avatar
😃
Having fun while it lasts

Siddhartha Chowdhury sxddhxrthx

😃
Having fun while it lasts
View GitHub Profile
import json
with open('/etc/app_config/config.json', 'r') as config_file:
cfg = config_file.read()
configs = json.loads(cfg)
print(configs['GITHUB_URL'])
from contextlib import contextmanager
@contextmanager
def handle_division_error():
try:
yield
except ZeroDivisionError as zde:
print('zero division error')