This Jupyter notebook should be used in conjunction with pypeoutgoing.ipynb.

Run through the following cells...


In [1]:
import os, sys
sys.path.append(os.path.abspath('../../main/python'))

In [2]:
import thalesians.tsa.pypes as pypes

In [3]:
pype = pypes.Pype(pypes.Direction.INCOMING, name='EXAMPLE', port=5758); pype


Out[3]:
Pype(name="EXAMPLE", direction=Direction.INCOMING, host="localhost", port=5758)

Then run the following cell and send some values from pypeoutgoing.ipynb running in another window. The will be sent over the "pype". Watch them printed below once they are received:


In [4]:
for x in pype: print(x)


Hello World!
66.33260099488918
[55.13672178 77.58669143]
Hello World!
53.84719661874122
[87.48846711 32.03056795]
[13.5154688  98.50896008]
[ 0.83700307 29.97641452]

Once you have finished experimenting, you can close the pype:


In [5]:
pype.close()