The urllib ModuleA high-level interface to HTTP and FTP
Utility functions
urllib.quote(str) # Quotes a string for use in a URL
urllib.quote_plus(str) # Also replaces spaces with '+'
urllib.unquote(str) # Opposite of quote()
urllib.unquote_plus(str) # Opposite of quote_plus()
urllib.urlencode(dict) # Turns a dictionary of key=value
# pairs into a HTTP query-string
urllib.quote("beazley@cs") # Produces "beazley%40cs"
urllib.unquote("%23%21/bin/sh") # Produces "/bin/sh"
|
| <<< | O'Reilly OSCON 2000, Advanced Python Programming, Slide 95 July 17, 2000, beazley@cs.uchicago.edu |
>>> |