Your Ad Here

Posted By

laurenceosx on 07/30/09


Tagged

web2py


Versions (?)

web2py import your own modules


 / Published in: Python
 

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

  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

Report this snippet  

You need to login to post a comment.