Maybe something in platform? Sailfish below, I don't know what others return. Code: $ python3 Python 3.4.3 (default, May 12 2016, 02:20:34) [GCC 4.8.3 20140106 (Mer 4.8.3-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.platform() 'Linux-3.4.108.20160401.1-armv7l-with-glibc2.4' >>> platform.uname() uname_result(system='Linux', node='Sailfish', release='3.4.108.20160401.1', version='#1 SMP PREEMPT Thu May 12 02:21:45 UTC 2016', machine='armv7l', processor='armv7l') Checking for the existance of a particular file or directory with os.path.isfile/isdir should be quite simple too if you know what to check -- e.g. /usr/lib/qt5/qml/Sailfish. And in case you're calling executables like notify-send, you can check if they're available with shutil.which.
$ python3 Python 3.4.3 (default, May 12 2016, 02:20:34) [GCC 4.8.3 20140106 (Mer 4.8.3-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.platform() 'Linux-3.4.108.20160401.1-armv7l-with-glibc2.4' >>> platform.uname() uname_result(system='Linux', node='Sailfish', release='3.4.108.20160401.1', version='#1 SMP PREEMPT Thu May 12 02:21:45 UTC 2016', machine='armv7l', processor='armv7l')