This extension adds python 2.7
support to JsMacros 1.2.3+
- use
jython.py
as the end of the file name ifJEP
is also installed to run usingJython
instead ofJEP
. - jython doesn't auto-coerce functions to consumers, so use the extra library:
consumer
Example: consumer.toConsumer(func)
Example: consumer.toBiConsumer(func)
consumers aren't automatically created from py functions so use:
from java.util.function import Consumer
class jc(Consumer):
def __init__(self, fn):
self.accept=fn
same thing for BiConsumers basically.