Elio,
The attached example will help you get started with the ExternalProgram object. The external program in the example is a Python program 'JSP_IO_test.py' that accept two numerical values as command line inputs and returns the sum of the two values.
The DataSource input provides two expressions, { this.Value(1) } { 1 }, that return the values passed to be passed to the Python program. The output 'Value' returns the result of the calculation that was performed for the last entity received by the ExternalProgram object. With these inputs, the Value output is increased by one each time the ExternaProgram object receives an entity.
Note that you will need to modify the ProgramFile input to point to the Python interpreter on your computer. For my system, the input is '/C:/ProgramData/Anaconda3/python.exe'.
Harry