mirror of
https://github.com/bendtherules/pyFun.git
synced 2026-08-18 13:52:46 +00:00
25 lines
494 B
Python
25 lines
494 B
Python
import Circle
|
|
import Rect
|
|
import Img
|
|
|
|
# try..except saves from AttributeError during import
|
|
# => means import, -> means running line within that file
|
|
# why : sprite_types => Circle => sprite_types -> Circle.Circle
|
|
# this raises error, as Circle class not yet defined in Circle
|
|
# but when __main__ runs, after all successful imports, Circle.Circle is defined
|
|
|
|
try:
|
|
Circle = Circle.Circle
|
|
except:
|
|
pass
|
|
|
|
try:
|
|
Rect = Rect.Rect
|
|
except:
|
|
pass
|
|
|
|
try:
|
|
Img = Img.Img
|
|
except:
|
|
pass
|