I want to connect two computers and send messages between them,and I'm not sure why the socket module doesn't work for me.So is there any other ways to connect two computers?
1 Answer
If you wanna solve this problem,
First thing , you should check two computer's network connecting,
in terminal you can use one computer of yours to typing ping ${target_computer_address}and check terminal's echo to make sure two computer network connection is working.
Second thing , you can use python to open a tcp port to listen and print recv data in screen ,and in other computer telnet previous computer ip:port just typing someting, make sure python can print you's typing character correct.
3 Comments
Chin Hong Tan
Thanks.This is working in my home but doesn't work in my school...And I don't know why python didn't appear in windows firewall "Allow an app through Windows Firewall" section.I need to adjust Windows firewall,allowing it connect to the network then only my code will work.Do you know any way to make python go through Windows Firewall?
Chin Hong Tan
I can see python in windows firewall "Allow an app through Windows Firewall" section using my computers at home but not school.
winters
@ChinHongTan maybe your school's computer dosen't open windows firewall , in fact , some people often disable windows firewall after install windows, for professional user , windows firewall is useless .