[issue26855] add platform.android_ver() for android

2016-04-27 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I have a WIP patch. [1] It's based on Shiz's patch [2]. [1] https://github.com/yan12125/python3-android/blob/cpython-hg/mk/python/android-misc.patch [2] https://github.com/rave-engine/python3-android/blob/9bb6420317922c07df405315eea040f9301f7eca/mk/python/3.4.3

[issue26855] add platform.android_ver() for android

2016-04-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Some screenshots showing different file contents: * http://www1-lw.xda-cdn.com/files/2013/12/tweak-your-samsung-galaxy-s3s-performance-with-these-build-prop-android-hacks.w654.jpg * http://media.apcmag.com/wp-content/uploads/sites/20/2014/04/buildprop-te

[issue26855] add platform.android_ver() for android

2016-04-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: If the file is guaranteed to exist on most modern Android platforms, this sounds like a good approach. Perhaps you could add support to fallback to running getprop instead, if the file doesn't exist or cannot be parsed ?! -- nosy: +lemburg __

[issue26855] add platform.android_ver() for android

2016-04-27 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Isn't this macro used in compile time? I thought android_ver() aims to check runtime versions. -- ___ Python tracker ___ ___

[issue26855] add platform.android_ver() for android

2016-04-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: The android/api-level.h header exists at all the android API levels and define __ANDROID_API__ as, for example at level 21: #define __ANDROID_API__ 21 So it is possible to get the sdk version from here, and maybe forget about the release version. ---

[issue26855] add platform.android_ver() for android

2016-04-26 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: > Also how can we be sure that the '/system/build.prop' file may be guaranteed > to exist on all android devices ? This path is hard-coded in BioniC [1]. Though I can't find a document/relevant source codes to guarantee 'ro.build.version.release' and 'ro.build.

[issue26855] add platform.android_ver() for android

2016-04-26 Thread Roman Evstifeev
Changes by Roman Evstifeev : -- nosy: +Roman.Evstifeev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue26855] add platform.android_ver() for android

2016-04-26 Thread Xavier de Gaye
New submission from Xavier de Gaye: The attached patch misses a test case. Also how can we be sure that the '/system/build.prop' file may be guaranteed to exist on all android devices ? It is difficult to get a reliable information on the android infrastructure when the information does not re