title: NameError: name 'Factory' is not define i don't know why
body: <p>I am new to Python 2.7 and practicing to write to a csv file using the faker module which creates dummy test data.  I am writing the header first.<br>
  I am getting an error Factory is not defined.
  I'm not sure why it thinks factory is not defined.</p>
  
  <p>Traceback (most recent call last):
    File "C:/Automation/Python/Write to file practice/csv_write_test.py", line 18, in 
      fake = Factory.create()
  NameError: name 'Factory' is not defined</p>
  
  <p>My code snippet is:</p>
  
  <pre><code>from faker import factory
  import csv
  
  def create_fake_stuff(fake):
  """"""
  stuff = ["email", "bs", "address", "city", "state", "paragraph"]
  for item in stuff:
      print "%s = %s" % (item, getattr(fake, item)())
  
  with open('test.csv', 'wb') as csvfile:
  write_to_csv = csv.writer(csvfile, delimiter=' ',
                          quotechar='|', quoting=csv.QUOTE_MINIMAL)
  write_to_csv.writerow(['id,' 'TITLE,' 'FNAME,' 'SNAME,' 'GENDER,' 'ADD1,'])
  
  if __name__ == "__main__":
  fake = Factory.create()
  create_fake_stuff(fake)
  </code></pre>
  
  <p>Thanks for help!</p>