Renaming identifiers & debugging

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Thu Feb 25 17:45:58 CET 2010


On Thu, 25 Feb 2010 16:26:32 +0100, Luca wrote:

> Hello, i am trying to develop an application to teach programming to
> young kids in a similar way as Logo did in the past. I would like to use
> an embedded Python as underlying language but this raises a problem.
> 
> The target of my app are very young kids that might be unfamiliar with
> english, so i am wondering if there is a way to rename/redefine
> identifiers and messages in the language of the kid.

>>> len("hello")
5
>>> length = len
>>> length("hello")
5

However, you can't rename statements such as for, while, if and similar, 
nor can you rename error messages. There might be an internationalised 
version of Python in the language the children speak. Have you tried 
googling?


> Also, i would need a way to debug the program, so set up breakpoints,
> execute line by line, inspect variables, is there any API for this in
> embedded python?

Have you tried the Python debugger?

import pdb



-- 
Steven



More information about the Python-list mailing list