Re: [web2py] Re: dynamic importing from an external module

2010-01-18 Thread Jeff Bauer
On 01/18/2010 09:26 AM, mdipierro wrote: do you have an empty __init__.py file in odt/ ? If not that is necessary. Yes, otherwise I would not be able to import dispatcher at all. Is there a variable called __all__ in dispatcher.py? It should be a list of variable that can be exported and shou

[web2py] Re: dynamic importing from an external module

2010-01-18 Thread mdipierro
do you have an empty __init__.py file in odt/ ? If not that is necessary. Is there a variable called __all__ in dispatcher.py? It should be a list of variable that can be exported and should include RPATH2 On Jan 17, 11:32 pm, Jeff Bauer wrote: > I've got an external module /odt/dispatcher.py, w

Re: [web2py] Re: dynamic importing from an external module

2010-01-18 Thread Jeff Bauer
I did not modify sys.path. The dispatcher module is on PYTHONPATH and can be imported from within or outside the web2py server. Jeff Bauer Rubicon, Inc. On 01/18/2010 01:53 AM, mdipierro wrote: Where is the module? Did you chance sys.path? If so, how/where? On Jan 17, 11:32 pm, Jeff Bauer wr

[web2py] Re: dynamic importing from an external module

2010-01-17 Thread mdipierro
Where is the module? Did you chance sys.path? If so, how/where? On Jan 17, 11:32 pm, Jeff Bauer wrote: > I've got an external module /odt/dispatcher.py, with > a class defined: > > class Dispatcher: >      pass > > I can import Dispatcher into controllers/default.py. > However, if I edit dispatch