I'm trying to import a local module into my application.

I've got the following at the bottom of one of my model files:

from gluon.custom_import import track_changes
track_changes(True)

It still appears to be caching the class definition.  Has any of this code 
changed recently?

Initially I was passing the class a dict of config variables like so:


class ExampleClass:
    def __init__(self,config):
        self.config = config


When I called it from the controller, it returned the dict.

Then, when I changed the class file to self.config = 1, it was still 
returning the dict.

Deleted the .pyc file and restarted the webserver and it gave me the new 
value.

Am I missing something?

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to