In order to create a local chat app using Python, you can use the `socket` library. Here is a simple script to get you started:

```
import socket

# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Bind the socket to a specific address and port
server_address = ('localhost', 8080)
print('Starting up on {} port {}'.format(*server_address))
sock.bind(server_address)

# Listen for incoming connections
sock.listen(1)
print('Waiting for a connection...')

# Wait for a connection
connection, client_address = sock.accept()
print('Connected by', client_address)

# Send and receive messages
while True:
    # Send a message
    message = input('You: ')
    connection.sendall(message.encode())

    # Receive a message
    data = connection.recv(1024).decode()
    print('Client:', data)

    # Close the connection
    if message == 'exit':
        connection.close()
        break
```

In this example, the script creates a socket object and binds it to a specific address and port. It then listens for incoming connections and waits for a connection to be established. Once a connection is established, it sends and receives messages with the client until the user enters 'exit', at which point it closes the connection.

You can modify this script to meet your specific needs for a chat app.
Scrivi uno script Python che crei un'app di chat locale utilizzando una libreria.