I am working on client-server project using Tkinter GUI, and I want to check if ChatServer.py is running before I am running ChatClient.py file.
for example:
I want to run the Client().runGUI() line only if ChatServer.py is running, else I want to print an message to the terminal.
def runGUI(self):
self.window.mainloop()
Client().runGUI()
I have no access to the server, so I cant check if is running or not, my main question is if I can run a line of code only if ChatServer.py is already running.