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


Groups > comp.lang.python > #31107

Re: Generating C++ code

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <animelovin@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'redirected': 0.07; 'subject:code': 0.07; 'python': 0.09; '(it': 0.09; 'received:mail- qc0-f174.google.com': 0.09; 'xml.': 0.09; 'cc:addr:python-list': 0.10; 'template': 0.11; 'interfaces': 0.15; '>does': 0.16; 'c++.': 0.16; 'describing': 0.16; 'oct': 0.16; 'readable': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'hack': 0.18; 'tim': 0.18; 'file.': 0.20; 'trying': 0.21; "i'd": 0.22; 'cc:2**0': 0.23; 'purposes': 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'url:wiki': 0.26; 'besides': 0.27; 'c++': 0.27; 'interface': 0.27; 'url:wikipedia': 0.29; 'url:mailman': 0.29; 'definition': 0.29; 'objects': 0.29; "i'm": 0.29; 'knows': 0.30; 'code': 0.31; 'url:python': 0.32; 'anybody': 0.32; 'url:listinfo': 0.32; 'handle': 0.33; 'received:google.com': 0.34; 'project': 0.34; 'done': 0.34; 'received:209.85': 0.35; 'something': 0.35; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'url:org': 0.36; 'generation': 0.36; 'should': 0.36; 'charset:us- ascii': 0.36; 'enough': 0.36; 'xml': 0.37; 'quite': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'url:en': 0.38; 'google': 0.39; 'header:Received:5': 0.40; 'url:mail': 0.40; 'your': 0.60; 'skip:u 10': 0.60; 'header:Message-Id:1': 0.62; 'received:96': 0.62; 'more': 0.63; 'useful.': 0.65; 'subject': 0.66; 'suited': 0.71; 'pain': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=G8n5FxQUSugE5WZFihdKaMcdC/8DzxUEM9R0OzP0fj0=; b=iFeqkHLZZpshm5wYUKc/rhuCYS8EE99RiIPdIZePI8dJY+p39ZC/c+tn2McZBlQKkl me+C9Knd4TNLgQlIVpHf705yyGJImrus4agPKpStlV5+UQEdzrC9ti4yTreyb+uU+OHo Lw8j5P1wn1thhHKUP02JP+sND6OtuAQfIeSp0jk0urHjtT5IhLYLyqfIuhsu39oEpfAk fsbTTATh0JwT01964yymB3rs3MBKBtxAuyRbJug58vp4sydwxo8XX92nrsvKSCOKE92w QdJKQte5mnxCdpI5Cgz+zMW7In+1B7lNHcD1hm5E1RWDr/SqzzP7xdHXZKyr1uxT9jCb wRfQ==
Date Thu, 11 Oct 2012 06:00:47 -0400
From Etienne Robillard <animelovin@gmail.com>
To jeanmichel@sequans.com
Subject Re: Generating C++ code
In-Reply-To <s6ec78h5iq43h3vv6t9lqmohb5ej8pafhv@4ax.com>
References <781541733.3114900.1349797969037.JavaMail.root@sequans.com> <mailman.2008.1349798449.27098.python-list@python.org> <s6ec78h5iq43h3vv6t9lqmohb5ej8pafhv@4ax.com>
X-Mailer Sylpheed 3.2.0 (GTK+ 2.24.10; i686-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2042.1349949642.27098.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1349949642 news.xs4all.nl 6978 [2001:888:2000:d::a6]:49784
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:31107

Show key headers only | View raw


On Wed, 10 Oct 2012 20:12:36 -0700
Tim Roberts <timr@probo.com> wrote:

> Jean-Michel Pichavant <jeanmichel@sequans.com> wrote:
> >
> >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 ?
> 
> I'm a big fan of Cheetah.  It's simple but flexible enough to be useful.
> Besides the many web projects I've done with it, I also I use it in one
> project to generate PHP code (it generates data access objects from a live
> database schema).
> -- 
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Also take a look at IDL, for a proper way to handle interface generation in C++. No python or cheetah
required as by definition your interfaces should be portable. What your describing is more or less look
like a hack or something which would be a pain to maintain without SWIG or something more suited for
this purposes than XML. 

http://en.wikipedia.org/wiki/Interface_description_language
http://en.wikipedia.org/wiki/SWIG

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Generating C++ code Jean-Michel Pichavant <jeanmichel@sequans.com> - 2012-10-09 18:00 +0200
  Re: Generating C++ code Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-10-10 12:47 +0200
  Re: Generating C++ code Tim Roberts <timr@probo.com> - 2012-10-10 20:12 -0700
    Re: Generating C++ code Etienne Robillard <animelovin@gmail.com> - 2012-10-11 06:00 -0400

csiph-web