ninia / jep

Embed Python in Java
Other
1.28k stars 145 forks source link

Add an include path at runtime #477

Closed RevolvingMadness closed 1 year ago

RevolvingMadness commented 1 year ago

Describe the problem I know how to add an include path with JepConfig but I don't know how to add an include path at runtime.

Environment (please complete the following information):

bsteffensmeier commented 1 year ago

You can append additional paths to sys.path in a jep interpreter the same way you would in an ordinary python interpreter. Try using interpreter.exec to execute some python statements that manipulate sys.path.

RevolvingMadness commented 1 year ago

Ok, I'll try that.

RevolvingMadness commented 1 year ago

That worked. Thank you!