Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOAPpy - reserved word in named parameter list

I'm using SOAPpy to access a SOAP Webservice. This call to the function findPathwaysByText works just fine:

server.findPathwaysByText (query= 'WP619', species = 'Mus musculus')

However, this call to the function login does not:

server.login (user='amarillion', pass='*****')

Because pass is a reserved word, python won't run this. Is there a workaround?

like image 386
amarillion Avatar asked Dec 12 '25 04:12

amarillion


1 Answers

You could try:

d = {'user':'amarillion', 'pass':'*****' }
server.login(**d)

This passes in the given dictionary as though they were keyword arguments (the **)

like image 94
brian-brazil Avatar answered Dec 14 '25 19:12

brian-brazil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!