Home | Trees | Indices | Help |
|
---|
|
Classes | |
odict Ordered dict implementation. |
Functions | |||
iterator |
|
||
bool
|
|
||
basestring
|
|
Variables | |
tzinfo |
UTC = <UTC> tzinfo object for UTC (Universal Time). |
tzinfo |
LOCALTZ = LocalTimezone() tzinfo object for local time-zone. |
Function Details |
Yield all items in an iterable collection that are distinct. Unlike when using sets for a similar effect, the original ordering of the items in the collection is preserved by this function. >>> print list(distinct([1, 2, 1, 3, 4, 4])) [1, 2, 3, 4] >>> print list(distinct('foobar')) ['f', 'o', 'b', 'a', 'r']
|
Extended pathname pattern matching. This function is similar to what is provided by the fnmatch module in the Python standard library, but:
Examples: >>> pathmatch('**.py', 'bar.py') True >>> pathmatch('**.py', 'foo/bar/baz.py') True >>> pathmatch('**.py', 'templates/index.html') False >>> pathmatch('**/templates/*.html', 'templates/index.html') True >>> pathmatch('**/templates/*.html', 'templates/foo/bar.html') False
|
Compute the relative path to one path from another. >>> relpath('foo/bar.txt', '').replace(os.sep, '/') 'foo/bar.txt' >>> relpath('foo/bar.txt', 'foo').replace(os.sep, '/') 'bar.txt' >>> relpath('foo/bar.txt', 'baz').replace(os.sep, '/') '../foo/bar.txt'
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Fri Sep 7 12:36:49 2007 | http://epydoc.sourceforge.net |