From abfb6acef6716c5b7cf2a07e4c470da82605e611 Mon Sep 17 00:00:00 2001
From: Mathieu Doucet <doucetm@ornl.gov>
Date: Wed, 21 Jul 2010 19:48:59 +0000
Subject: [PATCH] Example python code that should work within MantidPlot. Re
 #1415

---
 Code/Mantid/PythonAPI/scripts/TestClass.py    | 14 ++++++++++++++
 Code/Mantid/PythonAPI/scripts/execute_test.py |  9 +++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 Code/Mantid/PythonAPI/scripts/TestClass.py
 create mode 100644 Code/Mantid/PythonAPI/scripts/execute_test.py

diff --git a/Code/Mantid/PythonAPI/scripts/TestClass.py b/Code/Mantid/PythonAPI/scripts/TestClass.py
new file mode 100644
index 00000000000..4fb5478bf9c
--- /dev/null
+++ b/Code/Mantid/PythonAPI/scripts/TestClass.py
@@ -0,0 +1,14 @@
+"""
+    TestClass
+"""
+class TestClass:
+    CLASS_DATA_MEMBER = 1
+    
+if __name__ == "__main__":
+    if TestClass.CLASS_DATA_MEMBER==1:
+        print "SUCCESS"
+    else: 
+        print "Complete failure"
+        
+        
+        
\ No newline at end of file
diff --git a/Code/Mantid/PythonAPI/scripts/execute_test.py b/Code/Mantid/PythonAPI/scripts/execute_test.py
new file mode 100644
index 00000000000..985d219f79c
--- /dev/null
+++ b/Code/Mantid/PythonAPI/scripts/execute_test.py
@@ -0,0 +1,9 @@
+"""
+    When run within Mantiplot, this script should print SUCCESS
+"""
+from TestClass import *
+
+if TestClass.CLASS_DATA_MEMBER==1:
+    print "SUCCESS"
+else: 
+    print "Complete failure"
-- 
GitLab