From d7dfbad078044f016cecb2d1dfc010a8ebee907a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 14 Sep 2012 12:07:10 -0400 Subject: [PATCH] posts:gstreamer:beep: no need to import gtk for an endless loop. --- posts/GStreamer/beep.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) -- 2.26.2