This commit is contained in:
Christian Forster
2014-03-24 10:09:58 +01:00
parent bbf5b91bc1
commit ced00885c5
5 changed files with 361 additions and 337 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/python
import subprocess, re
def getCpuInfo():
command = "cat /proc/cpuinfo"
all_info = subprocess.check_output(command, shell=True).strip()
for line in all_info.split("\n"):
if "model name" in line:
return re.sub( ".*model name.*:", "", line,1)