summaryrefslogtreecommitdiffhomepage
path: root/tools/dfagen/dfagen/output/__init__.py
diff options
context:
space:
mode:
authorNicolas Schodet2008-03-17 22:53:01 +0100
committerNicolas Schodet2008-03-17 22:53:01 +0100
commit164ac3a34cbac441e82b256c97cb8784ea9d482c (patch)
treeb0db1276083d168b50e6aa2be9621368a36184cd /tools/dfagen/dfagen/output/__init__.py
parent388a90600023cca7d7b28702fa4cc75ed5074123 (diff)
* tools/dfagen:
- added dfagen.
Diffstat (limited to 'tools/dfagen/dfagen/output/__init__.py')
-rw-r--r--tools/dfagen/dfagen/output/__init__.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/dfagen/dfagen/output/__init__.py b/tools/dfagen/dfagen/output/__init__.py
new file mode 100644
index 00000000..be71aef7
--- /dev/null
+++ b/tools/dfagen/dfagen/output/__init__.py
@@ -0,0 +1,24 @@
+from ConfigParser import ConfigParser
+
+class UserConfig:
+ def __init__ (self, file):
+ if file:
+ f = open (file, 'r')
+ cp = ConfigParser ()
+ cp.readfp (f)
+ f.close ()
+ self.dict = dict (cp.items ('user'))
+
+ def __getitem__ (self, key):
+ return self.dict[key]
+
+import c
+import dot
+
+outputs = dict (
+ c = c,
+ dot = dot,
+ )
+
+def get_output (name):
+ return outputs[name];