~qbzr-dev/qbzr/show-merge-depth

« back to all changes in this revision

Viewing changes to lib/__init__.py

  • Committer: Gary van der Merwe
  • Date: 2009-08-19 12:41:14 UTC
  • mfrom: (677.1.243 trunk)
  • Revision ID: garyvdm@gmail.com-20090819124114-jz8zf4o4dlcl0a4r
Merge Trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    # Add our required extra libraries for the standalone bzr.exe to path
25
25
    sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '_lib')))
26
26
 
 
27
if sys.version_info < (2, 5):
 
28
    def _all_2_4_compat(iterable):
 
29
        for element in iterable:
 
30
            if not element:
 
31
                return False
 
32
        return True
 
33
        
 
34
    def _any_2_4_compat(iterable):
 
35
        for element in iterable:
 
36
            if element:
 
37
                return True
 
38
        return False
 
39
 
 
40
    import __builtin__
 
41
    __builtin__.all = _all_2_4_compat
 
42
    __builtin__.any = _any_2_4_compat
27
43
 
28
44
# Special constant
29
45
MS_WINDOWS = (sys.platform == 'win32')