Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
python_coupling [2020/02/18 10:59]
argemiro
python_coupling [2020/02/18 19:15] (current)
hermann
Line 1: Line 1:
 +{{ :​logo_logo.png?​400 |}}
 +\\
 +\\
 ====== Dinamica EGO and Python Coupling ====== ====== Dinamica EGO and Python Coupling ======
- 
-Python support is present in the "​Python"​ branch in the repositories (on top of the "​Tasks"​ branch). To compile the branch, it is necessary to have Python dependencies in dff_dependencies_windows. The version containing the dependencies can be downloaded at [[http://​csr.ufmg.br/​~romulo/​dff_dependencies_windows_python.7z]]. For execution, it is necessary to have the folder "​PyEnvironment"​ inside the Dinamica folder, the PyEnvironment can also be obtained in [[http://​csr.ufmg.br/​~romulo/​PyEnvironment.7z]]. 
  
 === Example: Calculate Python Expression === === Example: Calculate Python Expression ===
Line 46: Line 47:
 dinamica.outputs["​tabela"​] = dinamica.prepareTable(dinamica.inputs["​t1"​],​ 3) dinamica.outputs["​tabela"​] = dinamica.prepareTable(dinamica.inputs["​t1"​],​ 3)
 </​code>​ </​code>​
-Coloca uma saída na struct ​com nome "tabela", ​contendo uma tabela com colunas de chaveEssa função não é necessária se a tabela já estiver com os '​*' ​nos nomes da coluna ​(portanto o usuário poderia fazer apenas ​dinamica.outputs["​teste2"​] = dinamica.inputs["​t1"​]). ​Toda tabela no Python ​é tratada como uma lista de listasonde cada lista interna corresponde ​uma **linha** da tabela.+Place an output in the struct ​named "table", ​containing a table with key columnsThis function is not necessary if the table already has '​*' ​in the column names (so the user could only do dinamica.outputs ["​teste2"​] = dinamica.inputs ["​t1"​]). ​Every table in Python ​is treated as a list of listswhere each internal list corresponds to a ** row ** of the table:
 \\  \\ 
 <​code>​ <​code>​