给程序加上控制台菜单 menu.py import sys from notebook import Notebook, Note class Menu: '''Display a menu and respond to choices when run.''' def __init__(self): self.notebook = Notebook() self.choices = { ": self.show_all_notes, ": self.search_notes, &qu
notebook.py import datetime last_id = 0 class Note: '''Represent a note in the notebook. Match against a string in searches and store tags for each note.''' def __init__(self, memo, tags=''): self.memo = memo self.tags = tags self.creation_date = dat