I\'m wondering if there\'s a way to capture warnings (built-in warnings module) in python like how you use try: except to capture errors. I know I can capture it by try bloc