diff -r 2221e99d2f8f -r d0e6fc0701fb runtime/PLCObject.py --- a/runtime/PLCObject.py Wed Dec 24 00:02:12 2008 +0100 +++ b/runtime/PLCObject.py Tue Dec 30 22:43:48 2008 +0100 @@ -25,7 +25,6 @@ import Pyro.core as pyro from threading import Timer, Thread import ctypes, os, commands -import time if os.name in ("nt", "ce"): from _ctypes import LoadLibrary as dlopen @@ -170,11 +169,15 @@ return False def PythonThreadProc(self): + pyfile = os.path.join(self.workingdir, "runtime.py") + if os.path.exists(pyfile): + # TODO handle exceptions in runtime.py + execfile(pyfile) res = "" print "PythonThreadProc started" while self.PLCStatus == "Started": cmd = self._PythonIterator(res) - print "_PythonIterator(", res, ") -> ", cmd + #print "_PythonIterator(", res, ") -> ", cmd try : res = eval(cmd) except Exception,e: