[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Escaping variable names

Kamil Wasilewski

3/5/2010 5:44:00 PM

Hi,

Ive got an issue where a variable name needs to have a minus sign (-) in it.

#Python 2.6
from SOAPpy import WSDL
wsdlFile = "http://webapi.allegro.pl/uploader.php?...
server = WSDL.Proxy(wsdlFile)
server.soapproxy.config.argsOrdering = {'doGetCountries': ['country-code', 'webapi-key'] }
server.doGetCountries(country-code=COUNTRYID}, webapi-key=WEBAPIKEY)

The above method allows me to specify the order and name of variables being sent, but i have a problem since the variables have a "-" sign in the middle, is there a way to escape it in the variable name or get around the problem?

Thanks!