Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Generating C++ code

Reply
Thread Tools

Re: Generating C++ code

 
 
Etienne Robillard
Guest
Posts: n/a
 
      10-09-2012
On Tue, 09 Oct 2012 20:55:48 +0100
Andrea Crotti <> wrote:

> 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++?
> --
> http://mail.python.org/mailman/listinfo/python-list


You can build nice python app with Cython/Pyrex too if you got sufficient knowledge in C/C++ programming
to extend the app in C.

Otherwise that seem like a little counter-productive to produce a python template only for generating C stubs when python
is good for many things without requiring advanced C++ skills like memory management, etc.

HTH,
E
--
Etienne Robillard
Green Tea Hackers Club
Fine Software Carpentry For The Rest Of Us!
http://gthc.org/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating HTML code in the code-behind lisa@starways.net ASP .Net Web Controls 2 09-25-2005 05:24 PM
Generating HTML code in the code-behind lisa@starways.net ASP .Net Building Controls 2 09-25-2005 05:24 PM
td tag generating faulty code Naveen K Kohli ASP .Net 1 05-13-2005 09:00 PM
Generating HTML code =?Utf-8?B?Y25pY2ts?= ASP .Net 2 03-22-2005 02:24 PM
Generating Javascript from a button in Code-behind Nevyn Twyll ASP .Net 4 03-06-2004 08:31 AM



Advertisments