Results 1 to 1 of 1
  1. #1
    Xen
    Xen is offline Member
    Join Date
    Jan 2015
    Posts
    86
    Rep Power
    0

    Default Jython and Apache Bean Scripting Framework

    I'm not sure if this is the right place to ask and if I can still ask anything ;-) but.

    Apache Commons contains the BSF which is like a wrapper or common interface to various scripting languages.

    I was checking out out the Jython thing at The Jython Project and I was confused about one thing they don't explain.

    Does Jython (and hence, that BSF) require compilation of Python scripts before you can use them and can this be done runtime from the application that would use the scripts, or not?

    In other words, how easy is it to let some (other user) write a script for your application (for instance) and then to dynamically load it and have it be executed? I'm thinking of e.g. a script that has a single point of execution that I'd want, to give control to the script and have it perform several actions on the application in retrospection (retribution) :p.

    You could for instance use python as a better suited way to write control-flow (user interaction) scripts that provide their own narrative as the user enters choices and ends up in various other 'places' or rooms that each have their own script and what happens next things. A room may have certain "MUD" like facilities that have their own scripting and events that take place. They have their own exits and entries and each room or context of a room may be scripted in a way that allows for very flexible and natural extensions to the general outline of the Java application that serves as the framework for embedding such narratives.

    I wonder if compilation is an issue for this, probably not. But I'm still confused as to what it is. I can imagine situations in which recompiling the application is a no no (as it is running somewhere) but a new script has been added/extended. The application may be running distributed in various places and recompiling it or updating it would be something you'd have to avoid. Meanwhile redistributing the scripts or different scripts would be easier if the running server could simply incorporate them runtime.
    Last edited by Xen; 08-06-2015 at 12:15 AM.

Similar Threads

  1. Jython Swing Trouble
    By cocomojoe81 in forum AWT / Swing
    Replies: 0
    Last Post: 06-06-2013, 04:11 AM
  2. Replies: 1
    Last Post: 03-23-2011, 07:55 AM
  3. 500 Internal Server Error javax.servlet.jsp.JspException: Cannot find bean org.apache
    By gurpreet.singh in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-22-2011, 05:41 AM
  4. Jython : python for java
    By cotarelo in forum New To Java
    Replies: 1
    Last Post: 03-25-2010, 08:53 AM
  5. Replies: 0
    Last Post: 04-07-2008, 07:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •