import pickle


def load_from_file(filename):
    """Load a past state from file.
    """
    f=open(filename,'rb')
    try:
        return pickle.load(f)
    except EOFError:
        print('Nothing written to file.')