This Python script connects to a server and synchronizes the clipboard content. It continuously receives messages from the server and updates the local clipboard accordingly.
- Python 3.x
clipboard
library (install usingpip install clipboard
)
- Modify
server_IP
andserver_port
variables to match your server configuration. - Run the script.
- Connects to the server specified by
server_IP
andserver_port
. - Copies the received message to the local clipboard whenever a new message is received from the server.
- Prints the updated clipboard content to the console.
This Python script sets up a server that listens for incoming connections from clients. It receives clipboard content from clients and updates its own clipboard accordingly using the pyperclip
library.
- Python 3.x
pyperclip
library (install usingpip install pyperclip
)
- Modify
SERVER_HOST
andSERVER_PORT
variables to specify the server's IP address and port. - Run the script.
- Waits for incoming connections from clients.
- Upon connection, receives clipboard content from the client and updates the server's clipboard.
- Prints the received clipboard content to the console.