Return Variable from imported script

Asked by Jeff_Vallis

1.1.0(2015-08-20_01:00nightly)/Mac10.10.5/Java8(64)1.8.0_25-b17

import Import_Script2
result = "script1"
message = "Send this message"
Import_Script2.test_3(result, message)
=============== Import_Script2 ==============

def test_3(result, message):
    result = "the Result"
    print "Passed Message ",message," local result",result

is there anyway to return : result = "the Result"
as after running and printing result I get "script1" which is the value before calling the imported script function

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

def test_3(result, message):
    result = "the Result"
    print "Passed Message ",message," local result",result
    return result

... and then
result = Import_Script2.test_3(result, message)

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#2

Thanks RaiMan, that solved my question.