# HG changeset patch # User Andrey Skvortsov <andrej.skvortzov@gmail.com> # Date 1538232753 -10800 # Node ID af050469fc5c358c57114b7d2baaa26ebf12cb13 # Parent 87eb184414bdabafc4e89f6291f0ebefd7da0301 clean etherlab: pylint, W1618 # (no-absolute-import) import missing `from __future__ import absolute_import` diff -r 87eb184414bd -r af050469fc5c etherlab/CommonEtherCATFunction.py --- a/etherlab/CommonEtherCATFunction.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/CommonEtherCATFunction.py Sat Sep 29 17:52:33 2018 +0300 @@ -8,6 +8,7 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import import wx mailbox_protocols = ["AoE", "EoE", "CoE", "FoE", "SoE", "VoE"] diff -r 87eb184414bd -r af050469fc5c etherlab/ConfigEditor.py --- a/etherlab/ConfigEditor.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/ConfigEditor.py Sat Sep 29 17:52:33 2018 +0300 @@ -9,6 +9,7 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import import os import re from types import TupleType @@ -26,7 +27,7 @@ from util.TranslationCatalogs import NoTranslate # ----------------------------------------------------------------------- -from EtherCATManagementEditor import EtherCATManagementTreebook, MasterStatePanelClass +from etherlab.EtherCATManagementEditor import EtherCATManagementTreebook, MasterStatePanelClass # ----------------------------------------------------------------------- [ETHERCAT_VENDOR, ETHERCAT_GROUP, ETHERCAT_DEVICE] = range(3) diff -r 87eb184414bd -r af050469fc5c etherlab/EtherCATManagementEditor.py --- a/etherlab/EtherCATManagementEditor.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/EtherCATManagementEditor.py Sat Sep 29 17:52:33 2018 +0300 @@ -7,6 +7,7 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import import os import string from xml.dom import minidom diff -r 87eb184414bd -r af050469fc5c etherlab/EthercatCFileGenerator.py --- a/etherlab/EthercatCFileGenerator.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/EthercatCFileGenerator.py Sat Sep 29 17:52:33 2018 +0300 @@ -9,9 +9,10 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import import os -from EthercatSlave import ExtractHexDecValue, DATATYPECONVERSION, ExtractName +from etherlab.EthercatSlave import ExtractHexDecValue, DATATYPECONVERSION, ExtractName SLAVE_PDOS_CONFIGURATION_DECLARATION = """ /* Slave %(slave)d, "%(device_type)s" diff -r 87eb184414bd -r af050469fc5c etherlab/EthercatCIA402Slave.py --- a/etherlab/EthercatCIA402Slave.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/EthercatCIA402Slave.py Sat Sep 29 17:52:33 2018 +0300 @@ -9,6 +9,7 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import import os import wx @@ -16,8 +17,8 @@ from PLCControler import LOCATION_CONFNODE, LOCATION_VAR_INPUT from MotionLibrary import Headers, AxisXSD -from EthercatSlave import _EthercatSlaveCTN, _CommonSlave -from ConfigEditor import CIA402NodeEditor +from etherlab.EthercatSlave import _EthercatSlaveCTN, _CommonSlave +from etherlab.ConfigEditor import CIA402NodeEditor # Definition of node variables that have to be mapped in PDO # [(name, index, subindex, type, diff -r 87eb184414bd -r af050469fc5c etherlab/EthercatMaster.py --- a/etherlab/EthercatMaster.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/EthercatMaster.py Sat Sep 29 17:52:33 2018 +0300 @@ -9,6 +9,7 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import import os from copy import deepcopy from lxml import etree @@ -23,12 +24,18 @@ from IDEFrame import TITLE, FILEMENU, PROJECTTREE from POULibrary import POULibrary -from ConfigEditor import MasterEditor -from EthercatCFileGenerator import _EthercatCFileGenerator -from EthercatSlave import _EthercatSlaveCTN, ExtractHexDecValue, GenerateHexDecValue, TYPECONVERSION, VARCLASSCONVERSION, _CommonSlave +from etherlab.ConfigEditor import MasterEditor +from etherlab.EthercatCFileGenerator import _EthercatCFileGenerator +from etherlab.EthercatSlave import \ + _EthercatSlaveCTN, \ + ExtractHexDecValue, \ + GenerateHexDecValue, \ + TYPECONVERSION, \ + VARCLASSCONVERSION, \ + _CommonSlave try: - from EthercatCIA402Slave import _EthercatCIA402SlaveCTN + from etherlab.EthercatCIA402Slave import _EthercatCIA402SlaveCTN HAS_MCL = True except Exception: HAS_MCL = False diff -r 87eb184414bd -r af050469fc5c etherlab/EthercatSlave.py --- a/etherlab/EthercatSlave.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/EthercatSlave.py Sat Sep 29 17:52:33 2018 +0300 @@ -9,13 +9,15 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import + from PLCControler import LOCATION_CONFNODE, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY from ConfigTreeNode import ConfigTreeNode -from ConfigEditor import NodeEditor +from etherlab.ConfigEditor import NodeEditor # ------------------------------------------ -from CommonEtherCATFunction import _CommonSlave +from etherlab.CommonEtherCATFunction import _CommonSlave # ------------------------------------------ diff -r 87eb184414bd -r af050469fc5c etherlab/etherlab.py --- a/etherlab/etherlab.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/etherlab.py Sat Sep 29 17:52:33 2018 +0300 @@ -9,6 +9,7 @@ # # See COPYING file for copyrights details. +from __future__ import absolute_import import os import shutil import csv @@ -20,9 +21,9 @@ from ConfigTreeNode import XSDSchemaErrorMessage -from EthercatSlave import ExtractHexDecValue, ExtractName -from EthercatMaster import _EthercatCTN -from ConfigEditor import LibraryEditor, ETHERCAT_VENDOR, ETHERCAT_GROUP, ETHERCAT_DEVICE +from etherlab.EthercatSlave import ExtractHexDecValue, ExtractName +from etherlab.EthercatMaster import _EthercatCTN +from etherlab.ConfigEditor import LibraryEditor, ETHERCAT_VENDOR, ETHERCAT_GROUP, ETHERCAT_DEVICE ScriptDirectory = os.path.split(os.path.realpath(__file__))[0] diff -r 87eb184414bd -r af050469fc5c etherlab/runtime_etherlab.py --- a/etherlab/runtime_etherlab.py Sat Sep 29 17:39:21 2018 +0300 +++ b/etherlab/runtime_etherlab.py Sat Sep 29 17:52:33 2018 +0300 @@ -1,3 +1,4 @@ +from __future__ import absolute_import import os import signal import subprocess