def _load(self, name): for line in self._get_file_contents(name): print(line) line = line.split("-") print(line) date = "{}-{}-{}".format(line[0], line[1], line[2].strip()) app = Appointment(line[3].strip(), date) self.add_appointment(app)
def setup(self): self.app = Appointment("World domination", "2014-04-01")
def create_appointment(self, description, date): # belongs to a higher level interface # description = input("description>") # date = input("date(yyyy-mm-dd)>") return Appointment(description, date)
def create_appointment(self): description = input("description>") date = input("date(yyyy-mm-dd)>") return Appointment(description, date)