Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31053 > unrolled thread

Re: Generating C++ code

Started byAndrea Crotti <andrea.crotti.0@gmail.com>
First post2012-10-09 20:55 +0100
Last post2012-10-09 20:55 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Generating C++ code Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-10-09 20:55 +0100

#31053 — Re: Generating C++ code

FromAndrea Crotti <andrea.crotti.0@gmail.com>
Date2012-10-09 20:55 +0100
SubjectRe: Generating C++ code
Message-ID<mailman.2014.1349812615.27098.python-list@python.org>
On 10/09/2012 05:00 PM, Jean-Michel Pichavant wrote:
> Greetings,
>
> I'm trying to generate C++ code from an XML file. I'd like to use a template engine, which imo produce something readable and maintainable.
> My google search about this subject has been quite unsuccessful, I've been redirected to template engine specific to html mostly.
>
> Does anybody knows a python template engine for generating C++ code ?
>
> Here's my flow:
>
> XML file -> nice python app -> C++ code
>
>  From what I know I could use Cheetah, a generic template engine. I never used it though, I'm not sure this is what I need.
> I'm familiar with jinja2 but I'm not sure I could use it to generate C++ code, did anybody try ? (maybe that's a silly question)
>
> Any advice would be appreciated.
>
> JM

I think you can use anything to generate C++ code, but is it a good idea?
Are you going to produce this code only one time and then maintain it 
manually?

And are you sure that the design that you would get from the XML file 
actually makes sense when
translated in C++?

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web