Thursday, February 2, 2006, 10:11 PM - code
Some fun to be had. To start with try this:
import ossaudiodev
from ossaudiodev import AFMT_S16_LE
from Numeric import *
dsp = ossaudiodev.open('w')
dsp.setfmt(AFMT_S16_LE)
dsp.channels(2)
dsp.speed(22050)
i = 0
x = raw_input("length: ")
x = int(x)
a = arange(x)
while 1:
# between 200 and 600 is good
while i < x:
i = i +1
b = a[i:]
dsp.writeall(str(b))
print i,":",x
else:
while i !=0:
i = i -1
b = a[i:]
dsp.writeall(str(b))
print i,":",x
| permalink
Thursday, February 2, 2006, 10:10 PM - code
it's harder than you think!
here it is in python ported from some Java i found online.
Thursday, February 2, 2006, 10:10 PM - code
here's a wifi access point brower i wrote in python for Linux users that prefer to use console applications. i
'll get around to one that roams and pumps based on the best offer.
scent.py
Thursday, February 2, 2006, 10:09 PM - code
here's a little python script to let you know when your laptop battery is running low.
dacpi.py
back




