No, it does not work. And the problem is not related to the *_DateTrackerImporter as I'm not using the track_changes options.*
**I've made some tests and I've found that in _Web2pyImporter.__call__ the code reaches the "import like 'from x import a, b, ...'" section with the vars set to: name = selfgroup.castalia caller_file_name = C:\w2p\web2py\applications\castalia\controllers/default.py self.web2py_path = C:\w2p\web2py match_app_dir = <_sre.SRE_Match object at 0x018B7420> modules_prefix = applications.castalia.modules module_prefix + '.' + name = applications.castalia.modules.selfgroup.castalia fromlist = ('config',) level = -1 then the call to super(_Web2pyImporter, self).__call__( modules_prefix+"."+name, globals, locals, fromlist, level ) raises the ImportError exception (No module named castalia.modules.selfgroup.castalia). The sys.path seems correct: ['', 'C:\\w2p\\web2py\\site-packages', 'C:\\w2p\\web2py', 'C:\\w2p\\web2py\\gluon', 'C:\\w2p\\web2py\\library.zip'] No clue. On Mon, Jun 6, 2011 at 3:08 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > If this s the problem, I have a possible fix in trunk.Please give it a > try. Yet I am not convinced this is the problem. > > On Jun 4, 5:20 pm, Pierre Thibault <pierre.thibau...@gmail.com> wrote: > > 2011/6/3 Alessandro Iob <alessandro....@gmail.com> > > > > > > > > > > > > > > > > > > > > > I have tried the new modules import feature (from mymodule import *, > looks > > > for mymodule in applications/thisapp/ modules first and then in > sys.path. No > > > more need for local_import) and it works wonderfully on OS/X but not at > all > > > on Windows. Below you can find the traceback. > > > > > web2py™Version 1.96.2 (2011-06-03 16:11:39)PythonPython 2.5.4: > > > C:\web2py\web2py.exe > > > > > Traceback (most recent call last): > > > File "gluon/restricted.py", line 184, in restricted > > > File "C:/web2py/applications/castalia/controllers/default.py" < > http://127.0.0.1:8000/admin/default/edit/castalia/controllers/default.py>, > line 2, in <module> > > > File "gluon/custom_import.py", line 280, in __call__ > > > File "gluon/custom_import.py", line 125, in __call__ > > > ImportError: No module named selfgroup.castalia > > > > > Any suggestion? > > > > > Thank you > > > > Hello Alessandro, > > > > I wrote this code but I don't have Windows to do testing. I suspect it is > a > > problem related to os.stat. > > > > Can you run this code on your machine and gave me the result? > > > > import os > > print os.stat("*path to the module you want to import*").st_mtime > > -- > > > > A+ > > > > ------------- > > Pierre > > My blog and profile > > (http://pierrethibault.posterous.com)< > http://pierrethibault.posterous.com> > > YouTube page (http://www.youtube.com/user/tubetib)< > http://www.youtube.com/user/tubetib> > > Twitter (http://twitter.com/pierreth2) <http://twitter.com/pierreth2>