OK, What are the steps to reproduce the problem?
On 24 avr, 19:06, Jose <jjac...@gmail.com> wrote: > On 24 abr, 17:14, pierreth <pierre.thibau...@gmail.com> wrote: > > > Hello, > > > I am unable to reproduce the problem. > > > bpython is importing well here. > > > To make sure, in gluon/custom_import.py, do you have this at line 46: > > > try: > > result = result or new_mod.__dict__[name] > > except KeyError: > > raise ImportError() > > > or something else? If do not have this, you do not have the latest > > trunk and you need to update. > > Hi pierret, > > Supposedly I have the version of the trunk. Updated daily. The last > time an hour ago. > > In gluon/custom_import.py I have what follows: > > def _web2py__import__(name, globals={}, locals={}, fromlist=[], > level=-1): > ... > ... > def _web2py__import__dot(prefix, name, globals, locals, fromlist, > level): > """ > Here we will import x.y.z as many imports like: > from applications.app_name.modules import x > from applications.app_name.modules.x import y > from applications.app_name.modules.x.y import z. > x will be the module returned. > """ > > result = None > for name in name.split("."): > new_mod = _old__import__(prefix, globals, locals, > [name], level) > try: > result = result or new_mod.__dict__[name] > except KeyError: > raise ImportError() > prefix += "." + name > return result > > Jose