How to recognize windows 10 using Python? [closed]
With the following Python versions everything works fine.
Python 3.5.1:
>>> import platform>>> platform.release()'10'>>> platform.version()'10.0.10240'
Python 2.7.11
>>> import platform>>> platform.release()'10'>>> platform.version()'10.0.10240'
How about upgrading to at least 2.7.x ?
Edit: As mentioned by @Rogalski, you can always pipe the ver
command, and this should return the following independently of the Python version:
>>> import subprocess>>> subprocess.Popen('ver', shell=True, stdout=subprocess.PIPE).communicate()[0]'\r\nMicrosoft Windows [Version 10.0.10240]\r\n'