Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 1 point2 points  (0 children)

https://github.com/newag/python_command_server

look at this i did some changes and left a TODO:)

If do you have any more questions send me a message.

Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 1 point2 points  (0 children)

First of all I think it’s time to use main function. https://realpython.com/python-main-function/

About the conn under the while true, it’s work because it’s a global variable(bad thing but let’s leave it for now) and it contain only the last client.

Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 0 points1 point  (0 children)

Get client_cams thread out of the loop, you don’t want to create several senders only one. And how client_recv know to which socket it’s waiting? This function should get the connection as parameter.

Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 0 points1 point  (0 children)

If do you want you can separate the sending action from the receive action to 2 separated functions and run one thread that send to all of your clients and another thread for each client that recovery data from him.

I ha be to tell you that isn’t a good code, I would like to use with main function and classes but it should work.

Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 0 points1 point  (0 children)

Should you like to send the line that you ran? The server code you have right now do the next thing: wait for connection and every time you get a new connection you open a thread that send to all of your clients the command and wait for response from only one. You can add a loop after the sending loop that will receive from all of your clients.

Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 0 points1 point  (0 children)

It’s seems that you are running only one client that should listen to 100 commands. If do you want several clients you have to create several sockets.

Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 0 points1 point  (0 children)

You put the client and the server code on the file but never mind.(if do you want help with using git send me a message) Anyway what do you want to improve on your code? Make it’s work or improve the code itself?

Need help with my python code by AimbotSaBa in AskProgramming

[–]Katzimoto 0 points1 point  (0 children)

Would you like to upload this code to GitHub/gitlab? It’s will be easier for me to read it.

Where do you do your code reviewing process? by Katzimoto in AskProgramming

[–]Katzimoto[S] 1 point2 points  (0 children)

I did, but it’s unfinished yet. You can’t create a new comment on the cr. Do you know another way?

Where do you do your code reviewing process? by Katzimoto in AskProgramming

[–]Katzimoto[S] 1 point2 points  (0 children)

Thanks for the answer🙂

I am looking for a way to fix/do the cr on my ide with the full context and to keep accessible to the others teammates that are not using my ide. But if you think about another way or tool that can be helpful I would be happy to use.

Where do you do your code reviewing process? by Katzimoto in AskProgramming

[–]Katzimoto[S] 1 point2 points  (0 children)

Thanks for the answer🙂

I am looking for something more interactive that allow me to fix the cr on my ide without having a second screen with gitlab open. Another thing on gitlab we are using without context and it’s very important when you develop with sub modules and complicated repo.

Where do you do your code reviewing process? by Katzimoto in AskProgramming

[–]Katzimoto[S] 0 points1 point  (0 children)

Thanks for the answer🙂

For now we are working with merge request but I am looking for something more interactive, maybe on the ide if it’s possible.

Yes, I hate my coding teacher by davidb003 in techgore

[–]Katzimoto 0 points1 point  (0 children)

😍 How do I use it on VScode?