From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55377 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Pretty Printing Python code Date: Tue, 29 Dec 2009 12:59:20 +0100 Message-ID: <4B39EF18.5040708@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262087980 26161 80.91.229.12 (29 Dec 2009 11:59:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2009 11:59:40 +0000 (UTC) To: erik.margraf@gmail.com, mailing list for ConTeXt users , "luigi.scarso" Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 29 12:59:33 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NPaja-0002W3-CP for gctc-ntg-context-518@m.gmane.org; Tue, 29 Dec 2009 12:59:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8D0D8C9BAC; Tue, 29 Dec 2009 12:59:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rslORQ9tg8rc; Tue, 29 Dec 2009 12:59:26 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E7802C9B7A; Tue, 29 Dec 2009 12:59:25 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5D432C9B7A for ; Tue, 29 Dec 2009 12:59:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id x5zpb2IMOzqG for ; Tue, 29 Dec 2009 12:59:23 +0100 (CET) Original-Received: from mail.solcon.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id C97D8C9B66 for ; Tue, 29 Dec 2009 12:59:22 +0100 (CET) X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-9 (SurgeMail 4.2a3) with ESMTP id 16867-1713362 for multiple; Tue, 29 Dec 2009 12:56:45 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55377 Archived-At: On 29-12-2009 12:03, Erik Margraf wrote: > Hello all, > I wanted to typeset some Python code and stumbled across the > pretty printing feature of ConTeXt. So far, I think I've learned the > following: > > -- There's no pretty printer for python. Neither in MKII nor in MKIV > -- The wiki has an example implementation for a python pretty printer > for MKII, i guess. > > I decided to play a little bit with pretty printing (maybe implement a > Python pretty printer on my own) and failed at the start ;-) > I tried the following: > -- Copied the filename pret-lua.lua to pret-py.lua > -- Added a print statement to verify that the respective lua > code (pret-lua.lua, pret-py.lua) is actually called. > When I ran context on the file below, I could see that "pret-lua.lua" > had been called, but "pret-py.lua" had not. I guess, I did wrong something > very fundamental. you need to post all relevant files luigi is the python expert here so i'm sure he'll figure out what's wrong Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________