Skip to content

Commit 5f247c5

Browse files
committed
__init__ : Fix ModuleNotFoundError on install of PyEngine
1 parent f6687b8 commit 5f247c5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pyengine/__init__.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
from pyengine.Window import Window
2-
from pyengine.World import World
3-
from pyengine.Entity import Entity
4-
from pyengine.GameState import GameState
5-
from pyengine.Enums import ControlType, MouseButton, CollisionCauses, WorldCallbacks
6-
from pygame import locals as const
1+
try:
2+
from pyengine.Window import Window
3+
from pyengine.World import World
4+
from pyengine.Entity import Entity
5+
from pyengine.GameState import GameState
6+
from pyengine.Enums import ControlType, MouseButton, CollisionCauses, WorldCallbacks
7+
from pygame import locals as const
8+
except ModuleNotFoundError:
9+
pass
710

811
__all__ = ["Window", "World", "Entity", "ControlType", "const", "MouseButton", "CollisionCauses",
912
"WorldCallbacks", "GameState"]

0 commit comments

Comments
 (0)