AnsweredAssumed Answered

How can I use Python script in DevTest script step?

Question asked by sri_vds on Nov 16, 2015
Latest reply on Nov 16, 2015 by sri_vds

A simple javascript like this

function square(x){
return x*x;
}

square(5);

 

when executed displays

Message "Script executed. Result is 25.0"

 

But a similar python script executes but returns no result. ( fyi, I selected python as scripting language in dropdown option)

def square(x):
    return x*x

if __name__ == "__main__":
    square(5)

 

Message "Script executed without a result"

 

what am I doing wrong? and is there a better way to use Python in DevTest?

Outcomes