stream = loader.getResourceAsStream('com/example/action/myAction.py')
reader = java.io.BufferedReader(java.io.InputStreamReader(stream))
script = ''
line = reader.readLine()
while line != None:
    script += line + '\n'
line = reader.readLine()
exec(script)
How do you invoke a python script inside a jar file using python?