web.py / pythonpath confusion
Im playing around with web.py as a lightweight web framework. Im having problems when i attempt to move the actual implementation of my page into a separate file instead of the root file. As a demonstration, My core.py file looks like this:

    import web, sys, os
    sys.path.append(os.path.abspath(os.path.dirname(__file__)))
    
    
    urls = (
        '/', 'index'
    )
    
    app = web.application(urls, globals())
        
    render = web.template.render('templates/')
        
    if __name__ == "__main__":
        app.run()

ive moved my implementation into a file called index.py at the same level as core.py. My implementation looks like this:

    class index:
        def GET(self):
            return "Hello world"

however, whenever i run my application, i get an error:

`<type 'exceptions.KeyError'> at /`

can anybody tell me what is going on?
web.py / pythonpath confusion
===

Im playing around with web.py as a lightweight web framework. Im having problems when i attempt to move the actual implementation of my page into a separate file instead of the root file. As a demonstration, My core.py file looks like this:

    import web, sys, os
    sys.path.append(os.path.abspath(os.path.dirname(__file__)))
    
    
    urls = (
        '/', 'index'
    )
    
    app = web.application(urls, globals())
        
    render = web.template.render('templates/')
        
    if __name__ == "__main__":
        app.run()

ive moved my implementation into a file called index.py at the same level as core.py. My implementation looks like this:

    class index:
        def GET(self):
            return "Hello world"

however, whenever i run my application, i get an error:

`<type 'exceptions.KeyError'> at /`

can anybody tell me what is going on?