Return a value from a function result


Ombongi Moraa Fe

Hello Team,

My perl script "" calls python script "" and passes arguments to
it; expecting a return value;

"" uses suds to facilitate soap-based communication with another server
which then returns some value (deliveryStatus)

basically, my script has these 3 major parts;

#part 1 of code to receive arguments from perl script and process them
#part 2 of code - function to get delivery status
def deliveryStatus():
return parameters # or return client.last_received()

#part 3- print output of the function
print deliveryStatus()

running script with the "return parameters" prints this output:

address = "phone_number"
deliveryStatus = "DeliveredToNetwork"

running the same script with "return client.last_received() " instead
prints the soap output

<?xml version="1.0" encoding="UTF-8"?>

With either kind of output returned to my perl script, my table entry is
updated as "failed" since the returned value is basically an undefined
value; what I need therefore is a way to return only the value
"DeliveredToNetwork" so that the database update on my perl script could be
correct; A solution using either the soap output or the array output will
be appreciated.

Someone help me. Thanks in advance.


Ombongi Moraa Faith


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question