Chat In Terminal
Hello all.
(DISCLAIMER - This python script runs only on localhost. If you want to make a connection with other devices then you should check the code of the server.py file and use network library in the client.py file)
About
So, the thing that is done with this script is that, it starts a server and with the help of threading maintains many clients. It is like chatting in the terminal. You can join the chat by starting the client.py file.
π
π
Getting Started Working with it is very simple.
- There shouble be a host means the head of the chat
- The host should run the server.py file and note the password given by it.
- The host need to start another terminal and start client.py file and enter with name host
π©βπ» π©βπ» - He/She needs to give the correct password as given by the server to start the chat.
π - Anyone cannot join the chat unless host has joined
π₯ - After host has joined, anyone can join now
π¨βπ¨βπ¦βπ¦ π©βπ©βπ§βπ¦ - Clients need to join with their nickname
- The message which will be send will be shown with their nickname in fron of the message
Commands to execute and things need to be installed
Python 3 need to be installed You do not need to install anything because all teh libraries used here are built-in.
- Sockets
- Threading Commands -
-
- Run the server.py file
python3 server.py
-
- Open another terminal and run the client.py and join as host and give the password
python client.py
(This is the video of the live example) - link to youtube - https://youtu.be/R8MLOCNbMu0
live-demo.mp4
Contirbution
Feel free to contribute to this project
License
GNU Public License