read_chat_history.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:project 作者: swatishayna 项目源码 文件源码
def read_chat_history():

    choice = select_a_friend()

    if choice is not None:
        print (Fore.BLUE + "Messages sent are shown in blue color \n" + Fore.GREEN + " Received Messages and Read Messages are shown in green color:"+Fore.RESET)

        chats = friends[choice].chats

        for chat in chats:
            if chat.sent_by_me:
                print (Fore.RED + str(chat['time']) + " " + Fore.BLUE + friends[choice]['name'] + " " + Fore.RESET + chat['message'])
            else:
                print (Fore.RED + str(chat['time']) + " " + Fore.GREEN + friends[choice]['name'] + " " + Fore.RESET + chat['message'])
    else:
        print "Wrong choice"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号