On Mar 26, 12:21 pm, "Adam Atlas" <[EMAIL PROTECTED]> wrote:
> Does anyone know if it would be possible to create a CPython extension
> -- or use the ctypes module -- to access Python's own embedding API
> (http://docs.python.org/api/initialization.html&c.)? Could a Python
> program itself create a sub-interpreter, and work with it with all the
> privileges and capabilities that an actual C program would have?
>
> I realize that this may be a bit too... mystical? ... for a lot of
> people's tastes, but I'm just curious if it's possible. :)

I think that is what the "code" module is for. Maybe not exactly what
you were expecting, but the capability you describe is already there.
Being able to access its own interpreter is one of the things that
makes Python a  dynamic language.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to