#!/usr/bin/python from xmlrpclib import ServerProxy s = ServerProxy("http://localhost:8080", allow_none=True) fd = s.khep_open("/dev/rfcomm0", 0) s.khep_cmd_setled(fd, 0, 2) print s.khep_cmd_ambient_sensors(fd) s.khep_close(fd)