[shpy-commit] r2856 - in shpy/trunk/dist/shpy: . net
arigo@codespeak.net
arigo@codespeak.net
Tue, 20 Jan 2004 16:01:01 +0100 (MET)
Author: arigo
Date: Tue Jan 20 16:01:01 2004
New Revision: 2856
Modified:
shpy/trunk/dist/shpy/net/gateway.py
shpy/trunk/dist/shpy/ui_pygame.py
Log:
somenehancements to reduce traffic
Modified: shpy/trunk/dist/shpy/net/gateway.py
==============================================================================
--- shpy/trunk/dist/shpy/net/gateway.py (original)
+++ shpy/trunk/dist/shpy/net/gateway.py Tue Jan 20 16:01:01 2004
@@ -73,7 +73,7 @@
if source is None:
break
try:
- print "executing source", source
+ print "executing source", source[:50]
co = dyncode.makecode(source)
exec co in self.gateway.ns
except:
Modified: shpy/trunk/dist/shpy/ui_pygame.py
==============================================================================
--- shpy/trunk/dist/shpy/ui_pygame.py (original)
+++ shpy/trunk/dist/shpy/ui_pygame.py Tue Jan 20 16:01:01 2004
@@ -148,7 +148,6 @@
self.changed[self.cell] = 1
def run(self):
- repaintdelay = 0
self.invalid = True
self.changed = {}
while 1:
@@ -157,12 +156,8 @@
self.changed.clear()
self.invalid = True
if self.invalid:
- if repaintdelay and pygame.event.peek():
- repaintdelay -= 1 # don't repaint right now, process next event first
- else:
- self.invalid = False
- self.repaint()
- repaintdelay = 10
+ self.invalid = False
+ self.repaint()
event = pygame.event.wait()
print event
if event.type == KEYDOWN: