Blame | Last modification | View Log | RSS feed
'''Created on 17-May-2010@author: gaurav'''from datastore.DataAccessor import DataHelperimport sys'''Get all the univercell phones first.Postprocess the phones and brake the phone name column into multiples on spaces'''phones = DataHelper()phones = phones.get_all_univercell_phones()if not phones:print "Error while getting phones"sys.exit(-1)file_to_write = "/tmp/univercell.csv"data_file = open(file_to_write,"w")for phone in phones:#phone = infibeam_data()unparsed_name = phone.p_titlevendor_name, phone_space, phone_name = unparsed_name.partition(" ")csv_data = "%s, %s, %d, %d" %(vendor_name, phone_name, phone.p_shown_price, phone.p_final_price)data_file.write(csv_data)data_file.write("\n")data_file.close()