Wences last edited by ccc
Trying to learn Python using Pythonista whilst commuting to work by following a course that uses another software to code on Python.
One of the exercises creates a class in a different file, and by using the
from file.py import Classinstruction on a different file, I get the ModuleNotFound Error message.
Both files are saved in the same “folder” within Pythonista so I did not expect to include a path to the file that contains the class.
Do I need to use another software to enable the use of external classes / modules, do they have to be in a specific folder for Pythonista to know where the source is, or am I missing something else?
Any help would be appreciated.
cvp last edited by cvp
@Wences try "from file import ..." without specifying .py and be sure your "Class" is correctly written (uppercase or not)
Wences last edited by
Thanks, took the .py extension and worked!
Thanks for your help!