compat_Struct = struct.Struct
+# compat_map/filter() returning an iterator, supposedly the
+# same versioning as for zip below
+try:
+ from future_builtins import map as compat_map
+except ImportError:
+ try:
+ from itertools import imap as compat_map
+ except ImportError:
+ compat_map = map
+
+try:
+ from future_builtins import filter as compat_filter
+except ImportError:
+ try:
+ from itertools import ifilter as compat_filter
+ except ImportError:
+ compat_filter = filter
+
+
try:
from future_builtins import zip as compat_zip
except ImportError: # not 2.6+ or is 3.x
'compat_etree_fromstring',
'compat_etree_register_namespace',
'compat_expanduser',
+ 'compat_filter',
'compat_get_terminal_size',
'compat_getenv',
'compat_getpass',
'compat_integer_types',
'compat_itertools_count',
'compat_kwargs',
+ 'compat_map',
'compat_numeric_types',
'compat_ord',
'compat_os_name',