Write a python that read email data from file




In this first phase of the project you will be writing a Python application that will read email data from a file and you will be counting the occurrences of emails from specific users.

The program must:

  1. Prompt for a file name
  2. Opens that file and reads through the file
  3. Displays a custom error message if the file does not exist
  4. Looking for lines of the form:
  5. From s..d@uct.ac.za Sat Jan 5 09:14:16 2008
  6. Prompt the user to enter three different email addresses (these are the email addresses you will read from the file)
  7. Count these lines where the email address matches one of the three email addresses you searched for.
  8. You should have a separate counter variable for each of the 3 email addresses you are finding.
  9. Print out the count for each of the three email addresses after the program has completed execution.
  10. You can download the data at mbox.txt when you are testing enter mbox.txt as the file name.
  11. To find out what email addresses to test with, go to the Simple Python Application Quiz which is next in the module. You will be given 3 email addresses to search for and prompted to enter the count you got for each of the email addresses (a portion of the grade for this assignment will be to get the counts correct).
  12. You will be time limited so be sure your program is ready to run when you start the quiz.
  13. You can take the quiz again if your program crashes, but chances are you will get a different set of emails if you need to test again.