# How to read values from external python script

**URL:** <https://forum.visualcomponents.com/t/how-to-read-values-from-external-python-script/801>\
**Category:** Python Programming\
**Created:** [September 12, 2019, 8:29am UTC](https://forum.visualcomponents.com/t/how-to-read-values-from-external-python-script/801 "2019-09-12T08:29:54Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![keke](https://forum.visualcomponents.com/user_avatar/forum.visualcomponents.com/keke/32/762_2.png) [@keke](https://forum.visualcomponents.com/u/keke)\
**Post date:** [September 12, 2019, 12:01pm UTC](https://forum.visualcomponents.com/t/how-to-read-values-from-external-python-script/801/5 "2019-09-12T12:01:43Z")

</div>

Maybe you could use socket communication?

I attach couple of test models which demo TCP and UDP socket communications. In both layouts blue robot is the master. There are two box components (client and server) with python scripts. One box reads blue robot’s joint values and sends them with a socket to the other box component. This reads the values and sets them in the white robot so that it follows the blue robot.

Here you have two scripts communicating inside VC model but the other python script could be external and it should work the same.

-k

[SocketTest\_TCP.vcmx](https://forum.visualcomponents.com/uploads/short-url/pADG4utmeFomZjCHYoFOqetjaOg.vcmx) (588 KB)

[SocketTest\_UDP.vcmx](https://forum.visualcomponents.com/uploads/short-url/6JmgqMfOEvJWZ5xmMz724hBd9db.vcmx) (558 KB)

---

_[View the full topic](https://forum.visualcomponents.com/t/how-to-read-values-from-external-python-script/801)._
