Exemple #1
0
    continue
  else:
    value = arg
  print name,value
  if (name == '--client'):
    clientname = value
  if (name == '--show'):
    datafile = value
  name = None
    

def gtk_main():
  gtk.gdk.threads_enter()
  gtk.main()
  gtk.gdk.threads_leave()

gtk.gdk.threads_init()

t=Thread (target=gtk_main)
t.start()

print clientname

lb = lightboard(clientname)
lb.load_libraries(libraries)
if (datafile is not None):
  lb.load_show(datafile)
lb.run()


Exemple #2
0
        name = arg
        continue
    else:
        value = arg
    print name, value
    if (name == '--client'):
        clientname = value
    if (name == '--show'):
        datafile = value
    name = None


def gtk_main():
    gtk.gdk.threads_enter()
    gtk.main()
    gtk.gdk.threads_leave()


gtk.gdk.threads_init()

t = Thread(target=gtk_main)
t.start()

print clientname

lb = lightboard(clientname)
lb.load_libraries(libraries)
if (datafile is not None):
    lb.load_show(datafile)
lb.run()
Exemple #3
0
from threading import *
import xmlrpclib
from lightboard import lightboard, LBRequestHandler
import SocketServer
import socket

lb = lightboard('')
print 'a'
class MyServer(SocketServer.TCPServer):
    def server_bind(self):
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        apply(SocketServer.TCPServer.server_bind, (self,))
print 'b'
server = MyServer(('', 8001), LBRequestHandler)
print 'c'
t=Thread (target=server.serve_forever)
print 'd'
t.start()
print 'e'

def print_foo(self, args):
    print 'foo'

print 'add'

host = xmlrpclib.Server("http://localhost:8000/")
host.add_signal(['Instrument Set Attribute', 'http://localhost:8001/'])

print 'add2'

lb.add_signal('Instrument Set Attribute', print_foo)