Guys Python'dan yeni duyuyorum ancak windows 8 bilgisini Python kullanarak almaya çalışıyorum. Ama bunu yapamam, aşağıdaki kodun çıktısını bulamıyorum Ekranlarım yok. Netbeans kullanıyorum. tüm yerleştirmeHerhangi bir çıktı görüntülenemiyor
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
if __name__ == "__main__":
import os
import re
def sys_info():
values = {}
cache = os.popen2("SYSTEMINFO")
source = cache[1].read()
sysOpts = ["Host Name", "OS Name", "OS Version", "Product ID", "System Manufacturer", "System Model", "System type", "BIOS Version", "Domain", "Windows Directory", "Total Physical Memory", "Available Physical Memory", "Logon Server"]
for opt in sysOpts:
values[opt] = [item.strip() for item in re.findall("%s:\w*(.*?)\n" % (opt), source, re.IGNORECASE)][0]
return values
if values == null :
print "yep"
print (values)
sys_info tanımlanmış, ancak hiçbir zaman yazdırılmayacak hiçbir şey yoktur – manu190466