For the first time I'm having trouble importing a module in web2py that 
imports normally elsewhere. I can't understand why this would be so.

I'm trying to use the SendGrid Python API.  I have the sendgrid library in 
my modules folder like all my other modules, and I was trying to import per 
the sample code, but get a 
<type 'exceptions.NameError'> name 'sendgrid' is not defined
error.

But when I do the same import from a flat file using the command line, it 
runs fine.

Here is my controller code, and the sendgrid library is 
here<https://github.com/sendgrid/sendgrid-python/tree/master/sendgrid>
.

def test():
    import sendgrid

    return 'import worked'


Reply via email to