Assume that I am executing following code sample (jython). Is there a way to know which type does the object PyObject belong to? To further clarify what I am asking of , I am inserting some jruby code. So is there a way that I can to something like
        (ob instanceof _ _ _ _)

// Jython code
        String fileName = "/home/heshan/workspace/Axis2Service ver2/src/mymessagereceiver/filepy.py";
        String s4 = "celciusToFarenheit("+args+")";
        PyObject ob = interp.eval(s4);

// Jruby code
        IRubyObject obj = runtime.evalScript((scriptreader.readWithMetaData(reader)+FunctionName));
        String string_result = "";
        Boolean bool_result = null;
        Integer int_result = null;
        Double double_result = null;

/* jruby is giving a feature like this , so we can do a instance of operation on our object. Is there a simillar way to do this using jython? Then what is it?*/
                if (obj instanceof RubyString) {
                    string_result = obj.toString();
                    envelope.getBody().addChild(fac.createOMElement(string_result, null));

                if(obj instanceof RubyBoolean){
                    // Logic

                if((obj instanceof RubyBigDecimal) | (obj instanceof RubyFloat)){
                    // Logic

                if(obj instanceof RubyInteger) {
                    // Logic

                if (obj == null) {
                    throw new AxisFault("RubyScriptNoanswer");

Heshan Suriyaarachchi