Esempio n. 1
0
File: sp.py Progetto: aabed/evnet
	def __init__(self, args):
		EventGen.__init__(self)

		self.buf = bytearray()
		self._writing = False
		self._closed = False
		self.retval = None
		try:
			self.p = subprocess.Popen(args, stdin=subprocess.PIPE,
				stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
		except Exception, e:
			self._closed = True
			self.retval = 3
			self._event('close', e)
Esempio n. 2
0
	def __init__(self, conn, addr, db):
		EventGen.__init__(self)
		self.conn = conn
		self.addr = addr
		self.db = db
		self.pubchans = set()
		self.subchans = set()
		self.idents = set()
		self.delay = False

		self.rand = struct.pack('<I', random.randint(2**31,2**32-1))
		self.fu = FeedUnpack()

		conn._on('read', self.io_in)
		conn._on('close', self.closed)

		self.sendinfo()
Esempio n. 3
0
    def __init__(self, conn, addr, db):
        EventGen.__init__(self)
        self.conn = conn
        self.addr = addr
        self.db = db
        self.pubchans = set()
        self.subchans = set()
        self.idents = set()
        self.delay = False

        self.rand = struct.pack('<I', random.randint(2**31, 2**32 - 1))
        self.fu = FeedUnpack()

        conn._on('read', self.io_in)
        conn._on('close', self.closed)

        self.sendinfo()
Esempio n. 4
0
File: sp.py Progetto: rep/evnet
    def __init__(self, args):
        EventGen.__init__(self)

        self.buf = bytearray()
        self._writing = False
        self._closed = False
        self.retval = None
        try:
            self.p = subprocess.Popen(args,
                                      stdin=subprocess.PIPE,
                                      stdout=subprocess.PIPE,
                                      stderr=subprocess.PIPE,
                                      shell=False)
        except Exception, e:
            self._closed = True
            self.retval = 3
            self._event('close', e)