from IPython import embed
embed()
Type Ctrl-D
to proceed
import lovely_tensors as lt
lt.monkey_patch()
from loguru import logger
logger.debug("That's it, beautiful and simple logging!")
Please note that accepting exceptions blindlessly is usually not a good practice.
import sys, os
try:
# Your code here
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
line_number = exc_tb.tb_lineno
print(f"Error executing function: {str(e)}. Error at line: {line_number} in file: {fname}. Please try again.")
import better_exceptions
better_exceptions.hook()