parameters: (self, device=None, features=[])
return_statement: return self._success
docstring: Reads the TOC from the device given as string
  
          The user is supposed to use :func:`discid.read`.
docstring_summary: Reads the TOC from the device given as string
docstring_tokens: Reads the TOC from the device given as string
function: def read(self, device=None, features=[]):
          """Reads the TOC from the device given as string
  
          The user is supposed to use :func:`discid.read`.
          """
          if "read" not in FEATURES:
              raise NotImplementedError("discid_read not implemented on platform")
  
          # only use features implemented on this platform and in this module
          self._requested_features = list(set(features) & set(FEATURES)
                                          & set(FEATURES_IMPLEMENTED))
  
          # create the bitmask for libdiscid
          c_features = 0
          for feature in features:
              c_features += _FEATURE_MAPPING.get(feature, 0)
  
          # device = None will use the default device (internally)
          try:
              result = _LIB.discid_read_sparse(self._handle, _encode(device),
                                               c_features) == 1
          except AttributeError:
              result = _LIB.discid_read(self._handle, _encode(device)) == 1
          self._success = result
          if not self._success:
              raise DiscError(self._get_error_msg())
          return self._success
function_tokens: def read ( self , device = None , features = [ ] ) : if "read" not in FEATURES : raise NotImplementedError ( "discid_read not implemented on platform" ) # only use features implemented on this platform and in this module self . _requested_features = list ( set ( features ) & set ( FEATURES ) & set ( FEATURES_IMPLEMENTED ) ) # create the bitmask for libdiscid c_features = 0 for feature in features : c_features += _FEATURE_MAPPING . get ( feature , 0 ) # device = None will use the default device (internally) try : result = _LIB . discid_read_sparse ( self . _handle , _encode ( device ) , c_features ) == 1 except AttributeError : result = _LIB . discid_read ( self . _handle , _encode ( device ) ) == 1 self . _success = result if not self . _success : raise DiscError ( self . _get_error_msg ( ) ) return self . _success