summaryrefslogtreecommitdiff
path: root/tools/dfagen/dfagen/output/__init__.py
blob: be71aef7bfa8071df922f355401e58e252c72bef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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];