Created
May 10, 2013 15:59
-
-
Save evdb/5555370 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(virtualenv-citizenconnect)evdb@custard-2 ~/mysociety/citizenconnect/citizenconnect $ python | |
Python 2.7.3 (default, Aug 8 2012, 14:50:51) | |
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import urlparse | |
>>> o = urlparse.urlparse('http://foo.com/foo/bar?baz=bundy') | |
>>> o | |
ParseResult(scheme='http', netloc='foo.com', path='/foo/bar', params='', query='baz=bundy', fragment='') | |
>>> o.path = o.path + '.html' | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
AttributeError: can't set attribute | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment