for tests svgui and logging move code from old py_ext.xml to the new pyfile.xml
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 19 Jan 2017 13:56:09 +0300
changeset 1639 1953c268a194
parent 1638 3f86e9768f14
child 1641 24168e52fc2b
child 1642 ce9fc57e1828
child 1911 c1298e7ffe3a
for tests svgui and logging move code from old py_ext.xml to the new pyfile.xml
tests/logging/py_ext_0@py_ext/py_ext.xml
tests/logging/py_ext_0@py_ext/pyfile.xml
tests/svgui/svgui@svgui/py_ext.xml
--- a/tests/logging/py_ext_0@py_ext/py_ext.xml	Tue Jan 17 16:34:24 2017 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<Python xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="py_ext_xsd.xsd">
-<![CDATA[import threading, time
-
-MyT = None
-Stop = False
-
-def StartLog():
-    global MyT
-    MyT=threading.Thread(target = DoLog)
-    MyT.start()
-
-def DoLog():
-    global Stop
-    while not Stop:
-        PLCObject.LogMessage("Python side Logging (PLC is %s)"%PLCObject.PLCStatus)
-        time.sleep(0.3)
-
-def StopLog():
-    global MyT,Stop
-    Stop=True
-
-_runtime_init.append(StartLog)
-_runtime_cleanup.append(StopLog)
-]]>
-</Python>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/logging/py_ext_0@py_ext/pyfile.xml	Thu Jan 19 13:56:09 2017 +0300
@@ -0,0 +1,41 @@
+<?xml version='1.0' encoding='utf-8'?>
+<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <variables/>
+  <globals>
+    <xhtml:p><![CDATA[import threading, time
+
+MyT = None
+Stop = False
+
+def StartLog():
+    global MyT
+    MyT=threading.Thread(target = DoLog)
+    MyT.start()
+
+def DoLog():
+    global Stop
+    while not Stop:
+        PLCObject.LogMessage("Python side Logging (PLC is %s)"%PLCObject.PLCStatus)
+        time.sleep(0.3)
+
+def StopLog():
+    global MyT,Stop
+    Stop=True
+
+_runtime_init.append(StartLog)
+_runtime_cleanup.append(StopLog)
+]]></xhtml:p>
+  </globals>
+  <init>
+    <xhtml:p><![CDATA[]]></xhtml:p>
+  </init>
+  <cleanup>
+    <xhtml:p><![CDATA[]]></xhtml:p>
+  </cleanup>
+  <start>
+    <xhtml:p><![CDATA[]]></xhtml:p>
+  </start>
+  <stop>
+    <xhtml:p><![CDATA[]]></xhtml:p>
+  </stop>
+</PyFile>
--- a/tests/svgui/svgui@svgui/py_ext.xml	Tue Jan 17 16:34:24 2017 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<Python xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="python_xsd.xsd">
-<![CDATA[]]>
-</Python>