changeset 219:21b458127924

adding showconfig.py, which should have been added a while ago
author drewp@bigasterisk.com
date Sun, 17 Apr 2005 05:54:39 +0000
parents 65ed570b7ba8
children 13c089886f61
files light9/showconfig.py
diffstat 1 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/light9/showconfig.py	Sun Apr 17 05:54:39 2005 +0000
@@ -0,0 +1,28 @@
+from os import path,getenv
+
+def root():
+    r = getenv("LIGHT9_SHOW")
+    if r is None:
+        raise OSError("LIGHT9_SHOW env variable has not been set to the show root")
+    return r
+
+def musicDir():
+    return path.join(root(),"music")
+
+def curvesDir():
+    return path.join(root(),"curves")
+
+def songFilename(song):
+    return path.join(musicDir(),"%s.wav" % song)
+
+def subtermsForSong(song):
+    return path.join(root(),"subterms",song)
+
+def subFile(subname):
+    return path.join(root(),"subs",subname)
+
+def subsDir():
+    return path.join(root(),'subs')
+
+def patchData():
+    return path.join(root(),"patchdata.py")