How to call an UR program(.urp) in Python via socket communication

Can any one help me on this socket communication?
now I have programmed the movement in UR Polyscope, as next step I want to connect all movement together with Visual code in Python (main program); does any one know how to call these .urp program via socket communication?

Thank you in advance.

Hi,
Why not use a socket and connect to the universal dashboard on port 29999.
Then call “load <yourprogram.urp>”

hi, thanks for replying.

I tried several times, but it does not work, don’t know why…
belows are my program
image

s.send(“load program.urp”)
Without brackets (<>)

Also in your program : where is s.bind ?

You should something like  : 
s.bind((HOST1, PORT1))

https://realpython.com/python-sockets/

hi, thanks a lot, this problem well solved.
the correct one is : s.send((“load program.urp”+“\n”).encode())