old_contents: #!/usr/bin/env python
  #
  # Copyright 2009 Google Inc.
  #
  # Licensed under the Apache License, Version 2.0 (the 'License')
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #         http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an 'AS IS' BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from uaParser.lib import user_agent_parser
  
  def main():
      userAgentString = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3'
  
      family, major_version, minor_version, other_version = user_agent_parser.Parse(string)
  
      print "Browser is " + family + " version " + major_version +"."+ minor_version +"."+ other_version
  
  if __name__ == '__main__':
      main()
  
new_contents: #!/usr/bin/env python
  #
  # Copyright 2009 Google Inc.
  #
  # Licensed under the Apache License, Version 2.0 (the 'License')
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #         http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an 'AS IS' BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from uaParser.lib import user_agent_parser
  
  def main():
      user_agent_string = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3'
  
      family, major_version, minor_version, other_version = user_agent_parser.Parse(user_agent_string)
  
      print "Browser is " + family + " version " + major_version +"."+ minor_version +"."+ other_version
  
  if __name__ == '__main__':
      main()
  
subject: Make example.py work. Dear Drew, plz2test after coding :-( kthx