class twisted.python.urlpath.URLPath: (source)
A representation of a URL.
| Instance Variable | scheme | The scheme of the URL (e.g. 'http'). |
| Instance Variable | netloc | The network location ("host"). |
| Instance Variable | path | The path on the network location. |
| Instance Variable | query | The query argument (the portion after ? in the URL). |
| Instance Variable | fragment | The page fragment (the portion after # in the URL). |
| Method | __init__ | Undocumented |
| Method | pathList | Split this URL's path into its components. |
| Class Method | fromString | Make a URLPath from a str or unicode. |
| Class Method | fromBytes | Make a URLPath from a bytes. |
| Class Method | fromRequest | Make a URLPath from a twisted.web.http.Request. |
| Method | sibling | Get the sibling of the current URLPath. A sibling is a file which is in the same directory as the current file. |
| Method | child | Get the child of this URLPath. |
| Method | parent | Get the parent directory of this URLPath. |
| Method | here | Get the current directory of this URLPath. |
| Method | click | Return a path which is the URL where a browser would presumably take you if you clicked on a link with an HREF as given. |
| Method | __str__ | The str of a URLPath is its URL text. |
| Method | __repr__ | The repr of a URLPath is an eval-able expression which will construct a similar URLPath. |
| Instance Variable | _scheme | Undocumented |
| Instance Variable | _netloc | Undocumented |
| Instance Variable | _path | Undocumented |
| Instance Variable | _query | Undocumented |
| Instance Variable | _fragment | Undocumented |
| Method | _reconstitute | Reconstitute this URLPath from all its given attributes. |
| Instance Variable | _url | Undocumented |
| Class Method | _fromURL | Reconstruct all the public instance variables of this URLPath from its underlying _URL. |
| Method | _mod | Return a modified copy of self using newURL, keeping the query string if keepQuery is True. |
Undocumented
Make a URLPath from a twisted.web.http.Request.
| Parameters | klass | Undocumented |
| request | A twisted.web.http.Request to make the URLPath from. | |
| Returns | a new URLPath derived from the given request. (type: URLPath) | |
Return a modified copy of self using newURL, keeping the query string if keepQuery is True.
| Parameters | newURL | a URL to derive a new URLPath from (type: URL) |
| keepQuery | if True, preserve the query parameters from self on the new URLPath; if False, give the new URLPath no query parameters. (type: bool) | |
| Returns | a new URLPath | |