Put in the ".txt" file the information contained in line 2 [0: 6] which is:
['Memories', 'physics', 'total:', '7.988', 'MB']
['Memoir', 'physics', 'available:', '5.277', 'MB']
['Memory', 'Virtual:', 'Size', 'M', ':', '9.268']
['Memory', 'Virtual:', 'Available:', '6.094', 'MB']
['Memory', 'Virtual', 'Em', 'Usage:', '3.174', 'MB']
archive_sysinfo = open('saida_systeminfo.txt', 'r')
text_sysinfo = archive_sysinfo.readlines()
lista_linhas2 = []
lista_info = []
for linha2 in text_sysinfo:
lista_linhas2.append(linha2.split())
for linha2 in lista_linhas2:
if "Mem¢ria" in linha2:
lista_info.append(linha2[0:6])
print(linha2[0:6])
OUTPUT:
Host Name: FPAL169325
Name of the operating system: Microsoft Windows 8.1 Pro
Version of the operating system: 6.3.9600 N / A build 9600
Operating System Manufacturer: Microsoft Corporation
OS configuration: Member workstation
Operating system compile type: Multiprocessor Free
Registered owner: FACULDADE SENAC PORTO ALEGRE
Registered organization: SENACRS
Product Identification: 00261-80511-41292-AA269
Date of original installation: 08/01/2018, 19:29:13
System Initialization Time: 10/26/2018, 20:47:23
System manufacturer: LENOVO
System Model: 32092F2
System Type: x64-based PC
Processor (s): 1 processor (s) installed. [01]: Intel64 Family 6 Model 58
Stepping 9 GenuineIntel ~ 3201 Mhz
BIOS Version: LENOVO 9SKT69AUS, 05/17/2013
Windows folder: C: \ windows
System folder: C: \ windows \ system32
Initialize Device: \ Device \ HarddiskVolume1
Location of the system: pt-br; Portugus (Brasil)
Place of entry: pt-br; Portugus (Brazil)
Time zone: (UTC-03: 00) Brasília
Total memory: 7.988 MB
Physical memory available: 5,277 MB
Virtual Memory: Maximum Size: 9.268 MB
Virtual Memory: Available: 6.094 MB
Virtual Memory: In Use: 3.174 MB
Page File Location (s): C: \ pagefile.sys
Domínnia: fspoaeduc.com.br
Logon Server: \ CROM
Hotfix (s): 165 hotfix (s) installed. [01]: KB2899189_Microsoft-Windows-CameraCodec-Package