os-detection

How to detect Android OS from a Python script?

How to detect Android OS from a Python script? Question: I am running a python script in a termux environment on an Android device and I would like to be able to detect that the OS is Android. The traditional approaches don’t work: >>> import platform >>> import sys >>> print(platform.system()) ‘Linux’ >>> print(sys.platform) ‘linux’ …

Total answers: 2