From: W. Trevor King Date: Fri, 14 Sep 2012 16:07:10 +0000 (-0400) Subject: posts:gstreamer:beep: no need to import gtk for an endless loop. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d7dfbad078044f016cecb2d1dfc010a8ebee907a;p=blog.git posts:gstreamer:beep: no need to import gtk for an endless loop. --- diff --git a/posts/GStreamer/beep.py b/posts/GStreamer/beep.py index 5260239..55ecf63 100755 --- a/posts/GStreamer/beep.py +++ b/posts/GStreamer/beep.py @@ -3,11 +3,12 @@ """Simple GStreamer tone generator. """ +import time + import pygst pygst.require('0.10') import gst -import pygtk -import gtk + class Beep: def __init__(self, frequency=440): @@ -39,4 +40,5 @@ if __name__ == '__main__': frequency = args.frequency start=Beep(frequency=frequency) - gtk.main() + while True: + time.sleep(10)