I would like some help figuring out how to run individual lines from a text file through a class, this is what i have so far:
class Employee:
   'Class for all employees'
   empCount = 0
   def __init__(self, payNo, salary, job, mName, fName, sName):
      self.payNo = payNo
      self.salary = salary
      self.job = job
      self.mName = mName
      self.fName = fName
      self.sName = sName
      Employee.empCount += 1
   def displayCount(self):
     print ("Total Employee %d" % Employee.empCount)
   def displayEmployee(self):
      print ('{:<2s}{:<1}{:<13s}{:<15s}{:<7d}{:16s}{:>5s}{:<6d}'.format(self.sName,", ", self.mName, self.fName, self.payNo, self.job,"£",self.salary))
      ##print ('{:20s}{:20s}{:20s}'.format(self.sName,self.mName,self.fName))
"This would create first object of Employee class"
emp1 = Employee(12345, 2000, "Consultant", "Bartholomew", "Homer", "Simpson")
"This would create second object of Employee class"
emp2 = Employee(12346, 5000, "conultant in jobs","daniel", "matt", "li")
emp1.displayEmployee()
emp2.displayEmployee()
print ("Total Employee(s) %d" % Employee.empCount)
with open("emps.txt") as fileobject:
    for line in fileobject:
      print (line)
any help will be much appreciated, thank you
 
     
    