title: This reads EOFError: Ran out of input
body: <p>This is a class I created</p>
  
  <pre><code>import pickle
  
  class CarRecord:
      def __init__(self):
          self.VehicleID = ""
          self.Registration = ""
          self.DateOfRegistration = None
          self.EngineSize = 0
          self.PurchasePrice = 0.00
  
  ThisCar = CarRecord()
  Car = [ThisCar for i in range(5)]
  Car[0].EngineSize = 2400
  Car[1].EngineSize = 2300
  Car[2].EngineSize = 2200
  Car[3].EngineSize = 2100
  Car[4].EngineSize = 2000
  </code></pre>
  
  <p>I want to write these records to the binary file</p>
  
  <pre><code>CarFile = open('Cars.DAT', 'wb')
  for i in range(5):
     pickle.dump(Car[i], CarFile)
  print(Car)
  
  CarFile.close()
  CarFile = open('Cars.DAT', 'rb')
  Car = []
  
  print("££££££££")
  </code></pre>
  
  <p>and append the record to he end of the list</p>
  
  <pre><code>while True:
  </code></pre>
  
  <p>and here I check for the end of file</p>
  
  <pre><code>Car.append(pickle.load(CarFile))
  CarFile.close()
  print(Car)
  </code></pre>