parameters: (block)
return_statement: return environment
docstring: Parse the environment block into a Python dictionary.
  
          @warn: Deprecated since WinAppDbg 1.5.
  
          @note: Values of duplicated keys are joined using null characters.
  
          @type  block: list of str
          @param block: List of strings as returned by L{get_environment_data}.
  
          @rtype:  dict(str S{->} str)
          @return: Dictionary of environment keys and values.
docstring_summary: Parse the environment block into a Python dictionary.
docstring_tokens: Parse the environment block into a Python dictionary .
function: def parse_environment_data(block):
          """
          Parse the environment block into a Python dictionary.
  
          @warn: Deprecated since WinAppDbg 1.5.
  
          @note: Values of duplicated keys are joined using null characters.
  
          @type  block: list of str
          @param block: List of strings as returned by L{get_environment_data}.
  
          @rtype:  dict(str S{->} str)
          @return: Dictionary of environment keys and values.
          """
  
          # Issue a deprecation warning.
          warnings.warn(
              "Process.parse_environment_data() is deprecated" \
              " since WinAppDbg 1.5.",
              DeprecationWarning)
  
          # Create an empty environment dictionary.
          environment = dict()
  
          # End here if the environment block is empty.
          if not block:
              return environment
  
          # Prepare the tokens (ANSI or Unicode).
          gst = win32.GuessStringType
          if type(block[0]) == gst.t_ansi:
              equals = '='
              terminator = '\0'
          else:
              equals = u'='
              terminator = u'\0'
  
          # Split the blocks into key/value pairs.
          for chunk in block:
              sep = chunk.find(equals, 1)
              if sep < 0:
  ##                raise Exception()
                  continue    # corrupted environment block?
              key, value = chunk[:sep], chunk[sep+1:]
  
              # For duplicated keys, append the value.
              # Values are separated using null terminators.
              if key not in environment:
                  environment[key] = value
              else:
                  environment[key] += terminator + value
  
          # Return the environment dictionary.
          return environment
function_tokens: def parse_environment_data ( block ) : # Issue a deprecation warning. warnings . warn ( "Process.parse_environment_data() is deprecated" " since WinAppDbg 1.5." , DeprecationWarning ) # Create an empty environment dictionary. environment = dict ( ) # End here if the environment block is empty. if not block : return environment # Prepare the tokens (ANSI or Unicode). gst = win32 . GuessStringType if type ( block [ 0 ] ) == gst . t_ansi : equals = '=' terminator = '\0' else : equals = u'=' terminator = u'\0' # Split the blocks into key/value pairs. for chunk in block : sep = chunk . find ( equals , 1 ) if sep < 0 : ##                raise Exception() continue # corrupted environment block? key , value = chunk [ : sep ] , chunk [ sep + 1 : ] # For duplicated keys, append the value. # Values are separated using null terminators. if key not in environment : environment [ key ] = value else : environment [ key ] += terminator + value # Return the environment dictionary. return environment