С????????host
???????????? ???????[ 2016/8/25 14:27:18 ] ???????????ù??? ??????????
	?????????????????У??????????host???л??????host??????????????????????
	????????????????drivers/etc/hosts?????????ip????????????host??????????
	????????????????host????л???????????????????host????????????????У?????鷳??
	???????????????notepad++??notepad??hosts???????????????????ip?????????????????Ч??
	?????????к???л?host??????????switchhosts?????????????????????????С???????????С????????????????????????host???????????????????
	????????????????
	????#coding:utf-8
	????import wx
	????import os
	????class Frame(wx.Frame):
	????def __init__(self):#????????????????
	????wx.Frame.__init__(self??None??-1??'SwithHosts Example'??size=(1000??600))
	????panel=wx.Panel(self??-1)
	????ReadButton = wx.Button(panel?? label = u'??host'??pos = (225??5)??size = (80??25))
	????ReadButton.Bind(wx.EVT_BUTTON?? self.Read)#??button??????
	????saveButton = wx.Button(panel?? label = u'????host'??pos = (315??5)??size = (80??25))
	????saveButton.Bind(wx.EVT_BUTTON??self.Save)#??button??????
	????self.filename = 'C:WindowsSystem32driversetchosts'#host???·??
	????self.contents = wx.TextCtrl(panel?? pos = (5??35)??size = (500??250)?? style = wx.TE_MULTILINE)
	????hbox=wx.BoxSizer()
	????hbox.Add(ReadButton??proportion=0??flag=wx.RIGHT|wx.HORIZONTAL)
	????hbox.Add(saveButton??proportion=0??flag=wx.RIGHT|wx.HORIZONTAL)
	????hbox.Add(self.contents??proportion=1??flag=wx.EXPAND|wx.ALL)
	????panel.SetSizer(hbox)
	????def Read(self??event):#???host???????????????
	????file = open(self.filename)
	????all_the_text=file.read()
	????self.contents.SetValue(all_the_text)
	????def Save(self??event):#????????е??????????д??host??
	????value=self.contents.GetValue()
	????file = open(self.filename??'w')
	????file.write(value)
	????file.close()
	????if __name__ == "__main__":
	????app=wx.PySimpleApp()
	????frame=Frame()
	????frame.Show()
	????app.MainLoop()
	????????????Ч??
	
	????
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com