为什么我无法在Python中导入自己的模块

I dont know why I can't import my own module in my app. There is a quick example how it works. Now it works as long as I use "from smt import smt" When it works But when I try use "import smt" it doesnt work, I dont know why. Now err. message says my function from that module is not defined Doesnt work

评论
  • 乐成
    乐成 回复

    When you use import * from smt you are importing everything from this file with their original names, but when you use import smt you have to call them like smt.foo().