diff --git a/Client.py b/Client.py index 1c9456b..76debde 100644 --- a/Client.py +++ b/Client.py @@ -7,7 +7,7 @@ import webbrowser thisSocket = socket.socket() thisSocket.connect(("127.0.0.1",5001)) -def chatbotExit(): +def chatbotExit(): #Richard ''' Sends a message to the server to notify it that the chatbot is quitting and then closes the interface and allows other functions to end properly''' @@ -16,11 +16,11 @@ def chatbotExit(): window.quit() return None -def openLink(url): +def openLink(url): #Richard ''' Opens the link sent by the server''' webbrowser.open(url, new=2) -def receiveMessage(i): +def receiveMessage(i): #Richard ''' Receives multiple messages from server if needed, until server sends EndOfMessage and displays the recieved messages on the user interface''' @@ -57,7 +57,7 @@ def receiveMessage(i): chatHistory.configure(state="disabled") #prevents user from editing the chat history message = thisSocket.recv(1024).decode() -def sendMessage(event=None): +def sendMessage(event=None): #Richard '''Waits for the user to enter a messasge in the text entry box in the interface and then takes this input from the user and feeds it to the chatbot/server, allowing it to respond to the input appropriately.''' diff --git a/GUI.py b/GUI.py index 5b71366..a34bcea 100644 --- a/GUI.py +++ b/GUI.py @@ -15,7 +15,7 @@ userInput.pack() lbl = tk.Label(window, text="\nChatHistory", bg="cornflower blue") lbl.pack() -def cb(event): +def cb(event): #Richard userText = userInput.get() userName = gf.getName(userText) userName = userName.title() diff --git a/GUI2.py b/GUI2.py index e0a8a91..bf187d9 100644 --- a/GUI2.py +++ b/GUI2.py @@ -1,7 +1,7 @@ import tkinter as tk import determineUserInput as detUsrIn -def chat(event): +def chat(event): #Richard '''This function takes the input from the user and feeds it to the chatbot, allowing the chatbot to respond to the input appropriately. Essentially this function bridges the GUI and chatbot''' diff --git a/Get_Functions.py b/Get_Functions.py index c307c83..793ea0a 100644 --- a/Get_Functions.py +++ b/Get_Functions.py @@ -12,7 +12,7 @@ randomStuff = ["Cherophobia is the fear of fun","A flock of crows is called a mu #========================================================================================================= -def getName(sentence): +def getName(sentence): #Jasper, Richard """get the name of the user from the inputed sentence""" userWords = sentence.split()