summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-10-07 10:23:49 (GMT)
committerGuido van Rossum <guido@python.org>1994-10-07 10:23:49 (GMT)
commit50519c619057a91ddeda18eb105b29bab4810ed9 (patch)
treea1a598d0bdfec5ae842abb256d060b34ba4e6330 /Demo
parent46e4b07a8120ca0a09a03c7fceaa6f914acf47d5 (diff)
downloadcpython-50519c619057a91ddeda18eb105b29bab4810ed9.zip
cpython-50519c619057a91ddeda18eb105b29bab4810ed9.tar.gz
cpython-50519c619057a91ddeda18eb105b29bab4810ed9.tar.bz2
micro changes
Diffstat (limited to 'Demo')
-rwxr-xr-xDemo/sgi/al/alwatch.py2
-rwxr-xr-xDemo/sgi/al/broadcast.py2
-rwxr-xr-xDemo/sgi/al/cmpaf.py7
-rwxr-xr-xDemo/sgi/al/playaiff.py2
-rwxr-xr-xDemo/sgi/al/playold.py2
-rwxr-xr-xDemo/sgi/al/radio.py2
-rwxr-xr-xDemo/sgi/al/rec_play.py2
-rwxr-xr-xDemo/sgi/al/unicast.py2
8 files changed, 10 insertions, 11 deletions
diff --git a/Demo/sgi/al/alwatch.py b/Demo/sgi/al/alwatch.py
index 4a52ab2..da747d4 100755
--- a/Demo/sgi/al/alwatch.py
+++ b/Demo/sgi/al/alwatch.py
@@ -10,7 +10,7 @@ params = al.queryparams(dev)
for i in range(1, len(params), 2):
params[i] = -1
while 1:
- time.millisleep(100)
+ time.sleep(0.1)
old = params[:]
al.getparams(dev, params)
if params <> old:
diff --git a/Demo/sgi/al/broadcast.py b/Demo/sgi/al/broadcast.py
index 5ee9656..ce4875e 100755
--- a/Demo/sgi/al/broadcast.py
+++ b/Demo/sgi/al/broadcast.py
@@ -1,4 +1,4 @@
-#! /ufs/guido/bin/sgi/python
+#! /usr/local/bin/python
# broadcast [port]
#
diff --git a/Demo/sgi/al/cmpaf.py b/Demo/sgi/al/cmpaf.py
index 509f0aa..6b91e30 100755
--- a/Demo/sgi/al/cmpaf.py
+++ b/Demo/sgi/al/cmpaf.py
@@ -17,8 +17,8 @@ import AL
import audioop
import sys
-class Cmpaf():
- def init(self):
+class Cmpaf:
+ def __init__(self):
parsetree = flp.parse_form('cmpaf_form','form')
flp.create_full_form(self, parsetree)
c = al.newconfig()
@@ -29,7 +29,6 @@ class Cmpaf():
self.do_adpcm = self.do_ulaw = self.do_diff = 0
self.acstate = None
self.form.show_form(FL.PLACE_SIZE, 1, 'compare audio formats')
- return self
def run(self):
while 1:
@@ -61,5 +60,5 @@ class Cmpaf():
def cb_diff(self, obj, val):
self.do_diff = obj.get_button()
-cmpaf = Cmpaf().init()
+cmpaf = Cmpaf()
cmpaf.run()
diff --git a/Demo/sgi/al/playaiff.py b/Demo/sgi/al/playaiff.py
index 756748d..22120dc 100755
--- a/Demo/sgi/al/playaiff.py
+++ b/Demo/sgi/al/playaiff.py
@@ -49,6 +49,6 @@ def makeport(nchannels, sampwidth, samprate):
def play(p, data, offset, blocksize):
data = data[offset:]
p.writesamps(data)
- while p.getfilled() > 0: time.millisleep(10)
+ while p.getfilled() > 0: time.sleep(0.01)
main()
diff --git a/Demo/sgi/al/playold.py b/Demo/sgi/al/playold.py
index d0cb592..9792c16 100755
--- a/Demo/sgi/al/playold.py
+++ b/Demo/sgi/al/playold.py
@@ -43,7 +43,7 @@ def main():
if not buf: break
port.writesamps(buf)
while port.getfilled() > 0:
- time.millisleep(100)
+ time.sleep(0.1)
try:
main()
diff --git a/Demo/sgi/al/radio.py b/Demo/sgi/al/radio.py
index 6cde805..a6f6809 100755
--- a/Demo/sgi/al/radio.py
+++ b/Demo/sgi/al/radio.py
@@ -1,4 +1,4 @@
-#! /ufs/guido/bin/sgi/python
+#! /usr/local/bin/python
# radio [port]
#
diff --git a/Demo/sgi/al/rec_play.py b/Demo/sgi/al/rec_play.py
index e538b99..693c96e 100755
--- a/Demo/sgi/al/rec_play.py
+++ b/Demo/sgi/al/rec_play.py
@@ -20,7 +20,7 @@ def playit (buf) :
print 'playing...'
p.writesamps(buf)
while p.getfilled() > 0:
- time.millisleep(10)
+ time.sleep(0.01)
print 'done.'
p.closeport()
diff --git a/Demo/sgi/al/unicast.py b/Demo/sgi/al/unicast.py
index 8e0c1a8..c9f3111 100755
--- a/Demo/sgi/al/unicast.py
+++ b/Demo/sgi/al/unicast.py
@@ -1,4 +1,4 @@
-#! /ufs/guido/bin/sgi/python
+#! /usr/local/bin/python
# unicast host [port]
#