Unclutter graphics package scope.
authorEdouard Tisserant
Tue, 13 Feb 2018 14:01:20 +0100
changeset 1931 7e6b03251bfe
parent 1930 e6de7df5f401
child 1932 65d2dbbf7022
Unclutter graphics package scope.
Moved some import statements from "graphics" package to "viewer" module.
It also avoid systematic import of everything in graphics when we only need one submodule.
editors/Viewer.py
graphics/__init__.py
--- a/editors/Viewer.py	Tue Feb 13 13:57:53 2018 +0100
+++ b/editors/Viewer.py	Tue Feb 13 14:01:20 2018 +0100
@@ -34,7 +34,14 @@
 from plcopen.structures import *
 from PLCControler import ITEM_VAR_LOCAL, ITEM_POU, ITEM_PROGRAM, ITEM_FUNCTIONBLOCK
 from graphics.DebugDataConsumer import DebugDataConsumer
-from graphics import *
+
+from graphics.GraphicCommons import *
+from graphics.FBD_Objects import *
+from graphics.LD_Objects import *
+from graphics.SFC_Objects import *
+from graphics.RubberBand import RubberBand
+from graphics.DebugDataConsumer import DebugDataConsumer
+
 from dialogs import *
 from editors.DebugViewer import DebugViewer, REFRESH_PERIOD
 from editors.EditorPanel import EditorPanel
--- a/graphics/__init__.py	Tue Feb 13 13:57:53 2018 +0100
+++ b/graphics/__init__.py	Tue Feb 13 14:01:20 2018 +0100
@@ -24,11 +24,3 @@
 
 # Package initialisation
 
-from __future__ import absolute_import
-
-from graphics.GraphicCommons import *
-from graphics.FBD_Objects import *
-from graphics.LD_Objects import *
-from graphics.SFC_Objects import *
-from graphics.RubberBand import RubberBand
-from graphics.DebugDataConsumer import DebugDataConsumer