ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Erik Margraf <erik.margraf@googlemail.com>
To: ntg-context@ntg.nl
Subject: Pretty Printing Python code
Date: Tue, 29 Dec 2009 12:03:00 +0100	[thread overview]
Message-ID: <ca5756140912290303h65225c9aned258e9cd2d9a618@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 862 bytes --]

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.

Thanks in advance for any hint

Erik Margraf

[-- Attachment #1.2: Type: text/html, Size: 976 bytes --]

[-- Attachment #2: yyy.tex --]
[-- Type: application/x-tex, Size: 1513 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2009-12-29 11:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29 11:03 Erik Margraf [this message]
2009-12-29 11:59 ` Hans Hagen
2009-12-29 17:09 ` luigi scarso
2009-12-29 17:34 ` luigi scarso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca5756140912290303h65225c9aned258e9cd2d9a618@mail.gmail.com \
    --to=erik.margraf@googlemail.com \
    --cc=erik.margraf@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).