[mod_python3, ESL py3mod] Add Python3 support.

This commit is contained in:
Andrey Volk
2021-09-26 13:23:46 +03:00
parent 3a66eb415f
commit e44fd2ea38
35 changed files with 20248 additions and 13 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env python
import SocketServer
from ESL import *
class ESLRequestHandler(SocketServer.BaseRequestHandler ):
def setup(self):
print self.client_address, 'connected!'
fd = self.request.fileno()
print fd
con = ESLconnection(fd)
print "Connected: "
print con.connected()
if con.connected():
info = con.getInfo()
uuid = info.getHeader("unique-id")
print uuid
con.execute("answer", "", uuid)
con.execute("playback", "/ram/swimp.raw", uuid);
#server host is a tuple ('host', port)
server = SocketServer.ThreadingTCPServer(('', 8040), ESLRequestHandler)
server.serve_forever()