[orca] Don't import gst directly until we really need to use it



commit 72470b738a6876f45a0e45e082b4ea73135e9be7
Author: Willie Walker <william walker sun com>
Date:   Fri Jul 24 09:08:48 2009 -0400

    Don't import gst directly until we really need to use it

 src/orca/sound.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/sound.py b/src/orca/sound.py
index 5215321..e2533ae 100644
--- a/src/orca/sound.py
+++ b/src/orca/sound.py
@@ -25,9 +25,13 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2009 Sun Microsystems Inc."
 __license__   = "LGPL"
 
-import pygst
-pygst.require("0.10")
-import gst
+if False:
+    # Don't require this until we actually use gst directly instead
+    # of doing an os.system call.
+    # 
+    import pygst
+    pygst.require("0.10")
+    import gst
 
 class Sound:
     """Class to hold a path to a sound file to play."""



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]