Also tried `import hi` # fail Should mention that I also need this to work in my models.
On Wed, Feb 20, 2013 at 12:30 AM, Alec Taylor <[email protected]> wrote: > How do I import variables, functions and classes from my > <appname>\modules folder? > > Following: http://rochacbruno.com.br/more-web2py-custom-validators/ > > I have a 'web2py\applications\<appname>\modules\validator.py' file, > for simplicity I added this function to it: > > def hi(): > print "hello" > > Now in 'web2py\applications\<appname>\controllers\default.py' I write: > > from validators import hi > # fail > import validators.hi > #fail > local_import('hi') > # fail > local_import('validators.hi') > #fail > > How do I import variables, functions and classes from my > <appname>\modules folder? > > Thanks for all suggestions, > > Alec Taylor -- --- 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/groups/opt_out.

