Hi Massimo, thanks for your answer.
sites-packages is an option indeed.
Importing modules works without issues when i fully qualify the import path
like:
from applications.myapp.modules.utils import anyfunc
I have been reading the custom_import, which tries to find or reload the
module unsucc
Do not do this. The models are executed at every http call and you end up
with a longer and longer sys.path (memory leak).
The problem is with the module itself, it does not uses relative imports.
I recommend you put the module in web2py/site-packages
On Wednesday, 2 January 2019 02:49:56 UTC-8,
Hi, so far it looks like this works:
at the model 01_config.py
import sys
sys.path.insert(0, r"E:\webdev\web2py-mod.02\applications\myapp\modules")
then im able to import as:
from utils import myfunc
where utils.py is an application module at applications\myapp\modules
--
Resources:
- http://
Hi, im having a similar issue:
In modules, i have a utils.py module with a function called "first" that i
cant import from another module.
The problem is that theres a utils.py module installed in the python
standard library that obviously doesn not has that function and its being
imported bef
On Friday, July 20, 2018 at 5:39:56 PM UTC-4, Dave S wrote:
>
>
>
> On Friday, July 20, 2018 at 8:49:26 AM UTC-7, Anthony wrote:
>>
>> local_import was deprecated several years ago (I don't think it's even
>> mentioned in the book any more). Just use regular imports. There shouldn't
>> be any nee
On Friday, July 20, 2018 at 8:49:26 AM UTC-7, Anthony wrote:
>
> local_import was deprecated several years ago (I don't think it's even
> mentioned in the book any more). Just use regular imports. There shouldn't
> be any need to change sys.path. If you still have problems, we may need to
> se
local_import was deprecated several years ago (I don't think it's even
mentioned in the book any more). Just use regular imports. There shouldn't
be any need to change sys.path. If you still have problems, we may need to
see some real code and names. There could be issues if your module has the
7 matches
Mail list logo