I feel really dumb for having to post this, but I am brand new to Python, and it isn't anything like PHP, which I do know.
I have a string of data, which contains 1 or more variables, example:
"var1=value1&var2=value2&var3=value3"
I need to send this data to a web server using POST, using urllib.
I have no problems manually formatting the POST data, and send it, but I am having trouble figuring out how to do this with code, without having to write complex code.
It's pretty easy to use split('&') to change this string into an array, but then what?
It looks like I need convert the data to the following syntax before I can urllib.urlencode it:
{"var1":"value1","var2":"value2","var3":"value3"}
Any suggestions would be greatly appreciated!