April 2018
Beginner
340 pages
7h 54m
English
Our ListeningThread class will need to inherit from threading.Thread and contain a run method, which can happen in the background.
Since we want to be always checking for new messages until the user closes their ChatWindow, we shall put our request inside a loop which the ChatWindow will be able to end when closed.
Let's begin our ListeningThread class, as follows:
import arrowimport threadingimport timefrom requester import Requester
Our class will be making use of the following modules:
With the imports taken ...