+ 4
create two files in the same directory. in one, import the other's file name but drop the ".py" ex1.py ex2.py # ex2.py's code import ex1 #OR from ex1 import * # ... rest of code ...
29th Mar 2022, 6:00 PM
Slick
Slick - avatar
+ 2
Qhufu , make sure that both files are physically stored. if the file that will import the module is not stored, this error will come up...
30th Mar 2022, 5:19 PM
Lothar
Lothar - avatar
+ 1
I use pydroid and had that problem before. The fix is what Lothar said, for both files to be phisically stored (in other words, just save the files)
30th Mar 2022, 5:24 PM
Slick
Slick - avatar