Referring to Interpreter (Jython)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • wojciech@gmail.com

    #1

    Referring to Interpreter (Jython)

    Hi everyone,

    I apologize if this is a bit off-topic. I am currently working on a
    Java-based application that is used Jython as a scripting language
    within the actual program. However, for one of my GUI elements, I need
    to pass the actual PythonInterpete r to the constructor.

    I know that in Java there is the "this" keyword which allows an object
    to refer to itself. Does anyone know if there is a way to use a similar
    type of keyword to have the PythonInterpret er refer to itself?

    Thanks,
    Wojciech

    P.S.

    If there is a more appropriate newsgroup to which I should post this,
    please let me know.

  • wojciech@gmail.com

    #2
    Re: Referring to Interpreter (Jython)

    Hi everyone,

    Ah, after some more searching and programming, I got it:

    PythonInterpret er py = new PythonInterpret er();
    py.set("interpr eter", py);

    Thanks,
    Wojciech

    wojciech@gmail. com wrote:
    Hi everyone,
    >
    I apologize if this is a bit off-topic. I am currently working on a
    Java-based application that is used Jython as a scripting language
    within the actual program. However, for one of my GUI elements, I need
    to pass the actual PythonInterpete r to the constructor.
    >
    I know that in Java there is the "this" keyword which allows an object
    to refer to itself. Does anyone know if there is a way to use a similar
    type of keyword to have the PythonInterpret er refer to itself?
    >
    Thanks,
    Wojciech
    >
    P.S.
    >
    If there is a more appropriate newsgroup to which I should post this,
    please let me know.

    Comment

    Working...