runtime/PLCObject.py
changeset 398 31d08063b5d6
parent 393 af20e07e53c5
parent 391 9b1801ef99b5
child 400 2c786431fe72
equal deleted inserted replaced
397:6a7ff66a811d 398:31d08063b5d6
   185         self.python_threads_vars["_runtime_begin"] = []
   185         self.python_threads_vars["_runtime_begin"] = []
   186         self.python_threads_vars["_runtime_cleanup"] = []
   186         self.python_threads_vars["_runtime_cleanup"] = []
   187         
   187         
   188         for filename in os.listdir(self.workingdir):
   188         for filename in os.listdir(self.workingdir):
   189             name, ext = os.path.splitext(filename)
   189             name, ext = os.path.splitext(filename)
   190             if name.startswith("runtime") and ext == ".py":
   190             if name.upper().startswith("RUNTIME") and ext.upper() == ".PY":
   191                 try:
   191                 try:
   192                     # TODO handle exceptions in runtime.py
   192                     # TODO handle exceptions in runtime.py
   193                     # pyfile may redefine _runtime_cleanup
   193                     # pyfile may redefine _runtime_cleanup
   194                     # or even call _PythonThreadProc itself.
   194                     # or even call _PythonThreadProc itself.
   195                     execfile(os.path.join(self.workingdir, filename), self.python_threads_vars)
   195                     execfile(os.path.join(self.workingdir, filename), self.python_threads_vars)