I have created a jl file having the following content:
for i in 1:10
println(i)
end
1+2
When I am calling that jl file in python using the following code:
import julia
from julia.api import Julia
j = julia.Julia(compiled_modules=False)
x = j.include("experiment.jl")
only x is being printed as 3. No integers(i) from 1-10 are not being printed. I am getting following warning:
/opt/conda/lib/python3.7/site-packages/julia/core.py:689: FutureWarning: Accessing `Julia().<name>` to obtain Julia objects is deprecated. Use `from julia import Main; Main.<name>` or `jl = Julia(); jl.eval('<name>')`.