Esempio n. 1
0
	def __init__(self, *args):
		self._PluginInterface__pdb_mode = False
		self.kbmap_get = KEYBOARD_MAP.get
		notifier.descriptor_watch(sys.stdin.fileno(), self.handle)
		atexit.register(self.cleanup)
		stdin_read = sys.stdin.read
		def self.read():
			return stdin_read(1)
Esempio n. 2
0
	def __init__(self, post_key):
		try:
			self.lircd = socket(AF_UNIX, SOCK_STREAM)
			self.lircd.connect('/dev/lircd')
		except:
			log.error("Can't load lirc plugin")
			del self.lircd
		else:
			notifier.descriptor_watch(self.lircd.fileno(), self.handle)
			self.kbmap_get = DIRECTFB_MAP.get
			self.post_key = post_key
Esempio n. 3
0
	def __init__(self, *args):
		threading.Thread.__init__(self)
		log.debug('Preparing joystick plugin...')
		self.setDaemon(True)
		self.setName('JoystickPlugin')
		self.dev = open('/dev/input/js0')
		self.pos = [0, 0]
		self.max_val = 32768
		self.button = events.BUTTON0.post
		self.mouse = events.MOUSE.post
		self.start_pos = None
		descriptor_watch(self.dev.fileno(), self.handle)
		return None
Esempio n. 4
0
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[threading.Thread.__init__(self)
log.debug('Preparing joystick plugin...')
self.setDaemon(True)
self.setName('JoystickPlugin')
self.dev = open('/dev/input/js0')
self.pos = [0, 0]
self.max_val = 32768
self.button = events.BUTTON0.post
self.mouse = events.MOUSE.post
self.start_pos = None
descriptor_watch(self.dev.fileno(), self.handle)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0x8faceec>}
nname: 0
n 0(None)[return int(100 + (val - self.max_val) * 0.00152587890625)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0x8fac6ec>}
nname: 409
n 409(None)[return None
Esempio n. 5
0
import peewee.notifier as notifier
from peewee.debug import log
from Queue import Full
from pygui.input import DIRECTFB_MAP
from socket import socket, AF_UNIX, SOCK_STREAM
class PluginInterface(object):
	__doc__ = '\n    Plugin for stdin control.\n    '
	def __init__(self, post_key):
		try:
			self.lircd = socket(AF_UNIX, SOCK_STREAM)
			self.lircd.connect('/dev/lircd')
		except:
			log.error("Can't load lirc plugin")
			del self.lircd
		else:
			notifier.descriptor_watch(self.lircd.fileno(), self.handle)
			self.kbmap_get = DIRECTFB_MAP.get
			self.post_key = post_key

	def handle(self):
		try:
			code, rep, keycode, garbage = self.lircd.recv(512).split(None, 3)
			rep = int(rep, 16)
			if 0 < rep:
				pass
			else:
				rep



]:
Esempio n. 6
0
nname: 0
n 0(None)[from __future__ import absolute_import
import atexit
import peewee.notifier as notifier
import sys
import termios
from Queue import Full
from pygui.input import KEYBOARD_MAP
import pdb
orig_pdb_set_trace = pdb.set_trace
class PluginInterface(object):
	__doc__ = '\n    Plugin for stdin control.\n    '
	def __init__(self, *args):
		self._PluginInterface__pdb_mode = False
		self.kbmap_get = KEYBOARD_MAP.get
		notifier.descriptor_watch(sys.stdin.fileno(), self.handle)
		atexit.register(self.cleanup)
		stdin_read = sys.stdin.read
		def self.read():
			return stdin_read(1)

		self.init_term()
		def pdb_set_trace(*args, **args):
			self._PluginInterface__pdb_mode = True
			self.cleanup()
			orig_pdb_set_trace(*args, **kw)
			self.init_term()
			self._PluginInterface__pdb_mode = False

		pdb.set_trace = pdb_set_trace