posts:gstreamer:beep: no need to import gtk for an endless loop.
authorW. Trevor King <wking@tremily.us>
Fri, 14 Sep 2012 16:07:10 +0000 (12:07 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 14 Sep 2012 16:29:50 +0000 (12:29 -0400)
posts/GStreamer/beep.py

index 5260239da93824180f328eba6e77226174b59672..55ecf63cf4ad357c010112e1f7cc067a537c0142 100755 (executable)
@@ -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)