My folders looks like this:
Code_Sources (folder)
main.py
Class (folder)
game_class.py
player_class.py
I made in game_class.py:
from player_class import *
And when I run the game_class.py I have no problem. But when I run main.py which contains:
import pygame
from Class.game_class import Game
if __name__ == "__main__" :
pygame.init()
game = Game()
game.run()
It says that an error comes from game_class.py and No module named 'player_class'
.
I don't understand why.
I tried the method of init.py
but it doesn't work.