#!/usr/bin/python

#from mantid.simpleapi import *
#import jsonArray
import neonIO
#import time
#from Queue import Queue
#import sys
import numpy as np
#from canvas import *
#import cStringIO
#import configure
#from PyQt4 import QtGui

if __name__ == '__main__':
    #myapp=QtGui.QApplication(sys.argv)
    # ======Try to connect NEON server
    ip="10.1.53.240"
    port=9000
    _neon=neonIO.connectNeon(ip, port, 10.0)
    r=_neon.getServer()
    #monitorList=["monitor01", "monitor02", "monitor03"]
    monitorList=["monitor01"]

    myThreads=[]
    #for name in monitorList:
    #    myThreads.append(neonIO.monitorDataGet(r, 20, name)) 
    myThreads.append(neonIO.moduleDataGet(r, 2))
    for t in myThreads:
        t.start() 
        print t, " start!"
    for t in myThreads:
        t.join()
    #sys.exit(myapp.exec_())
