I use mobile.sniffer for detection. http://pypi.python.org/pypi/mobile.sniffer.
Although I think it's actually using WURFL.

it makes it easy

from mobile.sniffer.detect import  detect_mobile_browser
mobile = detect_mobile_browser(web.ctx.env['HTTP_USER_AGENT'])


On Sep 2, 4:40 am, Paolo <[email protected]> wrote:
> Thanks Jian, an hook function was just what I needed.
>
> On Sep 2, 9:27 am, "W. Martin Borgert" <[email protected]> wrote:
>
> > I wonder, what is the right check for a mobile browser? The most
> > important thing is screen size, right?
>
> There are indeed several details regarding the capabilities of each
> device...
> Apart from following the W3C best practices on mobile web development
> (http://www.w3.org/TR/2010/REC-mwabp-20101214/) you can use WURFL
> (http://wurfl.sourceforge.net/) with its Python bindings (http://
> pypi.python.org/pypi/pywurfl/) which provides all the capabilities
> associated with the device that performed the request. And maybe there
> are some HTML5 tags that could help...
>
> (But, IMHO, nowadays there are only few classes of devices (say 4 or
> 5), with "standard" screen sizes... I don't know people who browse the
> web using Nokia phones of 5 years ago... so I won't use WURFL. However
> it depends also on the type of site, on its purpose and contents...)

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to