summaryrefslogtreecommitdiffstats
path: root/Demo/stdwin
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 14:39:12 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-17 14:39:12 (GMT)
commitd55f4d1a7665aaeeba85c64671350fe408bc5bb2 (patch)
treeefd6243b750e9ef6f840f04182489542e248aa50 /Demo/stdwin
parent9e80d6f12512803532aed39a0335e6346b77abf4 (diff)
downloadcpython-d55f4d1a7665aaeeba85c64671350fe408bc5bb2.zip
cpython-d55f4d1a7665aaeeba85c64671350fe408bc5bb2.tar.gz
cpython-d55f4d1a7665aaeeba85c64671350fe408bc5bb2.tar.bz2
*** empty log message ***
Diffstat (limited to 'Demo/stdwin')
-rwxr-xr-xDemo/stdwin/jukebox.py2
-rwxr-xr-xDemo/stdwin/lpwin.py3
-rwxr-xr-xDemo/stdwin/python.py5
3 files changed, 5 insertions, 5 deletions
diff --git a/Demo/stdwin/jukebox.py b/Demo/stdwin/jukebox.py
index ff520db..bc43cb5 100755
--- a/Demo/stdwin/jukebox.py
+++ b/Demo/stdwin/jukebox.py
@@ -45,7 +45,7 @@ SFPLAY = '/usr/sbin/sfplay' # Sound playing program
# Global variables
-class struct(): pass # Class to define featureless structures
+class struct: pass # Class to define featureless structures
G = struct() # oHlds writable global variables
diff --git a/Demo/stdwin/lpwin.py b/Demo/stdwin/lpwin.py
index 0a1346f..eaf98be 100755
--- a/Demo/stdwin/lpwin.py
+++ b/Demo/stdwin/lpwin.py
@@ -86,7 +86,8 @@ def main():
mainloop.register(win)
mainloop.mainloop()
-def lpdispatch(type, win, detail):
+def lpdispatch(event):
+ type, win, detail = event
if type == WE_CLOSE or type == WE_CHAR and detail in ('q', 'Q'):
mainloop.unregister(win)
elif type == WE_DRAW:
diff --git a/Demo/stdwin/python.py b/Demo/stdwin/python.py
index ce398aa..2506078 100755
--- a/Demo/stdwin/python.py
+++ b/Demo/stdwin/python.py
@@ -375,7 +375,7 @@ def do_exec(win):
save_stdout = sys.stdout
save_stderr = sys.stderr
try:
- sys.stdin = sys.stdout = sys.stderr = IOWindow().init(win)
+ sys.stdin = sys.stdout = sys.stderr = IOWindow(win)
win.busy = 1
try:
exec(command, win.globals)
@@ -404,9 +404,8 @@ def do_exec(win):
#
class IOWindow:
#
- def init(self, win):
+ def __init__(self, win):
self.win = win
- return self
#
def readline(self, *unused_args):
n = len(inputwindows)