Python Import Results In Nameerror
This seems pretty basic, so I must be missing something obvious. Goal is to import a module from the same directory. I've broken it down about as simple as I can and I'm getting th
Solution 1:
You are accessing the function incorrectly.
Either use the following
import import_this
import_this.my_function(2)
or do,
from import_this import my_functionmy_function(2)
Solution 2:
Alternatively (apart from @mu's answer above),
>>>import import_this as it
.. and then,
>>>it.my_function(2)
Post a Comment for "Python Import Results In Nameerror"