rivescript-java
rivescript-java copied to clipboard
Adding python as a scripting language
I was able to add python as a scripting language using jython and a simple handler.
However I needed to modify this commit in order avoid losing indentation in Object handler.
Adding python requires jython as a dependency, not sure if you want to also add this library to the core as a dep, but my first fix gives the possibility of adding it manually if desired.
Hi @pmioulet the commit you mentioned is also part of #55 right?
Yes we would be interested in adding Python support. Did you implement it using the JSR-223 scripting engine?
Yes correct jython supports it so it did not require too much work on my end :)
Sounds cool, could you make a PR for that (including a PythonObjectIT
similar as e.g. https://github.com/aichaos/rivescript-java/blob/master/rivescript-core/src/integration-test/java/com/rivescript/RubyObjectIT.java
I know I did some experiments with Jython a year ago and faced some problems, but can't remember it exactly anymore I'm afraid.
@pmioulet could you please develop the local changes on another branch than master
?
@pmioulet #55 is merged now. I will wait with a new release for the Python support PR.
I just pushed one (a year after sorry about that got busy on other stuff)