OH GOD me and my friend were looking a perfect tutorial for this like last week and you released these!!! You'll probably go down as the most loved programmer!!
@sentdex5 жыл бұрын
🥰
@ali_adeeb5 жыл бұрын
@@sentdex I don't even know what that means but I dont care thanks for replying!!
@sreetamakundu14784 жыл бұрын
@@ali_adeeb hi
@DeepakKumar-os4bl5 жыл бұрын
Just for info. If anybody has any difficulty in understanding the code in the video, head over to the text version of the tutorial. It has been explained beautifully. Thanks Harrison :-)
@calebmwaura86315 жыл бұрын
where is the text version buddy??
@kanknw5 жыл бұрын
@@calebmwaura8631 it's in the description
@calebmwaura86315 жыл бұрын
@@kanknw please send me a link...kindly..
@anirbandey3035 жыл бұрын
I've seen a lot of tutorial videos of many people on many things but your way of explanation is the best! It's clear and simple, I love it.
@sentdex5 жыл бұрын
Great to hear!
@nikodemus79005 жыл бұрын
The moment when you are sure that you have seen all of his mugs... It is an illusion
@karanrandhawa13765 жыл бұрын
you literally have a video for everything. I LOVE IT
@MyPlaylist-xq8en5 жыл бұрын
I've been waiting for this.....Great Tutorial and Awesome Video!
@georgemavimbela5 жыл бұрын
this is awesome..thanks I will use this when getting serious on my Python coding lessons
@KushChoudhary5 жыл бұрын
are u serious now?
@KushChoudhary5 жыл бұрын
again am here, worried for u. after 1 month
@KushChoudhary4 жыл бұрын
Hey Friend, I hope u are serious now edit: After 1 month
@dazewaker262 Жыл бұрын
Are you serious now ?
@mt.erebus33703 жыл бұрын
Hey sentdex buddy ol' pal, are you considering continuing this tutorial? found it super fun and learned a ton. would love to see gui implementation!
@arozoid2 жыл бұрын
Check out the Kivy tutorial for GUI implementation.
@wathekghenimi91335 жыл бұрын
you're a legend thank you so much this is helps me in my project
@vomomediaonline3 жыл бұрын
I haven’t done this but I am very sure if I do, it’s gonna work ! This is so amazing! It has everything I want, I want to say a very big thank you 🙏🙂 keep it up bro
@dmytroohorodnik35625 жыл бұрын
Hell yeah..! Really great tutorial. Exactly what I needed. Wish you good fortune :-)
@marv-n6m5 жыл бұрын
In your written code for the client there is a typo in the last exception: except Exception as e: # Any other exception - something happened, exit print('Reading error: '.format(str(e))) sys.exit() you're formating but there are no {} inside the string. Love that tutorial, was a lot of fun to build that. Have a good one!
@copanomo13 жыл бұрын
Could you please explain more about blocking vs non-blocking recv() and how to implement command/response protocols with timeouts?
@marinaurrey52465 жыл бұрын
Thank you! Very interesting experience. You do good tutorials)
@sentdex5 жыл бұрын
Happy to share!
@frbuccoliero5 жыл бұрын
"Cool!" Part 2 the revenge of the cold
@copanomo13 жыл бұрын
Excellent video series! Thank you!
@bitcointrader85865 жыл бұрын
Best python youtuber hands down
@Snv_235 жыл бұрын
always love your incredible tea cups)))
@matbaker82945 жыл бұрын
Great tutorial. Has sent me in the right direction.
@bn_ln2 жыл бұрын
great series - many thanks
@lbxmega65744 жыл бұрын
How can I connect to the server from another computer? I have tried multiple IP’s and received various errors such as “no connect route” and “host error”. Anyway I can connect a remote device to my server?
@ScottUlmer5 жыл бұрын
+1 on seeing you do this with Qt5 :)
@matsinorge4 жыл бұрын
Thank you for this tutorial!! ❤️
@Zephyr-tg9hu3 жыл бұрын
Awesome tutorial, thanks.
@johncarcher2 жыл бұрын
Great video, only 1 issue with the code. How could I make it so that it constantly refreshes so I don't have to send a message in order to receive new ones if that makes sense. Basically if I send a message then person 2 sends a message, I would have to send a message to receive the message that they sent me.
@pi_r_mlm4 жыл бұрын
20:46 : You can create threads to receive and send at the same time
@lakshaygarg73114 жыл бұрын
can use share tutorial for this
@ruleofthree17335 жыл бұрын
Would be cool if you did a video expanding on this with regards to the server looking for keywords, and then executing a bit of script from a program you've written. Like !roll sent from a user randoms a d6. Or incorperating a little 'mini game' involving another .py file.
@alpstinger50834 жыл бұрын
Thanks man for this awesome tutorial!!!! From where do you learn all this stuff? Because you teach everything so perfectly!
@anchalmallick33354 жыл бұрын
Thankyou! You are my inspiration :)
@Bvic3 Жыл бұрын
In case you don't like the weird way to convert with f-strings/strip to manage bytes, here is another version: bytes_header = int.to_bytes(len(bytes_message), HEADER_LENTH, "big") int_header = int.from_bytes(bytes_header, "big") And to convert utf8-string to bytes: bytes_data = bytes(data, "utf-8") utf8_data = bytes_data.decode("utf-8")
@rydxz61492 жыл бұрын
How to make the messages pop up instant?
@everton.colombo4 жыл бұрын
For those of you interested, I made a GUI version of this using tkinter that also constantly checks for new messages. Here, have a look: github.com/Everton-Colombo/Socket-Chatroom
@sentdex4 жыл бұрын
Please provide attribution for the socket bits
@bubbachubs82244 жыл бұрын
How do I make this actually work across multiple computers, so that I can actually talk to other people and not myself
@AdiParamartha5 жыл бұрын
thank you, very helpfull , hopefully i could implement it to iot devices soon
@AMOs-sy8vl5 жыл бұрын
Still you are working with us thank you
@nuklearboysymbiote5 жыл бұрын
in your text-based tutorial you didn't import sys, might want to fix that
@icicles03 жыл бұрын
help at 17:00 I got an error for server.py for line 27 :"IndentationError: Unindent does not match any outer indentation level"
@ishaanverma12685 жыл бұрын
Ayyy he switched to sublime
@pra8eek5 жыл бұрын
Great tutorial! Is the GUI video uploaded yet?
@judeleon84854 жыл бұрын
Great tutorial. Where can find the server and client code scripts written in this tutorial?
@luvkhajuria2074 жыл бұрын
for handling client inputs and printing other inputs of other clients at the same time for this, you just have to make input non-blocking. this may help I guess. r_list , _,exe_list = select.select([sys.stdin,client_socket],[],[sys.stdin,client_socket]) for read in r_list: if read == client_socket: msg = client_socket.recv() else: out_msg = sys.stdin.readline().decode('utf8') client_socket.send(out_msg) btw by far best tutorial on sockets and one of the best channel on youtube
@mihirbhudia40644 жыл бұрын
I am very confused atm. I have followed your exact code, even copy and pasted the code from your website, but I do not seem to get the "new client connection" message. Does anyone have any possible reason for this that there could be?
@ScottUlmer5 жыл бұрын
Hey I found a way to attach it into a UI. The biggest "issue" is that I had to break your While True and instead had it look for new messages every 1 second. While there might be some lag (literally up to a second), I find this more than useful to people who would be following these tutorials. Just so you know I simply took your code and modified it to work with a .ui file. Using a .ui with Qt Designer is very user-friendly. If you are interested in what I made let me know.
@wesleywithrow35245 жыл бұрын
He has a tutorial on how to create a UI for this using Kivy.
@Froggles_4 жыл бұрын
Can you please write the code into the comment section or the description because I’m really struggling to keep up on everything you are doing thank you:)
@CRsquared644 жыл бұрын
the server doesn’t show connections on when a message is sent? please help.
@liuyang94834 жыл бұрын
can we make two threads that one is for sending and the other is for receiving so that you dont have to press enter to check any incoming msg. It just shows up.
@HT794 жыл бұрын
yep, that's one way to do it
@MstrangerGaming8 ай бұрын
i know this is an old video but the logic still works, now the question is , if i want to make this public (connection with different network) then how the connection will work
@wompytompylompyshompy4 жыл бұрын
I love your videos and actually highly appreciate it if you would teach us (I'm a total python noob just following the steps of the tutorial) how to put this in a GUI.
@jake26634 жыл бұрын
The tkinter library might be a good place to start for simplicity but QT is better
@swiftlyexplained7034 жыл бұрын
It worked! Thank you! :)
@MustafaAktasVEVO5 жыл бұрын
Hello sentdex, In this application we r only able to send messages, but what if want to send an `image` to the server?
@MustafaAktasVEVO5 жыл бұрын
Guys I am done with this problem. If u wonder how to send an image to server/client in python, let me know.
@ilyaprieur82545 жыл бұрын
@@MustafaAktasVEVO me.
@Die__Ene4 жыл бұрын
I havn't tried it myself to see if it works but you could use part 3 in this tutorial to pickle an image and send it. The receiver can then unpickle and write the image data to a .png file and that should get you the image. I guess you could also just send the raw binary data directly and write that to a .png. What solution did you come up with?
@samdose46725 жыл бұрын
Couldn't you just use threading to update the incoming messages without being blocked by the input?
@xCleverton5 жыл бұрын
would like to know how this could be done
@devallazzydevs85445 жыл бұрын
Its a great video...can you tell me how to run python file from the local server to client server? or is there any other ways to run python file?
@Mzkysti5 жыл бұрын
Great Socket tutorial, thanks. It kept me wondering is it possible to run these in Sublime Text?
@rhulanimogotsi68693 жыл бұрын
How do I keep the socket open in the background to accept any incoming messages, even if the app isn’t open
@caseycruz79592 жыл бұрын
Is there a way that the client can pick who they want to send a message to if there are more than two clients?
@eddied.34264 жыл бұрын
This is great. Could you make a tutorial on how to make a video chat program? Info on the web seems scarce on this point. Also, how do you connect server to clients over the internet?
@johncarcher2 жыл бұрын
To get the server to connect clients over the internet, I'd say set the server to the IP of your internet router then get the clients to set their IPs to the routers then the Server will listne to the routers port and the clients will connect to the routers port.
@sanasm33594 жыл бұрын
u actually save me ! that is my project for university but in which video u have worked on UI?
@hichambenhammouda73684 жыл бұрын
really great tutorial, I actually took your idea and used a Tkinter GUI for it. I have one question though , if say like I want the server to make a list of all connected clients and broadcast that list so it can be shown in the client GUI and ofcours it would be continuously update.. how can I do that ?
@SurferBoi5613 жыл бұрын
Help line 41, in user = receive_message(client_socket) NameError: name 'receive_message' is not defined
@samuelgriffin19555 жыл бұрын
Thanks, really helpful
@richyuh5 жыл бұрын
How is the client code exiting out of the while True: # receive things and not stuck in an infinite loop? Thank you for the tutorial
@adityapandey11765 жыл бұрын
Hello. I wanna ask you something please. I am an intermediate in python programming language and I learned all that from youtube. So I now wanna learn Artificial intelligence. But the point is that I am not able to get proper video lectures and procedures to install tensorflow and all that. I have a laptop with intel atom processor and 2 gb ram with no grapgics card and windows 10. So, now if I can install tensorflow then how to install it and also where I can get free video lectures plzz suppprt me and reply please
@mateuszkolpa5 жыл бұрын
pythonprogramming.net/introduction-deep-learning-python-tensorflow-keras/ But I wouldn't start with TensorFlow. Probably better idea to start playing Machine Learning and stuff like that is for example: pythonprogramming.net/image-recognition-python/ Or something little more fun to play with: pythonprogramming.net/loading-images-python-opencv-tutorial/ this one is more picture and video oriented, but its' still fun :)
@gmqwerty24684 жыл бұрын
2gb ram? u sure u wanna do this?
@Strawberry-oz1qu2 жыл бұрын
Please continue this series, I tried both Threading and Multiprocessing but the message from the other side doesn't come simultaneously. Please make a video and guide us.
@shreyashdeshmukh57903 жыл бұрын
Does this work on public or just localhost??
@riaindaly90262 жыл бұрын
why do i have to keep hitting enter to see new messages?
@hx9d6745 жыл бұрын
So there is or isn't way to make chat automatically updated when new message is recived?
@felix.taken02 жыл бұрын
Im getting an error: Reading error [WinError 10054] An existing connection was forcibly closed by the remote host
@2wen982 жыл бұрын
you are trying to run server twice
@jaffryjaman49515 жыл бұрын
Hello , do you have any plans to make a series on computational fluid dynamics ? The thing is that i am familiar with python , but there are limited tutorials on how to use the python modules used for computational fluid dynamics. It would be very useful if you made a tutorial series on cfd for the aeronautical engineering communities . Thanks
@menandmice5 жыл бұрын
Computational fluid dynamics is an extremely theoretical area of science. A sort of rocket science. To make tutorials about that and Python would demand lots of time and expertise. Many, many months.
@jaffryjaman49515 жыл бұрын
@@menandmice thanks for letting me know
@bcddd2144 жыл бұрын
I totally used/sponged this.
@no5x9375 жыл бұрын
Excellent Series on Python 3 Sockets. I got it to work with the Server in one terminal and one Client in another terminal. When I add a 2nd Client, the Server recognizes it and also receives messages. But the two Clients don't recognize each other and they eventually exit from a General Error invalid literal for int() with base 10: 'Hello Serv' Any ideas?
@ravindramohith70822 жыл бұрын
yeah same error any soln for this prob?
@yorozuya61155 жыл бұрын
Nice tutorial, can I send message from server to clients? without block?
@ottop13774 жыл бұрын
how do i make this work accross multiple computers? i've tried using a hamachi server but it just doesnt connect. even my own ipv4 address doesnt work, it says the ip is not valid in its context. can someone please help?
@Jonas-odt4 жыл бұрын
Greate video! Question will this code be able to control the clients pc? like run commands in the command line and such? Thanks!
@ottop13774 жыл бұрын
no.
@ATXpert5 жыл бұрын
if i want to make the application public to download, and a private chat(person to person) how do i know which ports are open for use in the clients system, and also i suppose i need to make a server that will connect between two clients, by username. main question is how do i know which ports are ready to use
@unix.geektarektalaat16315 жыл бұрын
Hey, I have a question, how do you interact with each thread ? for instance, if you want to send data from server to a specific client using whatever thread id or anything else. So if server got 3 clients connected, now you want the server to send data to specific client by using thread id or thread ident number or anything. I tried and failed. Can you guide me ?
@shinydewott4 жыл бұрын
I know this is an old video, but I've been trying to host a game I've been working online to play with a friend. I have managed to get the sockets to work on my local internet but I can't find any explanation on how to do it online.
@lolj20945 жыл бұрын
great stuff as always man
@rahulmundlamuri79995 жыл бұрын
I am getting an error after sending the first message (General error name 'username_length' is not defined)
@tanmays96534 жыл бұрын
did u get the answer of this error
@gamhcrew5563 жыл бұрын
will your program work if the client and server programs are running from different devices?
@santhoshxd5 жыл бұрын
bro when are you going to do the GUI? btw Very nice video brooo...helped a lot!!!
@sentdex5 жыл бұрын
Already did, with Kivy, here: pythonprogramming.net/introduction-kivy-application-python-tutorial/
@imagineexistance45385 жыл бұрын
For the message receiving without input try _thread or if you don’t have it as a module look at threading(I use pythonista and have _thread but pythonista has different things).and try and make the output and input functions because the module runs two functions and tuples of them(if no input use (,)), The module will continuously run both simotaniously, it is not perfect but works good on my projects, try it out with a copy, it may work or completely break the code
@vachaarraniry4 жыл бұрын
what do i do i got this error General error int() argument must be a string, a bytes-like object or a number, not 'builtin_function_or_method'
@laymanclasher10615 жыл бұрын
i followed the whole video , but my server is not responding, what will be the possible error?????
@DestinyCreatesEntertainment5 жыл бұрын
on the website you forgot to import sys. also, unused import statement select on client
@csmh2 жыл бұрын
Brother , is this work on wide area network ( WAN ) .....
@JPR1375 жыл бұрын
yOU doing this from memory omg
@pritkalariya39763 жыл бұрын
Can anyone share the link to the GUI tutorial for this chat application.
@YashovardhanJha5 жыл бұрын
which ip have you put in the client and server file when you are connecting with other machines on other networks
@jonathanmarx7524 жыл бұрын
HI, I tried running it from 2 different computers and it didn't work. how should I change it so it works between different computers?
@sanjaytp94105 жыл бұрын
Hey, did the vid for creating the GUI part of a chat room get posted on youtube..?
@KushChoudhary5 жыл бұрын
i will be making that with source code sooner
@hairandbeautycenter72162 жыл бұрын
There is still that one error... After replacing AND with OR.. Error: Reding error.... A non-blocking socket operation could not be completed... Plzz Help me... Thanks in advance...
@voidling24964 жыл бұрын
i put a wait for a key to get pressed before the message thing so you have to press a key to send a message but it updates automaticly if you dont type noting os dependent
@happymonkey17035 жыл бұрын
Hey um i have a problem, my client is having trouble connecting with the server, well the server is not printing out the part where it said accepted new connection... . This video is great help!
@ottoyang4 жыл бұрын
Try turning off your antivirus, That also happened to me
@zdrasbuytye4 жыл бұрын
can I run this codes on ubuntu shell ? and what IDE are you using ?
@furiateds3 жыл бұрын
when opening cmd to open my server, it says “can’t find ‘__main__’ module” someone help
@Fuzti133 жыл бұрын
Could someone explain to me what the ":
@stefanlin50863 жыл бұрын
wouldnt it be better to easier to use threading instead
@nishtha75974 жыл бұрын
Nyc tutorial..can you please make a tutorial how to connect it with face recognition for more security. I need to do this in my project but can't find any tutorial for that.
@tylerboucher21084 жыл бұрын
it wont let me launch the server or the client from cmd help plzzzzz
@ZemZem4 жыл бұрын
Sentdex, is it possible to make a socket with bluetooth on PC (Using AF_BLUETOOTH) ? because I always get an error saying that there is nothing called AF_BLUETOOTH, and when I made a search I found that some people claimed that bluetooth socket with python is not supported in Windows ...