jeffs@jeffs-desktop:~/python (hints_dev)* $ curl localhost:1234
hello!jeffs@jeffs-desktop:~/python (hints_dev)* $ curl -6 http://[2602:61:7e5c:3b00:e52d:317e:9f1:2300]:1234
curl: (7) Failed to connect to 2602:61:7e5c:3b00:e52d:317e:9f1:2300 port 1234: Connection refused
jeffs@jeffs-desktop:~/python (hints_dev)* $
So it works under IPv4 and does not work under IPv6. What does it look like on the server side?
jeffs@jeffs-desktop:~/python (hints_dev)* $ python webpy_demo.py 1234
I suspect the problem is that you are using public_ip as the IPv4 address. Try using 127.0.0.1. That should work.
That it doesn't work under IPv6 is not unexpected and could probably be fixed easily.
Best,
Jeff