I've tried multiple times without success to call my EES code from Python, passing inputs and handling the output. Utilizing the EES Connector from this link (https://pypi.org/project/EES-connector/), I followed the instructions meticulously. Despite successfully applying entries, the issue persists, and the expected values are not returned.
here is the codes I wrote:
======================================
Python code:
------------------------------------------------------
from EESConnect import EESConnector
from tkinter import filedialog
import tkinter as tk
#select the ees file path
root = tk.Tk()
root.withdraw()
ees_file_path = filedialog.askopenfilename()
with EESConnector() as ees:
ees.ees_file_path = ees_file_path
result = ees.calculate(["air_ha", 383, 101.325])
print(result[1])
======================================
EES code:
------------------------------------------------------
$UnitSystem SI K kPa kJ
$Import 'ees_input.dat' file$ F$ T P
h=enthalpy(F$, T=T, P=P)
s=entropy(F$, T=T, P=P)
$Export 'ees_output.dat' file$ h s
======================================
Thank you in advance for your response.