Marc-Andre Lemburg added the comment: On 20.11.2016 00:59, STINNER Victor wrote: > > 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()?
Since this is an OS level interface, it should either go into the os module or, if it doesn't rely on a C API, into the platform module (see e.g. the platform.win32_ver() and .mac_ver() APIs as example). I don't think the sys module is the right place to put the API, since it doesn't have anything to do with the Python system internals. ---------- nosy: +lemburg _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28740> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com