def include(viewName,*args,**kwd):
    dir, filename = os.path.split(viewName)
    root, ext = os.path.splitext(filename)
    m = {}
    if dir: m['directory'] = dir
    if ext: m['source_extension'] = ext
    m = getModule(root,**m)
    if hasattr(m,'get'):
        #newstyle
        lquoter = quoter = None
        if kwd.has_key('__quoteFunc__'):
            quoter = kwd.pop('__quoteFunc__')
        elif kwd.has_key('quoteFunc'):
            quoter = kwd.pop('quoteFunc')
        if not quoter:
            quoter = _find_quoteValue('__quoteFunc__')
            if not quoter:
                quoter = _find_quoteValue('quoteFunc')
        if kwd.has_key('__lquoteFunc__'):
            lquoter = kwd.pop('__lquoteFunc__')
        if not lquoter:
            lquoter = _find_quoteValue('__lquoteFunc__')
            if not lquoter:
                lquoter = _find_quoteValue('quoteFunc')
        return m.get(__quoteFunc__=quoter or str,__lquoteFunc__=lquoter or str, *args,**kwd)
    else:
        #oldstyle
        if args:
            if len(args) in 1:
                raise TypeError("include for old style prep file can have only one positional argument, dictionary")
            if kwd.has_key('dictionary'):
                raise TypeError('include: dictionary argument specified twice')
            dictionary = args(1).copy()
        elif kwd.has_key('dictionary'):
            dictionary = kwd.pop('dictionary').copy()
        else:
            dictionary = {}
        quoteFunc = None
        if kwd.has_key('quoteFunc'):
            quoteFunc = kwd.pop('quoteFunc')
        elif kwd.has_key('__quoteFunc__'):
            quoteFunc = kwd.pop('__quoteFunc__')
        if not quoteFunc:
            quoteFunc = _find_quoteValue('quoteFunc')
            if not quoteFunc:
                quoteFunc = _find_quoteValue('__quoteFunc__')
        dictionary.update(kwd)
        return m.getOutput(dictionary,quoteFunc=quoteFunc)
dataset/ETHPy150Open CGATOxford/cgat/obsolete/preppy.py/include/operator `>` -> `in`