Hi,
i'd like an easy way to test for a) are we running on pypy?
b) what is the pypy version. c) access pypy internals such
as transparent proxies.
Today, it is possible to check for
a) via "'__pypy__' in sys.builtin_module_names" and for
b) with "sys.pypy_version_info >= (x,y)". There are also a
couple of other 'sys.pypy_*' variables.
c) can be done by (trying to) import __pypy__.
What about rather doing a single clean 'sys.pypy' module namespace such
that we can do:
a) hasattr(sys, 'pypy')
b) sys.pypy.version_info >= (x,y)
c) expose the __pypy__ builtin module as sys.pypy?
Semantically, the sys module already presents an interaction
API with the interpreter. Doing a single namespace looks more
elegant to me than of cluttering sys with an artifical 'pypy_*'
prefixed namespace and having to (try-except)import __pypy__.
best,
holger
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev