You could send a program which open a socket connection and send the result of the function get_actual_joint_position() to your PC.
Otherwise there is some documentation about the RTDE on Universal Robot website with sample program in python. You should find the information you need to get robot position.
https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/
Thank you all.
Best Regards
Oussama Benyaala