I would like to do some OOP. I have the code working if I just declare the class in the main.py file but for obvious reasons that is getting a bit over crowded. Ive created a new newClass.py file in the same mode directory. In the main.py script, I try both
import "newClass" and from "newClass" import *
In both cases I’m getting the ImportError: No module named newClass
I’m guessing it could be a permission issue or I’m just dumb and don’t know what I’m doing. Both are equally likely.
Here is the output from console
error reloading: Traceback (most recent call last):
File "/home/music/EYESY_OS/engines/python/etc_system.py", line 258, in reload_mode
imp.load_source(self.mode, self.mode_root+'/main.py')
File "/sdcard/Modes/Python/ZHS - Boids//main.py", line 6, in
from Boids import *
ImportError: No module named Boids
yea that’s what I was doing so not sure why its not working. I wonder if its related to another issue im having. Certain things arent working as expected. I developed the mode in VScode and items like using the pygame.math.vector2 class are not accessible once I move over to the eyesy even though I have the import pygame.math at the top of the script.
Also basic sys commands like type() are not running on the eyesy but do in the emulator on VS code.
The following code produces the subsequent print statement in the Eyesy console for example: