suhanna / System_info

MIT License
7 stars 6 forks source link

Error retrieving Operating System info on Windows #4

Closed RDCH106 closed 3 years ago

RDCH106 commented 3 years ago

Library calls the following command with subprocess to retieve Operating System info:

'systeminfo | findstr /B /C:"OS Name"'

This is not correct because systeminfo on Windows dependes on OS language. For example, I use Windows OS in spanish and never will find the string OS Name because in spanish shows Nombre del sistema operativo instead of OS Name.

RDCH106 commented 3 years ago

I propose at least returning platform and version provided by python built-in libraries:

import platform

print(platform.system())
print(platform.release())
suhanna commented 3 years ago

Merged +1: