Hey all, I'm totally confusing myself about importing modules. I think the 
root of my problem is I didn't wrong before I learned how to do it right. 
Live and learn, right? But now I seem to be in a tangled mess.

For background, in my controller, report.py, I have a a function called 
result and in it i'm importing "my_module" like so:

def result():
    import my_module


My issue is I have no idea where it's getting that module. I've added the 
following:


import os.path  
print os.path.abspath(my_module.__file__)

and i see that it's importing from ".../web2py/my_module.py" (which I know 
is terrible). But if i delete my_module from .../web2py/, nothing happens. 
I'd expect it to break the app but it keeps on running and keeps on telling 
me it's importing the module from that very place where it now no longer 
exists.

What concept(s) am I missing here? At this point I feel like I just need to 
delete my_module.py from everywhere I can find it, put it in the modules 
folder in my app, and go on. However, I'm not convinced that will fix my 
issues.

Thanks in advance. 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to