@Johann, this is not a good solution because ties the import to the 
application name.

@Wonton, can you email me your app so I can take a look. What os? what 
python version? what web2py version?

On Monday, 4 February 2013 04:47:46 UTC-6, Johann Spies wrote:
>
> But if I do this in default.py:
>
>> import mymodule
>> def index():
>>     value = mymodule.attribute
>>     return value
>>
>> it works and return 'goobye world', so default detects the attribute but 
>> not the function, why is this? Maybe I'm not building the module correctly?
>>
>> I've tried to put the module inside site-packages and I've tried to 
>> import the module with local_import and in both cases the results where 
>> indentical (the attribute is read correctly but the function doesn't work).
>>
>> I don't know what could I try so any help will be very appreciated.
>
>
> After having trouble with modules I use the full path like this nowadays:
>
> from  applications.<application>.modules.<module> import *
>
>  
> I do not know whether that will help you.
>
> Regards
> Johann
> -- 
> Because experiencing your loyal love is better than life itself, 
> my lips will praise you.  (Psalm 63:3)
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to