def read_grid_from_file(filename):
    """
    Read the results of a full set of calculations from file
    """
    try:
        f = open(filename, mode='r')
        full_res = ast.literal_eval(f.read())
        f.close()
    except SyntaxError:
        print('Problems reading ', filename)
        full_res = {'grid': 0, 'all_done': False}
    except (OSError, IOError):
        full_res = {'grid': 0, 'all_done': False}
    return full_res
def read_grid_from_file ( filename ) : try : f = open ( filename , mode = 'r' ) full_res = ast . literal_eval ( f . read ( ) ) f . close ( ) except SyntaxError : print ( 'Problems reading ' , filename ) full_res = { 'grid' : 0 , 'all_done' : False } except ( OSError , IOError ) : full_res = { 'grid' : 0 , 'all_done' : False } return full_res
Read the results of a full set of calculations from file