fix pylint warning "(relative-import) Relative import 'Y', should be 'X.Y'"
--- a/c_ext/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/c_ext/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,4 +22,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import +from c_ext.c_ext import * --- a/c_ext/c_ext.py Mon Oct 09 16:04:39 2017 +0300
+++ b/c_ext/c_ext.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,9 +22,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import -from CFileEditor import CFileEditor
+from c_ext.CFileEditor import CFileEditor from CodeFileTreeNode import CodeFile
--- a/canfestival/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/canfestival/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,4 +22,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from canfestival import *
+from __future__ import absolute_import +from canfestival.canfestival import * --- a/canfestival/canfestival.py Mon Oct 09 16:04:39 2017 +0300
+++ b/canfestival/canfestival.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,6 +23,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import @@ -53,9 +54,9 @@
from commondialogs import CreateNodeDialog
from subindextable import IECTypeConversion, SizeConversion
-from SlaveEditor import SlaveEditor, MasterViewer
-from NetworkEditor import NetworkEditor
+from canfestival import config_utils +from canfestival.SlaveEditor import SlaveEditor, MasterViewer +from canfestival.NetworkEditor import NetworkEditor AddCatalog(os.path.join(CanFestivalPath, "objdictgen", "locale"))
--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Mon Oct 09 16:04:39 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from types import TupleType
from time import time as gettime
from distutils.version import LooseVersion
@@ -36,8 +38,8 @@
from mpl_toolkits.mplot3d import Axes3D
from editors.DebugViewer import REFRESH_PERIOD
-from DebugVariableViewer import *
-from GraphButton import GraphButton
+from controls.DebugVariablePanel.DebugVariableViewer import * +from controls.DebugVariablePanel.GraphButton import GraphButton if LooseVersion(matplotlib.__version__) >= LooseVersion("1.5.0"):
--- a/controls/DebugVariablePanel/DebugVariablePanel.py Mon Oct 09 16:04:39 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from types import TupleType
@@ -37,9 +39,9 @@
from editors.DebugViewer import DebugViewer
from util.BitmapLibrary import GetBitmap
-from DebugVariableItem import DebugVariableItem
-from DebugVariableTextViewer import DebugVariableTextViewer
-from DebugVariableGraphicViewer import *
+from controls.DebugVariablePanel.DebugVariableItem import DebugVariableItem +from controls.DebugVariablePanel.DebugVariableTextViewer import DebugVariableTextViewer +from controls.DebugVariablePanel.DebugVariableGraphicViewer import * MILLISECOND = 1000000 # Number of nanosecond in a millisecond
--- a/controls/DebugVariablePanel/DebugVariableTextViewer.py Mon Oct 09 16:04:39 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,12 +22,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from types import TupleType
-from DebugVariableViewer import DebugVariableViewer
-from GraphButton import GraphButton
+from controls.DebugVariablePanel.DebugVariableViewer import DebugVariableViewer +from controls.DebugVariablePanel.GraphButton import GraphButton # -------------------------------------------------------------------------------
# Debug Variable Text Viewer Drop Target
--- a/controls/DebugVariablePanel/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/controls/DebugVariablePanel/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,5 +22,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from DebugVariablePanel import DebugVariablePanel
+from __future__ import absolute_import +from controls.DebugVariablePanel.DebugVariablePanel import DebugVariablePanel --- a/controls/VariablePanel.py Mon Oct 09 16:04:39 2017 +0300
+++ b/controls/VariablePanel.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from types import TupleType, StringType, UnicodeType
@@ -32,9 +34,9 @@
from plcopen.structures import LOCATIONDATATYPES, TestIdentifier, IEC_KEYWORDS, DefaultType
from graphics.GraphicCommons import REFRESH_HIGHLIGHT_PERIOD, ERROR_HIGHLIGHT
from dialogs.ArrayTypeDialog import ArrayTypeDialog
-from CustomGrid import CustomGrid
-from CustomTable import CustomTable
-from LocationCellEditor import LocationCellEditor
+from controls.CustomGrid import CustomGrid +from controls.CustomTable import CustomTable +from controls.LocationCellEditor import LocationCellEditor from util.BitmapLibrary import GetBitmap
from util.TranslationCatalogs import NoTranslate
from PLCControler import _VariableInfos
--- a/controls/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/controls/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -24,21 +24,23 @@
-from CustomEditableListBox import CustomEditableListBox
-from CustomGrid import CustomGrid
-from CustomTable import CustomTable
-from CustomTree import CustomTree
-from CustomIntCtrl import CustomIntCtrl
-from DebugVariablePanel import DebugVariablePanel
-from DurationCellEditor import DurationCellEditor
-from LibraryPanel import LibraryPanel
-from LocationCellEditor import LocationCellEditor
-from PouInstanceVariablesPanel import PouInstanceVariablesPanel
-from ProjectPropertiesPanel import ProjectPropertiesPanel
-from VariablePanel import VariablePanel
-from SearchResultPanel import SearchResultPanel
-from TextCtrlAutoComplete import TextCtrlAutoComplete
-from FolderTree import FolderTree
-from LogViewer import LogViewer
-from CustomStyledTextCtrl import CustomStyledTextCtrl
-from CustomToolTip import CustomToolTip
+from __future__ import absolute_import +from controls.CustomEditableListBox import CustomEditableListBox +from controls.CustomGrid import CustomGrid +from controls.CustomTable import CustomTable +from controls.CustomTree import CustomTree +from controls.CustomIntCtrl import CustomIntCtrl +from controls.DebugVariablePanel import DebugVariablePanel +from controls.DurationCellEditor import DurationCellEditor +from controls.LibraryPanel import LibraryPanel +from controls.LocationCellEditor import LocationCellEditor +from controls.PouInstanceVariablesPanel import PouInstanceVariablesPanel +from controls.ProjectPropertiesPanel import ProjectPropertiesPanel +from controls.VariablePanel import VariablePanel +from controls.SearchResultPanel import SearchResultPanel +from controls.TextCtrlAutoComplete import TextCtrlAutoComplete +from controls.FolderTree import FolderTree +from controls.LogViewer import LogViewer +from controls.CustomStyledTextCtrl import CustomStyledTextCtrl +from controls.CustomToolTip import CustomToolTip --- a/dialogs/ConnectionDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/ConnectionDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,11 +23,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.GraphicCommons import CONNECTOR, CONTINUATION
from graphics.FBD_Objects import FBD_Connector
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
# Set Connection Parameters Dialog
--- a/dialogs/FBDBlockDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/FBDBlockDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,13 +23,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.FBD_Objects import FBD_Block
from controls.LibraryPanel import LibraryPanel
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
--- a/dialogs/FBDVariableDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/FBDVariableDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,11 +23,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.GraphicCommons import INPUT, INOUT, OUTPUT
from graphics.FBD_Objects import FBD_Variable
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
--- a/dialogs/LDElementDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/LDElementDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,13 +23,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.GraphicCommons import CONTACT_NORMAL, CONTACT_REVERSE, \
CONTACT_RISING, CONTACT_FALLING, COIL_NORMAL, COIL_REVERSE, COIL_SET, \
COIL_RESET, COIL_RISING, COIL_FALLING
from graphics.LD_Objects import LD_Contact, LD_Coil
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
# Set Ladder Element Parmeters Dialog
--- a/dialogs/LDPowerRailDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/LDPowerRailDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,11 +23,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.GraphicCommons import LEFTRAIL, RIGHTRAIL
from graphics.LD_Objects import LD_PowerRail
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
# Set Ladder Power Rail Parameters Dialog
--- a/dialogs/SFCDivergenceDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/SFCDivergenceDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,12 +23,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.GraphicCommons import SELECTION_DIVERGENCE, \
SELECTION_CONVERGENCE, SIMULTANEOUS_DIVERGENCE, SIMULTANEOUS_CONVERGENCE
from graphics.SFC_Objects import SFC_Divergence
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
# Create New Divergence Dialog
--- a/dialogs/SFCStepDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/SFCStepDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,10 +23,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.SFC_Objects import SFC_Step
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
# Set SFC Step Parameters Dialog
--- a/dialogs/SFCTransitionDialog.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/SFCTransitionDialog.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,10 +23,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from graphics.SFC_Objects import SFC_Transition
-from BlockPreviewDialog import BlockPreviewDialog
+from dialogs.BlockPreviewDialog import BlockPreviewDialog # -------------------------------------------------------------------------------
# Set Transition Parameters Dialog
--- a/dialogs/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/dialogs/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -25,25 +25,27 @@
-from ConnectionDialog import ConnectionDialog
-from ActionBlockDialog import ActionBlockDialog
-from FBDBlockDialog import FBDBlockDialog
-from FBDVariableDialog import FBDVariableDialog
-from LDElementDialog import LDElementDialog
-from LDPowerRailDialog import LDPowerRailDialog
-from SFCStepDialog import SFCStepDialog
-from SFCStepNameDialog import SFCStepNameDialog
-from SFCTransitionDialog import SFCTransitionDialog
-from SFCDivergenceDialog import SFCDivergenceDialog
-from ForceVariableDialog import ForceVariableDialog
-from ArrayTypeDialog import ArrayTypeDialog
-from DurationEditorDialog import DurationEditorDialog
-from SearchInProjectDialog import SearchInProjectDialog
-from BrowseLocationsDialog import BrowseLocationsDialog
-from ProjectDialog import ProjectDialog
-from PouDialog import PouDialog
-from PouTransitionDialog import PouTransitionDialog
-from PouActionDialog import PouActionDialog
-from FindInPouDialog import FindInPouDialog
-from BrowseValuesLibraryDialog import BrowseValuesLibraryDialog
-from DiscoveryDialog import DiscoveryDialog
+from __future__ import absolute_import +from dialogs.ConnectionDialog import ConnectionDialog +from dialogs.ActionBlockDialog import ActionBlockDialog +from dialogs.FBDBlockDialog import FBDBlockDialog +from dialogs.FBDVariableDialog import FBDVariableDialog +from dialogs.LDElementDialog import LDElementDialog +from dialogs.LDPowerRailDialog import LDPowerRailDialog +from dialogs.SFCStepDialog import SFCStepDialog +from dialogs.SFCStepNameDialog import SFCStepNameDialog +from dialogs.SFCTransitionDialog import SFCTransitionDialog +from dialogs.SFCDivergenceDialog import SFCDivergenceDialog +from dialogs.ForceVariableDialog import ForceVariableDialog +from dialogs.ArrayTypeDialog import ArrayTypeDialog +from dialogs.DurationEditorDialog import DurationEditorDialog +from dialogs.SearchInProjectDialog import SearchInProjectDialog +from dialogs.BrowseLocationsDialog import BrowseLocationsDialog +from dialogs.ProjectDialog import ProjectDialog +from dialogs.PouDialog import PouDialog +from dialogs.PouTransitionDialog import PouTransitionDialog +from dialogs.PouActionDialog import PouActionDialog +from dialogs.FindInPouDialog import FindInPouDialog +from dialogs.BrowseValuesLibraryDialog import BrowseValuesLibraryDialog +from dialogs.DiscoveryDialog import DiscoveryDialog --- a/docutil/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/docutil/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import +from docutil.dochtml import * +from docutil.docpdf import * +from docutil.docsvg import * --- a/editors/ConfTreeNodeEditor.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/ConfTreeNodeEditor.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,11 +23,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import -from EditorPanel import EditorPanel
+from editors.EditorPanel import EditorPanel from IDEFrame import TITLE, FILEMENU, PROJECTTREE, PAGETITLES
--- a/editors/DataTypeEditor.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/DataTypeEditor.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,6 +23,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from types import TupleType
@@ -33,7 +35,7 @@
from graphics.GraphicCommons import REFRESH_HIGHLIGHT_PERIOD
from controls import CustomEditableListBox, CustomGrid, CustomTable, CustomIntCtrl
from dialogs import ArrayTypeDialog
-from EditorPanel import EditorPanel
+from editors.EditorPanel import EditorPanel from util.BitmapLibrary import GetBitmap
from util.TranslationCatalogs import NoTranslate
--- a/editors/FileManagementPanel.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/FileManagementPanel.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,13 +22,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import -from EditorPanel import EditorPanel
+from editors.EditorPanel import EditorPanel from util.BitmapLibrary import GetBitmap
from controls import FolderTree
--- a/editors/LDViewer.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/LDViewer.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,11 +22,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import
+from editors.Viewer import * def ExtractNextBlocks(block, block_list):
--- a/editors/ProjectNodeEditor.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/ProjectNodeEditor.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,10 +22,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from controls import ProjectPropertiesPanel, VariablePanel
-from ConfTreeNodeEditor import ConfTreeNodeEditor
+from editors.ConfTreeNodeEditor import ConfTreeNodeEditor class ProjectNodeEditor(ConfTreeNodeEditor):
--- a/editors/ResourceEditor.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/ResourceEditor.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import @@ -29,7 +31,7 @@
from graphics.GraphicCommons import REFRESH_HIGHLIGHT_PERIOD, ERROR_HIGHLIGHT
from controls import CustomGrid, CustomTable, DurationCellEditor
from dialogs.DurationEditorDialog import IEC_TIME_MODEL
-from EditorPanel import EditorPanel
+from editors.EditorPanel import EditorPanel from util.BitmapLibrary import GetBitmap
from util.TranslationCatalogs import NoTranslate
from plcopen.structures import TestIdentifier, IEC_KEYWORDS
--- a/editors/SFCViewer.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/SFCViewer.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,11 +22,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import
+from editors.Viewer import * from graphics.SFC_Objects import *
from graphics.GraphicCommons import SELECTION_DIVERGENCE, \
SELECTION_CONVERGENCE, SIMULTANEOUS_DIVERGENCE, SIMULTANEOUS_CONVERGENCE, EAST, NORTH, WEST, SOUTH
--- a/editors/TextViewer.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/TextViewer.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import @@ -30,7 +32,7 @@
from graphics.GraphicCommons import ERROR_HIGHLIGHT, SEARCH_RESULT_HIGHLIGHT, REFRESH_HIGHLIGHT_PERIOD
from plcopen.structures import ST_BLOCK_START_KEYWORDS, IEC_BLOCK_START_KEYWORDS, LOCATIONDATATYPES
-from EditorPanel import EditorPanel
+from editors.EditorPanel import EditorPanel from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos
# -------------------------------------------------------------------------------
--- a/editors/Viewer.py Mon Oct 09 16:04:39 2017 +0300
+++ b/editors/Viewer.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from time import time as gettime
from types import TupleType
@@ -35,7 +37,7 @@
from editors.DebugViewer import DebugViewer, REFRESH_PERIOD
-from EditorPanel import EditorPanel
+from editors.EditorPanel import EditorPanel --- a/graphics/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/graphics/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -24,9 +24,11 @@
-from GraphicCommons import *
-from FBD_Objects import *
-from LD_Objects import *
-from SFC_Objects import *
-from RubberBand import RubberBand
-from DebugDataConsumer import DebugDataConsumer
+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 --- a/plcopen/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/plcopen/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -26,5 +26,7 @@
# plcopen module dynamically creates its classes
-from plcopen import PLCOpenParser, LoadProject, SaveProject, LoadPou, \
+from __future__ import absolute_import +from plcopen.plcopen import \ + PLCOpenParser, LoadProject, SaveProject, LoadPou, \ LoadPouInstances, VarOrder, QualifierList, rect
--- a/plcopen/structures.py Mon Oct 09 16:04:39 2017 +0300
+++ b/plcopen/structures.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,12 +22,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from collections import OrderedDict
-from plcopen import LoadProject
-from definitions import *
+from plcopen.plcopen import LoadProject +from plcopen.definitions import * TypeHierarchy = dict(TypeHierarchy_list)
--- a/py_ext/PythonFileCTNMixin.py Mon Oct 09 16:04:39 2017 +0300
+++ b/py_ext/PythonFileCTNMixin.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,6 +23,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import import util.paths as paths
@@ -30,7 +32,7 @@
from xmlclass import GenerateParserFromXSD
from CodeFileTreeNode import CodeFile
-from PythonEditor import PythonEditor
+from py_ext.PythonEditor import PythonEditor class PythonFileCTNMixin(CodeFile):
--- a/py_ext/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/py_ext/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,6 +22,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from PythonEditor import PythonEditor
-from PythonFileCTNMixin import PythonFileCTNMixin
+from __future__ import absolute_import +from py_ext.py_ext import * +from py_ext.PythonEditor import PythonEditor +from py_ext.PythonFileCTNMixin import PythonFileCTNMixin --- a/py_ext/py_ext.py Mon Oct 09 16:04:39 2017 +0300
+++ b/py_ext/py_ext.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,9 +23,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from POULibrary import POULibrary
-from PythonFileCTNMixin import PythonFileCTNMixin
+from py_ext.PythonFileCTNMixin import PythonFileCTNMixin import util.paths as paths
--- a/runtime/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/runtime/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -21,8 +21,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+from __future__ import absolute_import -from PLCObject import PLCObject, PLCprint
+from runtime.PLCObject import PLCObject, PLCprint +import runtime.ServicePublisher --- a/svgui/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/svgui/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,4 +22,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import +from svgui.svgui import * --- a/svgui/pyjs/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/svgui/pyjs/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -1,1 +1,2 @@
+from __future__ import absolute_import +from svgui.pyjs.pyjs import * --- a/svgui/pyjs/build.py Mon Oct 09 16:04:39 2017 +0300
+++ b/svgui/pyjs/build.py Mon Oct 09 18:13:26 2017 +0300
@@ -1,5 +1,7 @@
+from __future__ import absolute_import from __future__ import print_function
@@ -10,7 +12,7 @@
from optparse import OptionParser
from cStringIO import StringIO
+from svgui.pyjs import pyjs --- a/svgui/svgui.py Mon Oct 09 16:04:39 2017 +0300
+++ b/svgui/svgui.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,11 +23,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import -from pyjs import translate
+from svgui.pyjs import translate import util.paths as paths
from POULibrary import POULibrary
--- a/tests/tools/check_source.sh Mon Oct 09 16:04:39 2017 +0300
+++ b/tests/tools/check_source.sh Mon Oct 09 18:13:26 2017 +0300
@@ -222,8 +222,7 @@
enable=$enable,W0611 # (unused-import) Unused import X
enable=$enable,C1001 # (old-style-class) Old-style class defined. Problem with PyJS
enable=$enable,W0102 # (dangerous-default-value) Dangerous default value {} as argument
- # enable=$enable,W0403 # relative import
+ enable=$enable,W0403 # (relative-import) Relative import 'Y', should be 'X.Y' --- a/util/misc.py Mon Oct 09 16:04:39 2017 +0300
+++ b/util/misc.py Mon Oct 09 18:13:26 2017 +0300
@@ -26,8 +26,13 @@
+from __future__ import absolute_import +from util.BitmapLibrary import AddBitmapFolder +from util.TranslationCatalogs import AddCatalog """ Helper func to check path write permission """
@@ -53,9 +58,6 @@
def InstallLocalRessources(CWD):
- from BitmapLibrary import AddBitmapFolder
- from TranslationCatalogs import AddCatalog
AddBitmapFolder(os.path.join(CWD, "images"))
--- a/wxglade_hmi/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/wxglade_hmi/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -22,4 +22,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from wxglade_hmi import *
+from __future__ import absolute_import +from wxglade_hmi.wxglade_hmi import * --- a/xmlclass/__init__.py Mon Oct 09 16:04:39 2017 +0300
+++ b/xmlclass/__init__.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,6 +23,14 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from xmlclass import ClassFactory, GenerateParser, DefaultElementClass, GetAttributeValue, time_model, CreateNode, NodeSetAttr, NodeRenameAttr
-from xsdschema import XSDClassFactory, GenerateParserFromXSD, GenerateParserFromXSDstring
+from __future__ import absolute_import +from xmlclass.xmlclass import \ +from xmlclass.xsdschema import XSDClassFactory, GenerateParserFromXSD, GenerateParserFromXSDstring --- a/xmlclass/xsdschema.py Mon Oct 09 16:04:39 2017 +0300
+++ b/xmlclass/xsdschema.py Mon Oct 09 18:13:26 2017 +0300
@@ -23,6 +23,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from __future__ import absolute_import from __future__ import print_function
@@ -30,7 +31,7 @@
from xml.dom import minidom
+from xmlclass.xmlclass import * def GenerateDictFacets(facets):