parse through urllib2 in python -


i want convert following statement urllib urllib2 equivalent statement

params = urllib.parse.urlencode( {'status': msg} ) 

i can import urllib2 , urlparse.

urllib2 not "2nd version" of urllib. it's not possible "translate" functionality urllib urllib2.

even the documentation urllib2 states should use urllib url encoding.

extracted urllib2.urlopen documentation:

...data should buffer in standard application/x-www-form-urlencoded format. urllib.urlencode() function takes mapping or sequence of 2-tuples , returns string in format.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -