Skip to content
Snippets Groups Projects
Commit 7634d960 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

Clean up code

parent 5aa3ace7
No related branches found
No related tags found
No related merge requests found
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
import sys import sys
import time import time
import logging import logging
from opcua import Client
from opcua import ua
host = "localhost" host = "localhost"
port = 62000 port = 62000
sys.path.insert(0, "..")
Temp_only = True Temp_only = True
try: try:
...@@ -22,9 +23,6 @@ except ImportError: ...@@ -22,9 +23,6 @@ except ImportError:
shell = code.InteractiveConsole(vars) shell = code.InteractiveConsole(vars)
shell.interact() shell.interact()
from opcua import Client
from opcua import ua
def datachange_notification(self, node, val, data): def datachange_notification(self, node, val, data):
print("Python: New data change event", node, val) print("Python: New data change event", node, val)
......
...@@ -8,14 +8,11 @@ ...@@ -8,14 +8,11 @@
import sys import sys
import time import time
import logging import logging
from opcua import Client
host = "localhost" host = "localhost"
port = 62000 port = 62000
sys.path.insert(0, "..")
from opcua import Client
if __name__ == "__main__": if __name__ == "__main__":
logging.basicConfig(level=logging.WARNING) #INFO ERROR WARNING NOTSET DEBUG logging.basicConfig(level=logging.WARNING) #INFO ERROR WARNING NOTSET DEBUG
......
...@@ -5,13 +5,12 @@ import sys ...@@ -5,13 +5,12 @@ import sys
import time import time
import datetime import datetime
import logging import logging
from opcua import Client
from opcua import ua
host = "localhost" host = "localhost"
port = 62000 port = 62000
sys.path.insert(0, "..")
try: try:
from IPython import embed from IPython import embed
except ImportError: except ImportError:
...@@ -23,8 +22,6 @@ except ImportError: ...@@ -23,8 +22,6 @@ except ImportError:
shell = code.InteractiveConsole(vars) shell = code.InteractiveConsole(vars)
shell.interact() shell.interact()
from opcua import Client
from opcua import ua
class SubHandler(object): class SubHandler(object):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment