With this code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import warnings
if sys.version_info[0] >= 3:
...
else:
warnings.warn("Python 3.x is required!", RuntimeWarning)
And the else output I get is:
Warning (from warnings module):
File "C:\Users\..., line 10
warnings.warn("Python 3.x is required!", RuntimeWarning)
RuntimeWarning: Python 3.x is required!
Is there any way of getting rid of the first 3 lines of the output and only display "RuntimeWarning: Python 3.x is required!" ?
warnings.showwarning = send_warnings_to_log?