HT clear some wxPython fram?

Klaus Reinhardt K.Rdt at TU-Berlin.DE
Wed Jul 3 13:39:04 EDT 2002


>> HOW I CAN CLEAR SOME FRAME?
---------------------------------------------------------------------
Hi

>My problem is, that the I want to monitor netstat; this 
>is in principle working (s.b.). But I don't want the scrolling
>frame for 2 reasons.
>  1.) ergonomic
>  2.) after a while of outputting the display
>       is stopping, I think for memory-reaons.

I can use Clear here:

class MyApp(wxApp):
	def OnInit(self):
		frame = MyFrame(self.stdioWin)
		frame.Show(TRUE)
		frame.Clear()    #### OK, but sensless
		self.SetTopWindow(frame)

But I want to clear the frame just bevor each new output
is given here:

class MyFrame(wxFrame):
..
	def OnTimer(self, evt):
		y=os.popen( 'netstat -a -n','r').read()
############# HERE 
		print "--------------------------------------------------------------"
		yy=y.splitlines()
		for i in yy: 
			if i[:5]=="  TCP":
				ry=string.split(i)
				print "%5s %22s %22s %22s" % (ry[0],ry[1],ry[2],ry[3])


		K at Rdt







More information about the Python-list mailing list