I found an alternative solution by using ** PythonCall.@pyexec**
function PYTHON_2_JULIA(P_Int, P_Float, P_String, P_Vector)
PythonCall.@pyexec """
def PYTHON_2_JULIA(P_Int, P_Float, P_String, P_Vector):
P_Int1 = P_Int + 1
P_Float1 = P_Float * 2.0
P_String1 = P_String + P_String
P_Vector1 = P_Vector + P_Vector
return P_Int1, P_Float1, P_String1, P_Vector1
"""=> PYTHON_2_JULIA
P_Int1, P_Float1, P_String1, P_Vector1 = PythonCall.pyconvert(Any, PYTHON_2_JULIA(P_Int, P_Float, P_String, P_Vector))
return P_Int1, P_Float1, P_String1, P_Vector1
end
To run it:
P_Int=1; P_Float=2.0; P_String=3; P_Vector = [1.0, 2.0, 3.0, 4.0]
P_Int1, P_Float1, P_String1, P_Vector1 = .PYTHON_2_JULIA(P_Int, P_Float, P_String, P_Vector)
@show P_Int1, P_Float1, P_String1, P_Vector1
P_Vector1[1]
This gives as expected
(2, 4.0, 6, [2.0, 4.0, 6.0, 8.0])
2.0