If i do

default.py

def index():
    import mymodule

Its ok


But if i do

default.py

import mymodule

def index():
    some code here


Its show an error where the error say

NameError: name 'request' is not defined

I dont import the module in each function, i want import only one time.

2011/12/16 Anthony <[email protected]>

> Can you give an example?
>
>
> On Friday, December 16, 2011 11:43:00 AM UTC-5, nekrox wrote:
>>
>>
>> Each time when i try import a module out of a function python show a
>> error saying they would not find request.
>>
>> I have to necessarily import all modules inside of a function?
>>
>> --
>> Alvaro Lizama Molina  - http://alvarolizama.net
>>
>


-- 
Alvaro Lizama Molina  - http://alvarolizama.net

Reply via email to