fix: lib/util.py: dict_subset(): raise an error if collections.OrderedDict isn't available, because some callers may depend on this. note that using dict instead of OrderedDict may be the cause of the joining on the wrong columns bug (issue #902).
bugfix: lib/util.py: use OrderedDict from collections rather than ordereddict to work with Mac OS X 10.8 Mountain Lion (http://vegpath.org/links/#OrderedDict)
moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).
Replaced str() with strings.ustr() (or equivalent) everywhere needed, to avoid future UnicodeEncodeErrors
util.py: dict_subset(): Fall back to using dict when OrderedDict is not available, in order to support making the maps on nimoy
util.py: list_subset(): Fixed bug where using '+' to append the rest of the list didn't work if '+' was the first index, because max() cannot be called on an empty list
util.py: list_subset(): Made an index of '+' append the rest of the list
util.py: dict_subset(): Use OrderedDict so that order of keys in input dict (if ordered) will be preserved
util.py: DefaultDict: Use dicts.DictProxy instead of collections.defaultdict so that it provides a view of the given dict instead of copying it
util.py: NamedTuple inherits from objects.BasicObject so that it's comparable and hashable. This fixes a bug in dicts.make_hashable() where the NamedTuple created for a dict would appear to be hashable but would always compare as unequal.
util.py: Added class_name()
Compare object()-based sentinel values using is. Where sentinel values must be compared using ==, use rand.rand_int() instead.
util.py: list_subset(): Added default param to specify the value to use for invalid indexes (if any)
util.py: NamedTuple.__iter__(): Removed unnecessary **attrs param
util.py: NamedTuple: Made it usable as a hashable dict (with string keys) by adding iter() and getitem()
util.py: Added all_equal(), all_equal_ignore_none(), have_same_value()
util.py: Added sort_by_len(), shortest(), longest()
util.py: list_subset(): Support special idxs value None, which returns entire list
util.py: Added coalesce()
lib/*.py: Removed svn:executable property to turn execute bit off
util.py: Added classes_eq()
util.py: Added NamedTuple
util.py: Added list_as_length(). Documented that list_set_length() takes a list, not a tuple. Documented that ListDict must have len(list_) == len(keys).
util.py: Added list_set_length(). Changed list_set() to use list_set_length().
util.py: none_if(): Allow multiple none_vals using varargs
util.py: Added do_ignore_none()
util.py: Added list_replace()
util.py: Added list_set() and list_setdefault()
util.py: Added all_not_none() and bool2str()
util.py: ListDict: str(): Print each entry on its own line, in the order the keys were provided
util.py: Added WrapIter to wrap an iterator and ListDict to view a list as a dict
util.py: Added list_flip()
util.py: Added DefaultDict to wrap collections.defaultdict with a simple value passed in the constructor, defaulting to None. Added dict_subset_right_join() to fill in None for subset keys that don't exist.
util.py: Fixed cast() to not cast a subclass to a superclass (which doesn't make sense in a dynamically-typed language). Added none_if().
util.py: Removed locale import since it's no longer used by util
util.py: Added list_eq_is() to compare two lists using is
util.py: Added list_get()
util.py: Added is_list()
Moved value to string conversion functions infrom util.py to new module format.py
util.py: Added int2str()
util.py: Added basic to_si() to add SI prefix to value
util.py: Added format_str() to use locale-specific formatting settings, including thousands separator. Use it in to_percent().
util.py: Added to_percent()
util.py: Added list_subset()
util.py: Added function wrappers for statements noop() and and_()
util.py: Added cast() to cast a value while passing None through
util.py: Don't print type name in ConstraintError message because sometimes an entry tuple (e.g. from a dict) is checked, and then the type isn't useful
util.py: Added is_str() and CheckedIter
util.py: Fixed dict_subset() to work correctly when a key does not exist
util.py: Added dict_subset()
util.py: Added type_name()
util.py: Changed rename_key() not to suppress KeyError, since some callers might want to assert that a key exists
Moved everything in scripts to root. inputs_Makefile: Don't run "all" when installing.
map: Implemented DB input support for querying a single table
map: Continued to add DB input support
Added support for multiple database engines. Changed SALVIAS_db input to use user-entered password.
Moved Python modules to shared lib folder
Added BIEN 3 scripts