def processRemoveTweet(tweet, twitter): contents = tweet['text'] m = re.search('remove @(\w+)$', contents) if m: print("Removig user: "******"Goodbye!", twitter) else: replyToTweet(tweet, "I litterally don't know who you are...", twitter) else: print("Error passsing match " + contents) replyToTweet(tweet, "Sorry, that isn't a valid \'remove\' command", twitter)
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()