O'Reilly logo

Tkinter GUI Programming by Example by David Love

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting our ChatWindow

The first thing to do with our ChatWindow is allow it to receive the username variable:

class ChatWindow(tk.Toplevel):    def __init__(self, master, friend_name, friend_username, friend_avatar, **kwargs):        ...        self.friend_username = friend_username

You may be wondering why we need this variable here. The reason we will be requiring it is to help keep track of the conversation history.

There will be a separate database holding conversations between you and each individual friend, to make for very easy retrieval of the conversation history. This will, of course, require changes to our web service and, of course, our Requester will need to be updated too.

Let's begin with the necessary server adjustments to facilitate the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required