pywurfl.algorithms.wurfl.utils

Package pywurfl :: Package algorithms :: Package wurfl :: Module utils |
[hide private]
[frames] | no frames]

# Module utils

source code

This module contains the supporting classes for the Two Step Analysis user agent algorithm that is used as the primary way to match user agents with the Java API for the WURFL.

A description of the way the following source is intended to work can be found within the source for the original Java API implementation here: http://sourceforge.net/projects/wurfl/files/WURFL Java API/

The original Java code is GPLd and Copyright (c) WURFL-Pro srl

Version: 1.2.1

Author: Armand Lynch <lyncha@users.sourceforge.net>

Copyright: Copyright 2011, Armand Lynch

License: LGPL

Functions | [hide private]
is_typeof_browser(user_agent, browsers=None) | source code
ordinal_index(target, needle=`u'``` `'`, ordinal=1, start_index=0) | source code
find_or_length(func, user_agent) | source code
indexof_or_length(target, needle=`u'``` `'`, position=1, start_index=0) | source code
first_space(target, needle=`u'``` `'`, position=1, start_index=0) | source code

Variables | [hide private]
| __doc__ = ``...``
| __url__ = ``'``http://celljam.net/``'``
| mobile_browsers = ``[``u'``cldc``'``,` `u'``symbian``'``,` `u'``midp``'``,` `u'``j2me``'``,` `u'``mo``...``
| desktop_browsers = ``[``u'``slcc1``'``,` `u'``.net clr``'``,` `u'``trident/4``'``,` `u'``med``...``
| is_mobile_browser = `partial(is_typeof_browser, browsers= mobil`...``
| is_desktop_browser = `partial(is_typeof_browser, browsers= desk`...``
| first_slash = `partial(indexof_or_length, needle= u"/")`
| second_slash = `partial(indexof_or_length, needle= u"/", positi`...``
| first_semi_colon = `partial(indexof_or_length, needle= u";")`
| third_space = `partial(indexof_or_length, position= 3)`
| __package__ = ``'``pywurfl.algorithms.wurfl``'``

Variables Details | [hide private]

  ### __doc__ Value:
      """
      This module contains the supporting classes for the Two Step Analysis
      user agent
      algorithm that is used as the primary way to match user agents with th
      e Java API
      for the WURFL.

      A description of the way the following source is intended to work can
      ...

  ### mobile_browsers Value:
      [u'cldc',
       u'symbian',
       u'midp',
       u'j2me',
       u'mobile',
       u'wireless',
       u'palm',
       u'phone',
      ...

  ### desktop_browsers Value:
      [u'slcc1',
       u'.net clr',
       u'trident/4',
       u'media center pc',
       u'funwebproducts',
       u'macintosh',
       u'wow64',
       u'aol 9.',
      ...

  ### is_mobile_browser Value:
      partial(is_typeof_browser, browsers= mobile_browsers)

  ### is_desktop_browser Value:
      partial(is_typeof_browser, browsers= desktop_browsers)

  ### second_slash Value:
      partial(indexof_or_length, needle= u"/", position= 2)