```
import sys
import itertools
import traceback
import pprint
try:
    raise RuntimeError("FFFUUU")
except Exception:
    ei = sys.exc_info()
    lines = traceback.format_exception(*ei)
    lines = [
        filter(lambda item: item, line.rstrip().splitlines())
        for line in lines
    ]
    lines = list(itertools.chain(*lines))
    pprint.pprint(lines)
```
Run:
```
['Traceback (most recent call last):',
 '  File "test.py", line 6, in <module>',
 '    raise RuntimeError("FFFUUU")',
 'RuntimeError: FFFUUU']
```