Bem esse é um simples programinha que mostra as informações de hardware da sua máquina.Na proxima versão claro,pretendo incrementalo
Por hora deixo o script com compilado no Spe 0.8.2,tive alguns problemas com
a IDLE,para os que ja progrmam a mais de 1 mês e puderem dizer o que posso fazer para melhorar ou até mesmo porque não compilou na IDLE,sugestões e criticas são bem-vindas
(//http://img411.imageshack.us/img411/84/infolanrz0.jpg)
import wx
class Janela(wx.Dialog):
def __init__ (self, parent, ID, title):
wx.Dialog.__init__(self, parent, ID, title, size=(360, 370))
#---Memoria----
topo = wx.StaticBox(self, -1, 'Memoria Livre', (5, 5), size=(80, 40))
topo = wx.Panel(self, -1, (10, 20), (100, 20))
StTxtFMemo = wx.StaticText(topo, -1, str(wx.GetFreeMemory()), pos=(10,3))
#--------------
#Usuario
topo = wx.StaticBox(self, -1, 'Computador', (100, 5), size=(80, 40))
topo = wx.Panel(self, -1, (30, 20), (1000, 20))
StTxtUId = wx.StaticText(topo, -1, wx.GetUserId(), pos=(80,3))
#-----------
#Resolucao
topo = wx.StaticBox(self, -1, 'Resolucao', (200, 5), size=(80, 40))
topo = wx.Panel(self, -1, (30, 20), (1000, 20))
StTxtUName = wx.StaticText(topo, -1, str(wx.DisplaySize()), pos=(180,3))
#-----------
#---S.O----
topo = wx.StaticBox(self, -1, 'S.O.', (5, 55), size=(280, 40))
topo = wx.Panel(self, -1, (30, 60), (1000, 120))
StTxtOSV = wx.StaticText(topo, -1, wx.GetOsDescription(), pos=(1,12))
#---------------------
#--Versao---
topo = wx.StaticBox(self, -1, 'Versao', (5,100), size=(180, 40))
topo = wx.Panel(self, -1, (30, 80), (100, 120))
StTxtVersion = wx.StaticText(topo, -1, wx.version(), pos=(10,36))
#--Host Name----
topo = wx.StaticBox(self, -1, 'Dominio', (200,100), size=(150, 40))
topo = wx.Panel(self, -1, (30, 95), (1000, 120))
StTxtHost = wx.StaticText(topo, -1, wx.GetHostName(), pos=(180,22))
#--Descricao----
topo = wx.StaticBox(self, -1, 'Descricao do S.O', (5,150), size=(250, 40))
topo = wx.Panel(self, -1, (30, 95), (400, 120))
StTxtOSV = wx.StaticText(topo, -1, wx.GetOsDescription(), pos=(1,70))
#------
#------------
wx.StaticLine(self, -1, (20, 240), (300,1))
sum = wx.StaticText(self, -1, 'HardInfo v1.0', (240, 280))
sum_font = sum.GetFont()
sum_font.SetWeight(wx.BOLD)
sum.SetFont(sum_font)
sum1 = wx.StaticText(self, -1, "Paradoxo's High Crew", (40, 280))
sum1_font = sum1.GetFont()
sum1_font.SetWeight(wx.BOLD)
sum1.SetFont(sum1_font)
sumh = wx.StaticText(self, -1, "www.hackmode.com.br", (100, 230))
sumh_font = sumh.GetFont()
sumh_font.SetWeight(wx.BOLD)
sumh.SetFont(sumh_font)
wx.Button(self, 1, 'Fechar', (140, 310), (60, 30))
self.Bind(wx.EVT_BUTTON, self.OnFechar, id=1)
topo.Show()
self.Centre()
def OnFechar(self, event):
self.Close()
class MyApp(wx.App):
def OnInit(self):
dia = Janela(None, -1, 'HardInfo 1.0')
dia.SetIcon(wx.Icon('tipo.ico', wx.BITMAP_TYPE_ICO))
dia.ShowModal()
dia.Destroy()
return True
app = MyApp()
app.MainLoop()
É isso to começando neh heheh
flw
Apesar de não manjar muito de python o source é super interessante.
muito bacana esse soft.Parabens oDOXOo
fui.