[web2py] issue when import from one web2py module into another

18 views
Skip to first unread message

Richard

unread,
Mar 17, 2016, 2:48:20 PM3/17/16
to web2py-users
Hello,

Is there any thing to consider when trying to import from one module to another?

I try import a specific fonction like so :

from other_module import function

<type 'exceptions.ImportError'> cannot import name "function"

Thanks

Richard

Richard Vézina

unread,
Mar 17, 2016, 2:50:36 PM3/17/16
to web2py-users
import module_name

Then

module_name.function

works fine...

Richard

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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 web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Leonel Câmara

unread,
Mar 17, 2016, 2:59:42 PM3/17/16
to web2py-users
from other_module import function

should work too

Richard Vézina

unread,
Mar 17, 2016, 3:31:57 PM3/17/16
to web2py-users
Don't know why it doesn't nothing special from my side...

On Thu, Mar 17, 2016 at 2:59 PM, Leonel Câmara <leonel...@gmail.com> wrote:
from other_module import function

should work too

--
Reply all
Reply to author
Forward
0 new messages