Show More
@@ -4,7 +4,7 b'' | |||
|
4 | 4 | All the matplotlib support code was co-developed with John Hunter, |
|
5 | 5 | matplotlib's author. |
|
6 | 6 | |
|
7 |
$Id: Shell.py 1 |
|
|
7 | $Id: Shell.py 1988 2006-12-13 16:49:41Z vivainio $""" | |
|
8 | 8 | |
|
9 | 9 | #***************************************************************************** |
|
10 | 10 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> |
@@ -706,7 +706,7 b' class IPShellWX(threading.Thread):' | |||
|
706 | 706 | error('Requested wxPython version %s could not be loaded' % |
|
707 | 707 | wantedwxversion) |
|
708 | 708 | |
|
709 |
import |
|
|
709 | import wx | |
|
710 | 710 | |
|
711 | 711 | threading.Thread.__init__(self) |
|
712 | 712 | self.wx = wx |
@@ -738,20 +738,20 b' class IPShellWX(threading.Thread):' | |||
|
738 | 738 | |
|
739 | 739 | self.start() |
|
740 | 740 | |
|
741 |
class TimerAgent(self.wx. |
|
|
741 | class TimerAgent(self.wx.MiniFrame): | |
|
742 | 742 | wx = self.wx |
|
743 | 743 | IP = self.IP |
|
744 | 744 | tk = self.tk |
|
745 | 745 | def __init__(self, parent, interval): |
|
746 |
style = self.wx. |
|
|
747 |
self.wx. |
|
|
746 | style = self.wx.DEFAULT_FRAME_STYLE | self.wx.TINY_CAPTION_HORIZ | |
|
747 | self.wx.MiniFrame.__init__(self, parent, -1, ' ', pos=(200, 200), | |
|
748 | 748 | size=(100, 100),style=style) |
|
749 | 749 | self.Show(False) |
|
750 | 750 | self.interval = interval |
|
751 |
self.timerId = self.wx. |
|
|
751 | self.timerId = self.wx.NewId() | |
|
752 | 752 | |
|
753 | 753 | def StartWork(self): |
|
754 |
self.timer = self.wx. |
|
|
754 | self.timer = self.wx.Timer(self, self.timerId) | |
|
755 | 755 | self.wx.EVT_TIMER(self, self.timerId, self.OnTimer) |
|
756 | 756 | self.timer.Start(self.interval) |
|
757 | 757 | |
@@ -759,15 +759,15 b' class IPShellWX(threading.Thread):' | |||
|
759 | 759 | update_tk(self.tk) |
|
760 | 760 | self.IP.runcode() |
|
761 | 761 | |
|
762 |
class App(self.wx. |
|
|
762 | class App(self.wx.App): | |
|
763 | 763 | wx = self.wx |
|
764 | 764 | TIMEOUT = self.TIMEOUT |
|
765 | 765 | def OnInit(self): |
|
766 | 766 | 'Create the main window and insert the custom frame' |
|
767 | 767 | self.agent = TimerAgent(None, self.TIMEOUT) |
|
768 |
self.agent.Show( |
|
|
768 | self.agent.Show(False) | |
|
769 | 769 | self.agent.StartWork() |
|
770 |
return |
|
|
770 | return True | |
|
771 | 771 | |
|
772 | 772 | self.app = App(redirect=False) |
|
773 | 773 | self.wx_mainloop(self.app) |
General Comments 0
You need to be logged in to leave comments.
Login now