move down py/impl/XYZ to py/_XYZ

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-01-13 17:15:54 +01:00
parent 5c27076d32
commit 9da1ba40ed
132 changed files with 229 additions and 231 deletions

18
py/_std.py Normal file
View File

@@ -0,0 +1,18 @@
import sys
class Std(object):
""" makes top-level python modules available as an attribute,
importing them on first access.
"""
def __init__(self):
self.__dict__ = sys.modules
def __getattr__(self, name):
try:
m = __import__(name)
except ImportError:
raise AttributeError("py.std: could not import %s" % name)
return m
std = Std()