> I'm trying to make a macro system that's work by just doing this OK, But to get your acros to use a language extension to python (the with.... syntax) you are going to have to write your own language interpreter/parser. Even if that just turns the 'with' stuff into Python.
So why is the """ marker even necessary? Your interpreter doesn't need it - although it might make things easier... I'm still confused I think. Alan G. > > import macro > class withMacro(prefixMacro): > pass > mac=withMacro() > mac.pattern("item key") > macro.expand() > > g=[] > """ > with g: > .append('a') > .append('b') > .append(123) > """ > > I would like to not have to use the comment strings. So when > expand() > is called it sucks in the file toeknizes it and expands the macro > then > runs the resulting modified code. > > Alan Gauld wrote: > > >>Does anyone happen to know how to turn of the syntax checking in > >>python? I've been working on a module driven preprocessor but I'd > >>like to not have to use comment strings. > >> > >> > > > >So don't use them! They aren't mandatory. > >I'm not sure I understand youir problem? Why would turning > >off syntax checking ever help? > > > >Alan G. > > > > > > > __________________________________ > Do you Yahoo!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor