]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
add debug, use waitpid
authorGuido van Rossum <guido@python.org>
Sat, 8 Oct 1994 19:24:02 +0000 (19:24 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 8 Oct 1994 19:24:02 +0000 (19:24 +0000)
Demo/stdwin/jukebox.py

index 377078cfea0f27fd55444bb1d58df62f7d976b46..e218e666c72d05e9d5af33d633443fba682d5f22 100755 (executable)
@@ -47,7 +47,7 @@ SFPLAY = '/usr/sbin/sfplay'           # Sound playing program
 
 class struct: pass             # Class to define featureless structures
 
-G = struct()                   # oHlds writable global variables
+G = struct()                   # Holds writable global variables
 
 
 # Main program
@@ -83,6 +83,10 @@ def main():
                elif optname == '-t':
                        G.mode = optarg
        #
+       if G.debug:
+               for name in G.__dict__.keys():
+                       print 'G.' + name, '=', `G.__dict__[name]`
+       #
        if not args:
                args = [DEF_DB]
        #
@@ -149,7 +153,7 @@ def killchild():
                waitchild(0)
 
 def waitchild(options):
-       pid, sts = os.wait(G.busy, options)
+       pid, sts = os.waitpid(G.busy, options)
        if pid == G.busy:
                G.busy = 0
                G.stop.enable(0)