original_docstring: Sets the parser filter as part of the preprocessing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        pre_obj: The previously created preprocessing object (instance of
                 PreprocessObject) or None.
      
docstring: Sets the parser filter as part of the preprocessing.
docstring_tokens: Sets the parser filter as part of the preprocessing .
code: def _PreprocessSetParserFilter(self, options, pre_obj):
      """Sets the parser filter as part of the preprocessing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        pre_obj: The previously created preprocessing object (instance of
                 PreprocessObject) or None.
      """
      # TODO: Make this more sane. Currently we are only checking against
      # one possible version of Windows, and then making the assumption if
      # that is not correct we default to Windows 7. Same thing with other
      # OS's, no assumption or checks are really made there.
      # Also this is done by default, and no way for the user to turn off
      # this behavior, need to add a parameter to the frontend that takes
      # care of overwriting this behavior.
  
      # TODO: refactor putting the filter into the options object.
      # See if it can be passed in another way.
      if not getattr(options, 'filter', None):
        options.filter = u''
  
      if not options.filter:
        options.filter = u''
  
      parser_filter_string = u''
  
      # If no parser filter is set, let's use our best guess of the OS
      # to build that list.
      if not getattr(options, 'parsers', ''):
        if hasattr(pre_obj, 'osversion'):
          os_version = pre_obj.osversion.lower()
          # TODO: Improve this detection, this should be more 'intelligent', since
          # there are quite a lot of versions out there that would benefit from
          # loading up the set of 'winxp' parsers.
          if 'windows xp' in os_version:
            parser_filter_string = 'winxp'
          elif 'windows server 2000' in os_version:
            parser_filter_string = 'winxp'
          elif 'windows server 2003' in os_version:
            parser_filter_string = 'winxp'
          else:
            parser_filter_string = 'win7'
  
        if getattr(pre_obj, 'guessed_os', None):
          if pre_obj.guessed_os == 'MacOSX':
            parser_filter_string = u'macosx'
          elif pre_obj.guessed_os == 'Linux':
            parser_filter_string = 'linux'
  
        if parser_filter_string:
          options.parsers = parser_filter_string
          logging.info(u'Parser filter expression changed to: {0:s}'.format(
              options.parsers))
code_tokens: def _PreprocessSetParserFilter ( self , options , pre_obj ) : if not getattr ( options , 'filter' , None ) : options . filter = u'' if not options . filter : options . filter = u'' parser_filter_string = u'' if not getattr ( options , 'parsers' , '' ) : if hasattr ( pre_obj , 'osversion' ) : os_version = pre_obj . osversion . lower ( ) if 'windows xp' in os_version : parser_filter_string = 'winxp' elif 'windows server 2000' in os_version : parser_filter_string = 'winxp' elif 'windows server 2003' in os_version : parser_filter_string = 'winxp' else : parser_filter_string = 'win7' if getattr ( pre_obj , 'guessed_os' , None ) : if pre_obj . guessed_os == 'MacOSX' : parser_filter_string = u'macosx' elif pre_obj . guessed_os == 'Linux' : parser_filter_string = 'linux' if parser_filter_string : options . parsers = parser_filter_string logging . info ( u'Parser filter expression changed to: {0:s}' . format ( options . parsers ) )
short_docstring: Sets the parser filter as part of the preprocessing.
short_docstring_tokens: Sets the parser filter as part of the preprocessing .
comment: """Sets the parser filter as part of the preprocessing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        pre_obj: The previously created preprocessing object (instance of
                 PreprocessObject) or None.
      """$SEP$# TODO: Make this more sane. Currently we are only checking against$SEP$# one possible version of Windows, and then making the assumption if$SEP$# that is not correct we default to Windows 7. Same thing with other$SEP$# OS's, no assumption or checks are really made there.$SEP$# Also this is done by default, and no way for the user to turn off$SEP$# this behavior, need to add a parameter to the frontend that takes$SEP$# care of overwriting this behavior.$SEP$# TODO: refactor putting the filter into the options object.$SEP$# See if it can be passed in another way.$SEP$# If no parser filter is set, let's use our best guess of the OS$SEP$# to build that list.$SEP$# TODO: Improve this detection, this should be more 'intelligent', since$SEP$# there are quite a lot of versions out there that would benefit from$SEP$# loading up the set of 'winxp' parsers.