In Python, if I open a binary file that doesn\'t exist, the program exits with an error and prints:
Traceback (most recent call last): File \"C:\\Python_te
Python has the traceback module.
import traceback try: pkl_file = open('monitor.dat', 'rb') monitoring_pickle = pickle.load(pkl_file) pkl_file.close() except IOError: traceback.print_exc()