fixed plcopen imports python3
authorGP Orcullo <kinsamanka@gmail.com>
Fri, 28 Oct 2022 13:06:52 +0800
branchpython3
changeset 3751 a80a66ba52d6
parent 3750 f62625418bff
child 3752 9f6f46dbe3ae
fixed plcopen imports
plcopen/BlockInstanceCollector.py
plcopen/InstanceTagnameCollector.py
plcopen/InstancesPathCollector.py
plcopen/POUVariablesCollector.py
plcopen/VariableInfoCollector.py
plcopen/XSLTModelQuery.py
plcopen/__init__.py
plcopen/structures.py
--- a/plcopen/BlockInstanceCollector.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/BlockInstanceCollector.py	Fri Oct 28 13:06:52 2022 +0800
@@ -5,7 +5,7 @@
 
 
 from collections import OrderedDict, namedtuple
-from plcopen.XSLTModelQuery import XSLTModelQuery, _StringValue, _BoolValue, _translate_args
+from . XSLTModelQuery import XSLTModelQuery, _StringValue, _BoolValue, _translate_args
 
 # -------------------------------------------------------------------------------
 #           Helpers object for generating pou block instances list
--- a/plcopen/InstanceTagnameCollector.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/InstanceTagnameCollector.py	Fri Oct 28 13:06:52 2022 +0800
@@ -4,8 +4,8 @@
 # See COPYING file for copyrights details.
 
 
-from plcopen.XSLTModelQuery import XSLTModelQuery
-from plcopen.types_enums import *
+from . XSLTModelQuery import XSLTModelQuery
+from . types_enums import *
 
 
 class InstanceTagName(object):
--- a/plcopen/InstancesPathCollector.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/InstancesPathCollector.py	Fri Oct 28 13:06:52 2022 +0800
@@ -4,7 +4,7 @@
 # See COPYING file for copyrights details.
 
 
-from plcopen.XSLTModelQuery import XSLTModelQuery
+from . XSLTModelQuery import XSLTModelQuery
 
 
 class InstancesPathCollector(XSLTModelQuery):
--- a/plcopen/POUVariablesCollector.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/POUVariablesCollector.py	Fri Oct 28 13:06:52 2022 +0800
@@ -4,8 +4,8 @@
 # See COPYING file for copyrights details.
 
 
-from plcopen.XSLTModelQuery import XSLTModelQuery, _StringValue, _BoolValue, _translate_args
-from plcopen.types_enums import CLASS_TYPES, POU_TYPES, VAR_CLASS_INFOS
+from . XSLTModelQuery import XSLTModelQuery, _StringValue, _BoolValue, _translate_args
+from . types_enums import CLASS_TYPES, POU_TYPES, VAR_CLASS_INFOS
 
 
 def class_extraction(value):
--- a/plcopen/VariableInfoCollector.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/VariableInfoCollector.py	Fri Oct 28 13:06:52 2022 +0800
@@ -4,7 +4,7 @@
 # See COPYING file for copyrights details.
 
 
-from plcopen.XSLTModelQuery import XSLTModelQuery, _StringValue, _BoolValue, _translate_args
+from . XSLTModelQuery import XSLTModelQuery, _StringValue, _BoolValue, _translate_args
 
 # -------------------------------------------------------------------------------
 #                 Helpers object for generating pou var list
--- a/plcopen/XSLTModelQuery.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/XSLTModelQuery.py	Fri Oct 28 13:06:52 2022 +0800
@@ -7,7 +7,7 @@
 import os
 from lxml import etree
 import util.paths as paths
-from plcopen.structures import StdBlckLibs
+from . structures import StdBlckLibs
 from XSLTransform import XSLTransform
 
 ScriptDirectory = paths.AbsDir(__file__)
--- a/plcopen/__init__.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/__init__.py	Fri Oct 28 13:06:52 2022 +0800
@@ -27,6 +27,6 @@
 # plcopen module dynamically creates its classes
 
 
-from plcopen.plcopen import \
+from . plcopen import \
     PLCOpenParser, LoadProject, SaveProject, LoadPou, \
     LoadPouInstances, VarOrder, QualifierList, rect
--- a/plcopen/structures.py	Fri Oct 28 12:39:15 2022 +0800
+++ b/plcopen/structures.py	Fri Oct 28 13:06:52 2022 +0800
@@ -28,8 +28,8 @@
 from collections import OrderedDict
 from functools import reduce
 
-from plcopen.plcopen import LoadProject
-from plcopen.definitions import *
+from . plcopen import LoadProject
+from . definitions import *
 
 TypeHierarchy = dict(TypeHierarchy_list)