parameters: (self, lookup)
return_statement: return self.cldrVersion, defaults, windows
docstring: Digest CLDR's MS-Win time-zone name mapping.
  
          MS-Win have their own eccentric names for time-zones.  CLDR
          helpfully provides a translation to more orthodox names.
  
          Singe argument, lookup, is a mapping from known MS-Win names
          for locales to a unique integer index (starting at 1).
  
          The XML structure we read has the form:
  
   <supplementalData>
       <windowsZones>
           <mapTimezones otherVersion="..." typeVersion="...">
               <!-- (UTC-08:00) Pacific Time (US & Canada) -->
               <mapZone other="Pacific Standard Time" territory="001" type="America/Los_Angeles"/>
               <mapZone other="Pacific Standard Time" territory="CA" type="America/Vancouver America/Dawson America/Whitehorse"/>
               <mapZone other="Pacific Standard Time" territory="US" type="America/Los_Angeles America/Metlakatla"/>
               <mapZone other="Pacific Standard Time" territory="ZZ" type="PST8PDT"/>
           </mapTimezones>
       </windowsZones>
   </supplementalData>
docstring_summary: Digest CLDR's MS-Win time-zone name mapping.
docstring_tokens: Digest CLDR s MS - Win time - zone name mapping .
function: def readWindowsTimeZones(self, lookup): # For use by cldr2qtimezone.py
          """Digest CLDR's MS-Win time-zone name mapping.
  
          MS-Win have their own eccentric names for time-zones.  CLDR
          helpfully provides a translation to more orthodox names.
  
          Singe argument, lookup, is a mapping from known MS-Win names
          for locales to a unique integer index (starting at 1).
  
          The XML structure we read has the form:
  
   <supplementalData>
       <windowsZones>
           <mapTimezones otherVersion="..." typeVersion="...">
               <!-- (UTC-08:00) Pacific Time (US & Canada) -->
               <mapZone other="Pacific Standard Time" territory="001" type="America/Los_Angeles"/>
               <mapZone other="Pacific Standard Time" territory="CA" type="America/Vancouver America/Dawson America/Whitehorse"/>
               <mapZone other="Pacific Standard Time" territory="US" type="America/Los_Angeles America/Metlakatla"/>
               <mapZone other="Pacific Standard Time" territory="ZZ" type="PST8PDT"/>
           </mapTimezones>
       </windowsZones>
   </supplementalData>
  """
          zones = self.supplement('windowsZones.xml')
          enum = self.__enumMap('territory')
          badZones, unLands, defaults, windows = set(), set(), {}, {}
  
          for name, attrs in zones.find('windowsZones/mapTimezones'):
              if name != 'mapZone':
                  continue
  
              wid, code = attrs['other'], attrs['territory']
              data = dict(windowsId = wid,
                          territoryCode = code,
                          ianaList = attrs['type'])
  
              try:
                  key = lookup[wid]
              except KeyError:
                  badZones.add(wid)
                  key = 0
              data['windowsKey'] = key
  
              if code == '001':
                  defaults[key] = data['ianaList']
              else:
                  try:
                      cid, name = enum[code]
                  except KeyError:
                      unLands.append(code)
                      continue
                  data.update(territoryId = cid, territory = name)
                  windows[key, cid] = data
  
          if unLands:
              raise Error('Unknown territory codes, please add to enumdata.py: '
                          + ', '.join(sorted(unLands)))
  
          if badZones:
              raise Error('Unknown Windows IDs, please add to cldr2qtimezone.py: '
                          + ', '.join(sorted(badZones)))
  
          return self.cldrVersion, defaults, windows
function_tokens: def readWindowsTimeZones ( self , lookup ) : # For use by cldr2qtimezone.py zones = self . supplement ( 'windowsZones.xml' ) enum = self . __enumMap ( 'territory' ) badZones , unLands , defaults , windows = set ( ) , set ( ) , { } , { } for name , attrs in zones . find ( 'windowsZones/mapTimezones' ) : if name != 'mapZone' : continue wid , code = attrs [ 'other' ] , attrs [ 'territory' ] data = dict ( windowsId = wid , territoryCode = code , ianaList = attrs [ 'type' ] ) try : key = lookup [ wid ] except KeyError : badZones . add ( wid ) key = 0 data [ 'windowsKey' ] = key if code == '001' : defaults [ key ] = data [ 'ianaList' ] else : try : cid , name = enum [ code ] except KeyError : unLands . append ( code ) continue data . update ( territoryId = cid , territory = name ) windows [ key , cid ] = data if unLands : raise Error ( 'Unknown territory codes, please add to enumdata.py: ' + ', ' . join ( sorted ( unLands ) ) ) if badZones : raise Error ( 'Unknown Windows IDs, please add to cldr2qtimezone.py: ' + ', ' . join ( sorted ( badZones ) ) ) return self . cldrVersion , defaults , windows