Advertisement
Guest User

Untitled

a guest
Aug 27th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. 2014-08-27 21:35:53,922 - DEBUG: company_website=http://google.com
  2. 2014-08-27 21:35:53,923 - DEBUG: company_revenue=80000000000000
  3. 2014-08-27 21:35:53,923 - DEBUG: company_start_year=2004
  4. 2014-08-27 21:35:53,923 - DEBUG: account_description=The company is never clearly defined in Road Runner cartoons but appears to be a conglomerate which produces every product type imaginable, no matter how elaborate or extravagant - most of which never work as desired or expected. In the Road Runner cartoon Beep, Beep, it was referred to as "Acme Rocket-Powered Products
  5. 2014-08-27 21:35:53,924 - DEBUG: company_name=Acme Inc
  6. 2014-08-27 21:35:53,925 - DEBUG: company_email=Inc."" based in Fairfield
  7.  
  8. with open(csvfile, 'rU') as contactsfile:
  9. # sniff for dialect of csvfile so we can automatically determine
  10. # what delimiters to use
  11. try:
  12. dialect = csv.Sniffer().sniff(contactsfile.read(2048))
  13. except:
  14. dialect = 'excel'
  15. get_total_jobs(contactsfile, dialect)
  16. contacts = csv.DictReader(contactsfile, dialect=dialect, skipinitialspace=True, quoting=csv.QUOTE_MINIMAL)
  17. # Start reading the rows
  18. for row in contacts:
  19. process_job()
  20. for key, value in row.iteritems():
  21. logging.debug("{}={}".format(key,value))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement