It gives me the following error: ImportError: No module named applications.mlinks.modules
On Fri, Apr 2, 2010 at 5:48 AM, mr.freeze <[email protected]> wrote: > I was able to create a new app, copy clienttools.py to the modules > directory and import with the code below. Perhaps there is an issue > with local_import and GAE? Try changing this line: > clienttools = local_import('clienttools') > To this: > from applications.mlinks.modules import clienttools > > On Apr 1, 11:57 pm, Miguel <[email protected]> wrote: > > Hi > > > > I tried to install the clienttools.py module found herehttp:// > www.web2pyslices.com/main/slices/take_slice/8 > > > > However when in my application controller I try to import the module > > by doing the following: > > clienttools = local_import('clienttools') > > page = clienttools.PageManager(globals()) > > event = clienttools.EventManager(page) > > js = clienttools.ScriptManager(page) # javascript helpers > > jq = clienttools.JQuery # don't instantiate, just to shorten > > > > I get the following error: > > > > Traceback (most recent call last): > > File "C:\web2py\gluon\restricted.py", line 173, in restricted > > exec ccode in environment > > File "C:\web2py\applications\mlinks/controllers/ > > backend.py:GenerateLinksBetweenSites", line 26, in <module> > > File "C:\web2py\gluon\compileapp.py", line 258, in <lambda> > > local_import_aux(name,reload,app) > > File "C:\web2py\gluon\compileapp.py", line 196, in local_import_aux > > exec("import %s as mymodule" % name) in env > > File "<string>", line 1, in <module> > > ImportError: No module named applications.mlinks.modules.clienttools > > > > the clienttools.py file is in the modules directory of my application. > > > > What am I doing wrong? > > Thanks > > -Miguel > > > > PS: I am running on the gae locally (devserver) > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<web2py%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

