web2py import your own modules


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # in this example TestingA.py is in the modules folder
  2. exec('from applications.%s.modules import TestingA as ta' % request.application)
  3. reload(ta) # for devel only
  4. result = ta.Calc()
  5. return result

URL: http://groups.google.com/group/web2py/browse_thread/thread/f33921cada42b424/de2824a475967ac7?lnk=raot

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.