import module from another folder

A simple hack to import a module from another folder

 

   import sys
    # caution: path[0] is reserved for script path (or '' in REPL)
    sys.path.insert(1, '/path/to/application/app/folder')

    import file

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *