Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'redirected': 0.07; 'subject:code': 0.07; 'python': 0.09; 'template': 0.11; 'question)': 0.16; 'readable': 0.16; 'silly': 0.16; 'code,': 0.18; 'app': 0.19; 'file.': 0.20; 'trying': 0.21; "i'd": 0.22; "i've": 0.23; 'header:In-Reply-To:1': 0.25; 'appreciated.': 0.26; 'c++': 0.27; '(maybe': 0.29; "i'm": 0.29; 'knows': 0.30; 'code': 0.31; 'file': 0.32; 'anybody': 0.32; 'could': 0.32; 'to:addr:python- list': 0.33; 'generic': 0.35; 'something': 0.35; 'but': 0.36; 'xml': 0.37; 'does': 0.37; 'quite': 0.37; 'sure': 0.38; 'advice': 0.39; 'to:addr:python.org': 0.39; 'google': 0.39; 'skip:u 10': 0.60; 'received:194': 0.61; 'subject': 0.66 X-IronPort-AV: E=Sophos;i="4.80,561,1344204000"; d="scan'208";a="786088" X-Virus-Scanned: amavisd-new at zimbra.sequans.com Date: Tue, 9 Oct 2012 18:00:00 +0200 (CEST) From: Jean-Michel Pichavant To: Python mail-list In-Reply-To: <781541733.3114900.1349797969037.JavaMail.root@sequans.com> Subject: Generating C++ code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - GC7 (Linux)/7.2.0_GA_2669) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349798449 news.xs4all.nl 6935 [2001:888:2000:d::a6]:46690 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31045 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