Python interpreter in python?

Chui Tey teyc at bigfoot.com
Tue Dec 19 17:26:07 EST 2000


I was planning play around with the ceval.c to get the python debugger to
reexecute certain lines (after stepping past them), which is very handy when
debugging tortuous routines in Zope. If there is a bytecode machine in
Python, we can make it so that it will play with pdb. Then we can prototype
changes to ceval in python first before digging around in c code.

Chui

Steven D. Majewski <sdm7g at virginia.edu> wrote in message
news:mailman.977254923.336.python-list at python.org...
>
> On Tue, 19 Dec 2000, D-Man wrote:
>
> >
> > The problem with such a thing is that to run your interpreter you
> > would need an existing interpreter (written in C/Java or other
> > language).  The only languages that can be implemented in themselves
> > are compiled languages like C and C++.
> >
>
> That is absolutely untrue!
>
> Lisp and Scheme are frequently implemented in themselves -- a
> 'metacircular interpreter' is a fairly typical student exercise.
>
> I don't know of a Python-in-Python, but I don't know of any reason
> you couldn't do one.
>
> The only question is: how deeply do you want to emulate it? i.e.
> are you allowed to use the existing parser module or do you want
> to write one from scratch?
>
> -- Steve Majewski <sdm7g @ Virginia.EDU>
>
>
>
>





More information about the Python-list mailing list