def processAddTweet(tweet, twitter): contents = tweet['text'] m = re.search('add @(\w+)$', contents) if m: print("Adding user: "******"Welcome on board @" + m.group(1) + "!", twitter) else: replyToTweet(tweet, "I already know about you, silly!", twitter) else: print("Error passsing match" + contents) replyToTweet(tweet, "Sorry, that isn't a valid \'add\' command", twitter)
def writeOutPeople(person_manager): person_manager.addPerson('thk123') person_manager.savePeople()