Quantcast
Channel: Error when I try to import a module - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by baldr for Error when I try to import a module

Use:import module2module2.funcion2(2, 3)You import a module and should explicitly specify it while calling a method.You can also import only this function:from module2 import funcion2funcion2(2, 3)

View Article



Answer by DeepSpace for Error when I try to import a module

If you want to import module2 you will need to call function2 this way: module2.funcion2(2,3).You usually want to avoid from <module> import * so either do as above or from module2 import...

View Article

Error when I try to import a module

This question may be trivial but I don't really get it. I have two python modules.This is module1:import module2def main(): print funcion2(2,3)if __name__ == '__main__': main()This is module2:def...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images