All pastes #768053 Raw Edit

Anonymous

public python v1 · immutable
·published 2007-11-10 07:03 UTC
rendered paste body
#############ERRROR#######################Please note: this box here is only#for you to read.  It is not part of the#actual source code.##Traceback (most recent call last):#  File "<string>", line 1, in <string>#invalid syntax: <string>, line 19, pos 22##Real code beings below#########################################from picture import *import warmupdef read_file (f):       for line in f:        yield line.split(":")def file_to_dictionary(file):    lines = {}    temp = ''    temp_list = []    for x in read_file(file):        for y in x:                     try:                if float(y):                    value = float(y.strip())                    temp_list.append('%02g'%value)                except ValueError:                    print y                    if y == "US" or y == "INT":                        temp_list.append(y)                        lines [temp] = temp_list                    else:                        lines [temp] = temp_list                        temp = y    return linesfile = open ('airport_data.txt')print file_to_dictionary (file)