[issue28740] Add sys.getandroidapilevel()

STINNER Victor report at bugs.python.org
Sat Nov 19 18:59:51 EST 2016


STINNER Victor added the comment:

> I think we must use the reliable build time Android API level and
implement sys.getandroidapilevel() (Victor patch) for knowing, in the
standard library, whether we are running on an Android platform, and
provide a best effort platform.android_ver() for the Android run time
version. Things are changing very fast with the Android project and the OEM
may add their own changes too.

Hum, IMO we should at least use a structure with names for the sys function
to be able to return more information later.

Maybe call the function sys.getandroidversion()?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28740>
_______________________________________


More information about the Python-bugs-list mailing list