source: ipk/source.sh4/swapepg_crossepg/var/swap/extensions/CrossEPG/crossepglib.py@ 13478

Last change on this file since 13478 was 12090, checked in by madie, 15 years ago

[ipk] update crossepg

File size: 18.6 KB
Line 
1from enigma import *
2from crossepg_locale import _
3from Tools.Directories import crawlDirectory, pathExists, createDir
4from types import *
5
6import sys, traceback
7import os
8import re
9import time
10import new
11import _enigma
12
13# return value
14# -1 none
15# 0 simple epgcache.load() patch
16# 1 edg nemesis patch
17# 2 oudeis patch
18# 3 crossepg v2.1 patch
19def getEPGPatchType():
20 try:
21 xepgpatch = new.instancemethod(_enigma.eEPGCache_crossepgImportEPGv21,None,eEPGCache)
22 return 3
23 except Exception, e:
24 pass
25
26 try:
27 epgpatch = new.instancemethod(_enigma.eEPGCache_load,None,eEPGCache)
28 return 0
29 except Exception, e:
30 pass
31
32 try:
33 edgpatch = new.instancemethod(_enigma.eEPGCache_reloadEpg,None,eEPGCache)
34 return 1
35 except Exception, e:
36 pass
37
38 try:
39 oudeispatch = new.instancemethod(_enigma.eEPGCache_importEvent,None,eEPGCache)
40 return 2
41 except Exception, e:
42 pass
43
44 return -1
45
46class CrossEPG_Config:
47 providers = [ ]
48 db_root = "/hdd/crossepg"
49 lamedb = "lamedb"
50 home_directory = ""
51
52 force_load_on_boot = 0
53 download_daily_enabled = 0
54 download_daily_hours = 4
55 download_daily_minutes = 0
56 download_daily_reboot = 1
57 download_tune_enabled = 0
58 download_standby_enabled = 0
59 download_manual_reboot = 0
60 csv_import_enabled = 0
61 show_plugin = 1
62 show_extension = 1
63 show_force_reload_as_plugin = 0
64 last_partial_download_timestamp = 0
65 last_full_download_timestamp = 0
66 configured = 0
67
68 def __init__(self):
69 if pathExists("/usr/crossepg"):
70 self.home_directory = "/usr/crossepg"
71 elif pathExists("/var/crossepg"):
72 self.home_directory = "/var/crossepg"
73 else:
74 print "[CrossEPG_Config] ERROR!! CrossEPG binaries non found"
75
76 def load(self):
77 try:
78 f = open("%s/crossepg.config" % (self.home_directory), "r")
79 except Exception, e:
80 #print "[CrossEPG_Config] %s" % (e)
81 return
82
83 commentRe = re.compile(r"#(.*)")
84 entryRe = re.compile(r"(.*)=(.*)")
85
86 for line in f.readlines():
87 try:
88 comment = re.findall(commentRe, line)
89 if not comment:
90 entry = re.findall(entryRe, line)
91 if entry:
92 key = entry[0][0].strip()
93 value = entry[0][1].strip()
94 if key == "db_root":
95 self.db_root = value
96 if key == "lamedb":
97 self.lamedb = value
98 elif key == "providers":
99 self.providers = []
100 tmp = value.split("|")
101 for p in tmp:
102 if len(p) > 0 and os.path.exists("%s/providers/%s.conf" % (self.home_directory, p)):
103 self.providers.append(p)
104 elif key == "force_load_on_boot":
105 self.force_load_on_boot = int(value);
106 elif key == "download_daily_enabled":
107 self.download_daily_enabled = int(value);
108 elif key == "download_daily_hours":
109 self.download_daily_hours = int(value);
110 elif key == "download_daily_minutes":
111 self.download_daily_minutes = int(value);
112 elif key == "download_tune_enabled":
113 self.download_tune_enabled = int(value);
114 elif key == "download_daily_reboot":
115 self.download_daily_reboot = int(value);
116 elif key == "download_manual_reboot":
117 self.download_manual_reboot = int(value);
118 elif key == "download_standby_enabled":
119 self.download_standby_enabled = int(value);
120 elif key == "last_partial_download_timestamp":
121 self.last_partial_download_timestamp = int(value);
122 elif key == "last_full_download_timestamp":
123 self.last_full_download_timestamp = int(value);
124 elif key == "csv_import_enabled":
125 self.csv_import_enabled = int(value);
126 elif key == "show_plugin":
127 self.show_plugin = int(value);
128 elif key == "show_extension":
129 self.show_extension = int(value);
130 elif key == "show_force_reload_as_plugin":
131 self.show_force_reload_as_plugin = int(value);
132 elif key == "configured":
133 self.configured = int(value);
134 except Exception:
135 pass
136
137 f.close()
138
139 def save(self):
140 try:
141 f = open("%s/crossepg.config" % (self.home_directory), "w")
142 except Exception, e:
143 print "[CrossEPG_Config] %s" % (e)
144 return
145
146 tmp = []
147 for p in self.providers:
148 if len(p) > 0:
149 tmp.append(p)
150 self.providers = tmp
151
152 f.write("db_root=%s\n" % (self.db_root))
153 f.write("lamedb=%s\n" % (self.lamedb))
154 f.write("providers=%s\n" % ("|".join(self.providers)))
155 f.write("force_load_on_boot=%d\n" % (self.force_load_on_boot))
156 f.write("download_daily_enabled=%d\n" % (self.download_daily_enabled))
157 f.write("download_daily_hours=%d\n" % (self.download_daily_hours))
158 f.write("download_daily_minutes=%d\n" % (self.download_daily_minutes))
159 f.write("download_daily_reboot=%d\n" % (self.download_daily_reboot))
160 f.write("download_tune_enabled=%d\n" % (self.download_tune_enabled))
161 f.write("download_manual_reboot=%d\n" % (self.download_manual_reboot))
162 f.write("download_standby_enabled=%d\n" % (self.download_standby_enabled))
163 f.write("last_full_download_timestamp=%d\n" % (self.last_full_download_timestamp))
164 f.write("last_partial_download_timestamp=%d\n" % (self.last_partial_download_timestamp))
165 f.write("csv_import_enabled=%d\n" % (self.csv_import_enabled))
166 f.write("show_plugin=%d\n" % (self.show_plugin))
167 f.write("show_extension=%d\n" % (self.show_extension))
168 f.write("show_force_reload_as_plugin=%d\n" % (self.show_force_reload_as_plugin))
169 f.write("configured=%d\n" % (self.configured))
170
171 f.close()
172
173 def getChannelProtocol(self, provider):
174 try:
175 f = open("%s/providers/%s.conf" % (self.home_directory, provider), "r")
176 except Exception, e:
177 print "[CrossEPG_Config] %s" % (e)
178 return
179
180 proto = re.compile(r"protocol=(.*)")
181 for line in f.readlines():
182 zproto = re.findall(proto, line)
183 if zproto:
184 f.close()
185 return zproto[0].strip()
186
187 f.close()
188 return ""
189
190 def getChannelID(self, provider):
191 try:
192 f = open("%s/providers/%s.conf" % (self.home_directory, provider), "r")
193 except Exception, e:
194 print "[CrossEPG_Config] %s" % (e)
195 return
196
197 nid = -1;
198 tsid = -1;
199 sid = -1;
200 namespace = -1;
201 nidRe = re.compile(r"nid=(.*)")
202 tsidRe = re.compile(r"tsid=(.*)")
203 sidRe = re.compile(r"sid=(.*)")
204 namespaceRe = re.compile(r"namespace=(.*)")
205
206 for line in f.readlines():
207 znid = re.findall(nidRe, line)
208 if znid:
209 nid = int(znid[0])
210 zsid = re.findall(sidRe, line)
211 if zsid:
212 sid = int(zsid[0])
213 ztsid = re.findall(tsidRe, line)
214 if ztsid:
215 tsid = int(ztsid[0])
216 znamespace = re.findall(namespaceRe, line)
217 if znamespace:
218 namespace = int(znamespace[0]);
219
220 if nid == -1 or sid == -1 or tsid == -1:
221 return
222
223 f.close()
224 return "1:0:1:%X:%X:%X:%X:0:0:0:" % (sid, tsid, nid, namespace)
225
226 def getAllProviders(self):
227 providers = list()
228 providersdesc = list()
229 providersproto = list()
230 cfiles = crawlDirectory("%s/providers/" % (self.home_directory), ".*\.conf$")
231 for cfile in cfiles:
232 providers.append(cfile[1].replace(".conf", ""))
233
234 providers.sort()
235
236 for provider in providers:
237 try:
238 descadded = False
239 protoadded = False
240 f = open("%s/providers/%s.conf" % (self.home_directory, provider), "r")
241 desc = re.compile(r"description=(.*)")
242 proto = re.compile(r"protocol=(.*)")
243 for line in f.readlines():
244 zdesc = re.findall(desc, line)
245 if zdesc:
246 providersdesc.append(zdesc[0].strip())
247 descadded = True
248
249 zproto = re.findall(proto, line)
250 if zproto:
251 providersproto.append(zproto[0].strip())
252 protoadded = True
253
254 if descadded and protoadded:
255 break
256
257 f.close()
258
259 if not descadded:
260 providersdesc.append(provider)
261
262 if not protoadded:
263 providersproto.append(None)
264
265 except Exception, e:
266 print "[CrossEPG_Config] %s" % (e)
267 providersdesc.append(provider)
268 providersproto.append(None)
269
270 ret = [providers, providersdesc, providersproto]
271 return ret
272
273 def getAllLamedbs(self):
274 lamedbs = list()
275 cfiles = crawlDirectory("/etc/enigma2/", "^lamedb.*")
276 for cfile in cfiles:
277 lamedbs.append(cfile[1])
278
279 return lamedbs
280
281 def isQBOXHD(self):
282 try:
283 ret = False
284 f = open("/proc/stb/info/model", "r")
285 model = f.read().strip()
286 if model == "qboxhd" or model == "qboxhd-mini":
287 ret = True
288 f.close()
289 return ret
290 except Exception, e:
291 return False
292
293 def deleteLog(self):
294 try:
295 os.unlink(self.db_root + "/crossepg.log")
296 except Exception, e:
297 print e
298
299class CrossEPG_Wrapper:
300 EVENT_READY = 0
301 EVENT_OK = 1
302 EVENT_START = 2
303 EVENT_END = 3
304 EVENT_QUIT = 4
305 EVENT_ERROR = 5
306 EVENT_ACTION = 6
307 EVENT_STATUS = 7
308 EVENT_PROGRESS = 8
309 EVENT_PROGRESSONOFF = 9
310 EVENT_CHANNEL = 10
311 EVENT_STARTTIME = 11
312 EVENT_LENGTH = 12
313 EVENT_NAME = 13
314 EVENT_DESCRIPTION = 14
315 EVENT_FILE = 15
316 EVENT_URL = 16
317
318 INFO_HEADERSDB_SIZE = 50
319 INFO_DESCRIPTORSDB_SIZE = 51
320 INFO_INDEXESDB_SIZE = 52
321 INFO_ALIASESDB_SIZE = 53
322 INFO_TOTAL_SIZE = 54
323 INFO_CHANNELS_COUNT = 55
324 INFO_EVENTS_COUNT = 56
325 INFO_HASHES_COUNT = 57
326 INFO_CREATION_TIME = 58
327 INFO_UPDATE_TIME = 59
328 INFO_VERSION = 60
329
330 CMD_DOWNLOADER = 0
331 CMD_CONVERTER = 1
332 CMD_INFO = 2
333 CMD_IMPORTER = 3
334
335 home_directory = ""
336
337 def __init__(self):
338 self.cmd = eConsoleAppContainer()
339 self.cache = None
340 self.callbackList = []
341 self.type = 0
342 self.maxSize = "0 byte"
343
344 versionlist = getEnigmaVersionString().split("-");
345
346 self.oldapi = False
347 try:
348 if len(versionlist) >= 3:
349 self.version = int(versionlist[0]+versionlist[1]+versionlist[2])
350 if self.version < 20100716:
351 self.oldapi = True
352 except Exception:
353 pass
354
355 config = CrossEPG_Config()
356 if config.isQBOXHD():
357 self.oldapi = True
358
359 if pathExists("/usr/crossepg"):
360 self.home_directory = "/usr/crossepg"
361 elif pathExists("/var/crossepg"):
362 self.home_directory = "/var/crossepg"
363 else:
364 print "[CrossEPG_Config] ERROR!! CrossEPG binaries non found"
365
366 def init(self, cmd, dbdir):
367 if not pathExists(dbdir):
368 if not createDir(dbdir):
369 dbdir = "/hdd/crossepg"
370
371 if cmd == self.CMD_DOWNLOADER:
372 x = "%s/crossepg_downloader -r -d %s" % (self.home_directory, dbdir)
373 elif cmd == self.CMD_CONVERTER:
374 x = "%s/crossepg_dbconverter -r -d %s" % (self.home_directory, dbdir)
375 elif cmd == self.CMD_INFO:
376 x = "%s/crossepg_dbinfo -r -d %s" % (self.home_directory, dbdir)
377 elif cmd == self.CMD_IMPORTER:
378 importdir = "%s/import/" % (dbdir)
379 x = "%s/crossepg_importer -r -i %s -d %s" % (self.home_directory, importdir, dbdir)
380 else:
381 print "[CrossEPG_Wrapper] unknow command on init"
382 return
383
384 print "[CrossEPG_Wrapper] executing %s" % (x)
385 self.cmd.appClosed.append(self.__cmdFinished)
386 self.cmd.dataAvail.append(self.__cmdData)
387 if self.cmd.execute(x):
388 self.cmdFinished(-1)
389
390 def __cmdFinished(self, retval):
391 self.__callCallbacks(self.EVENT_QUIT)
392 self.cmd.appClosed.remove(self.__cmdFinished)
393 self.cmd.dataAvail.remove(self.__cmdData)
394
395 def __cmdData(self, data):
396 if self.cache is None:
397 self.cache = data
398 else:
399 self.cache += data
400
401 if '\n' in data:
402 splitcache = self.cache.split('\n')
403 if self.cache[-1] == '\n':
404 iteration = splitcache
405 self.cache = None
406 else:
407 iteration = splitcache[:-1]
408 self.cache = splitcache[-1]
409 for mydata in iteration:
410 if mydata != '':
411 self.__parseLine(mydata)
412
413 def __parseLine(self, data):
414 if data.find("CHANNEL ") == 0:
415 self.__callCallbacks(self.EVENT_CHANNEL, data[7:])
416 elif data.find("STARTTIME ") == 0:
417 self.__callCallbacks(self.EVENT_STARTTIME, int(data[10:]))
418 elif data.find("LENGTH ") == 0:
419 self.__callCallbacks(self.EVENT_LENGTH, int(data[7:]))
420 elif data.find("NAME ") == 0:
421 self.__callCallbacks(self.EVENT_NAME, data[5:])
422 elif data.find("DESCRIPTION ") == 0:
423 self.__callCallbacks(self.EVENT_DESCRIPTION, data[12:].replace("\\n", "\n"))
424 elif data == "READY":
425 print "[CrossEPG_Wrapper] <- READY"
426 self.__callCallbacks(self.EVENT_READY, None)
427 elif data == "START":
428 print "[CrossEPG_Wrapper] <- START"
429 self.__callCallbacks(self.EVENT_START, None)
430 elif data == "END":
431 print "[CrossEPG_Wrapper] <- END"
432 self.__callCallbacks(self.EVENT_END, None)
433 elif data == "OK":
434 print "[CrossEPG_Wrapper] <- OK"
435 self.__callCallbacks(self.EVENT_OK, None)
436 elif data.find("ERROR ") == 0:
437 ttype = data[5:]
438 self.__callCallbacks(self.EVENT_ERROR, data[6:])
439 elif data.find("TYPE ") == 0:
440 ttype = data[5:]
441 print "[CrossEPG_Wrapper] <- TYPE %s" % (ttype)
442 if ttype == "READ CHANNELS":
443 self.type = 0;
444 self.__callCallbacks(self.EVENT_ACTION, _("Reading channels"))
445 elif ttype == "READ TITLES":
446 self.type = 1;
447 self.__callCallbacks(self.EVENT_ACTION, _("Reading titles"))
448 elif ttype == "PARSE TITLES":
449 self.type = 2;
450 self.__callCallbacks(self.EVENT_ACTION, _("Parsing titles"))
451 elif ttype == "READ SUMMARIES":
452 self.type = 3;
453 self.__callCallbacks(self.EVENT_ACTION, _("Reading summaries"))
454 elif ttype == "PARSE SUMMARIES":
455 self.type = 4;
456 self.__callCallbacks(self.EVENT_ACTION, _("Parsing summaries"))
457 elif ttype == "DOWNLOADING CHANNELS LIST":
458 self.type = 5;
459 self.__callCallbacks(self.EVENT_ACTION, _("Downloading channels list"))
460 elif ttype == "DEFLATING CHANNELS LIST":
461 self.type = 6;
462 self.__callCallbacks(self.EVENT_ACTION, _("Deflating channels list"))
463 elif ttype == "PARSING CHANNELS LIST":
464 self.type = 7;
465 self.__callCallbacks(self.EVENT_ACTION, _("Parsing channels list"))
466 elif ttype == "DOWNLOADING EVENTS":
467 self.type = 8;
468 self.__callCallbacks(self.EVENT_ACTION, _("Downloading events"))
469 elif ttype == "DEFLATING EVENTS":
470 self.type = 9;
471 self.__callCallbacks(self.EVENT_ACTION, _("Deflating events"))
472 elif ttype == "PARSING EVENTS":
473 self.type = 10;
474 self.__callCallbacks(self.EVENT_ACTION, _("Parsing events"))
475 elif ttype == "DOWNLOADING XEPGDB":
476 self.type = 11;
477 self.__callCallbacks(self.EVENT_ACTION, _("Downloading XEPGDB"))
478 elif ttype == "PARSING XEPGDB":
479 self.type = 12;
480 self.__callCallbacks(self.EVENT_ACTION, _("Merging XEPGDB"))
481 elif ttype == "DEFLATING XEPGDB":
482 self.type = 13;
483 self.__callCallbacks(self.EVENT_ACTION, _("Deflating XEPGDB"))
484 elif ttype == "RUNNING SCRIPT":
485 self.type = 14;
486 self.__callCallbacks(self.EVENT_ACTION, _("Running script"))
487 elif ttype.find("RUNNING CSCRIPT ") == 0:
488 self.type = 14;
489 self.__callCallbacks(self.EVENT_ACTION, _("Running script") + " " + data[21:])
490
491 elif data.find("CHANNELS ") == 0:
492 self.__callCallbacks(self.EVENT_STATUS, _("%s channels") % (data[9:]))
493 elif data.find("SIZE ") == 0:
494 if self.type == 1 or self.type == 3:
495 self.maxSize = data[5:]
496 self.__callCallbacks(self.EVENT_STATUS, _("Read %s") % (data[5:]))
497 else:
498 self.__callCallbacks(self.EVENT_STATUS, _("%s of %s") % (data[5:], self.maxSize))
499 elif data.find("PROGRESS ") == 0:
500 if data[9:] == "ON":
501 self.__callCallbacks(self.EVENT_PROGRESSONOFF, True)
502 elif data[9:] == "OFF":
503 self.__callCallbacks(self.EVENT_PROGRESSONOFF, False)
504 else:
505 self.__callCallbacks(self.EVENT_PROGRESS, int(data[9:]))
506 elif data.find("FILE ") == 0:
507 self.__callCallbacks(self.EVENT_FILE, data[5:])
508 elif data.find("URL ") == 0:
509 self.__callCallbacks(self.EVENT_URL, data[4:])
510 elif data.find("VERSION ") == 0:
511 self.__callCallbacks(self.INFO_VERSION, data[8:])
512 elif data.find("HEADERSDB_SIZE ") == 0:
513 self.__callCallbacks(self.INFO_HEADERSDB_SIZE, data[15:])
514 elif data.find("DESCRIPTORSDB_SIZE ") == 0:
515 self.__callCallbacks(self.INFO_DESCRIPTORSDB_SIZE, data[19:])
516 elif data.find("INDEXESDB_SIZE ") == 0:
517 self.__callCallbacks(self.INFO_INDEXESDB_SIZE, data[15:])
518 elif data.find("ALIASESDB_SIZE ") == 0:
519 self.__callCallbacks(self.INFO_ALIASESDB_SIZE, data[15:])
520 elif data.find("TOTAL_SIZE ") == 0:
521 self.__callCallbacks(self.INFO_TOTAL_SIZE, data[11:])
522 elif data.find("CHANNELS_COUNT ") == 0:
523 self.__callCallbacks(self.INFO_CHANNELS_COUNT, data[15:])
524 elif data.find("EVENTS_COUNT ") == 0:
525 self.__callCallbacks(self.INFO_EVENTS_COUNT, data[13:])
526 elif data.find("HASHES_COUNT ") == 0:
527 self.__callCallbacks(self.INFO_HASHES_COUNT, data[13:])
528 elif data.find("CREATION_TIME ") == 0:
529 self.__callCallbacks(self.INFO_CREATION_TIME, data[14:])
530 elif data.find("UPDATE_TIME ") == 0:
531 self.__callCallbacks(self.INFO_UPDATE_TIME, data[12:])
532 elif data.find("LOGTEXT ") == 0:
533 self.__callCallbacks(self.EVENT_STATUS, data[8:])
534
535 def __callCallbacks(self, event, param = None):
536 for callback in self.callbackList:
537 callback(event, param)
538
539 def addCallback(self, callback):
540 self.callbackList.append(callback)
541
542 def delCallback(self, callback):
543 self.callbackList.remove(callback)
544
545 def running(self):
546 return self.cmd.running()
547
548 def lamedb(self, value):
549 print "[CrossEPG_Wrapper] -> LAMEDB %s" % (value)
550 cmd = "LAMEDB %s\n" % (value)
551 if self.oldapi:
552 self.cmd.write(cmd, len(cmd))
553 else:
554 self.cmd.write(cmd)
555
556 def epgdat(self, value):
557 print "[CrossEPG_Wrapper] -> EPGDAT %s" % (value)
558 cmd = "EPGDAT %s\n" % (value)
559 if self.oldapi:
560 self.cmd.write(cmd, len(cmd))
561 else:
562 self.cmd.write(cmd)
563
564 def demuxer(self, value):
565 print "[CrossEPG_Wrapper] -> DEMUXER %s" % (value)
566 cmd = "DEMUXER %s\n" % (value)
567 if self.oldapi:
568 self.cmd.write(cmd, len(cmd))
569 else:
570 self.cmd.write(cmd)
571
572 def download(self, provider):
573 print "[CrossEPG_Wrapper] -> DOWNLOAD %s" % (provider)
574 cmd = "DOWNLOAD %s\n" % (provider)
575 if self.oldapi:
576 self.cmd.write(cmd, len(cmd))
577 else:
578 self.cmd.write(cmd)
579
580 def convert(self):
581 print "[CrossEPG_Wrapper] -> CONVERT"
582 self.__callCallbacks(self.EVENT_ACTION, _("Converting data"))
583 self.__callCallbacks(self.EVENT_STATUS, "")
584 if self.oldapi:
585 self.cmd.write("CONVERT\n", 8)
586 else:
587 self.cmd.write("CONVERT\n")
588
589 def importx(self):
590 print "[CrossEPG_Wrapper] -> IMPORT"
591 if self.oldapi:
592 self.cmd.write("IMPORT\n", 7)
593 else:
594 self.cmd.write("IMPORT\n")
595
596 def text(self):
597 print "[CrossEPG_Wrapper] -> TEXT"
598 self.__callCallbacks(self.EVENT_ACTION, _("Loading data"))
599 self.__callCallbacks(self.EVENT_STATUS, "")
600 if self.oldapi:
601 self.cmd.write("TEXT\n", 5)
602 else:
603 self.cmd.write("TEXT\n")
604
605 def stop(self):
606 print "[CrossEPG_Wrapper] -> STOP"
607 if self.oldapi:
608 self.cmd.write("STOP\n", 5)
609 else:
610 self.cmd.write("STOP\n")
611
612 def save(self):
613 print "[CrossEPG_Wrapper] -> SAVE"
614 self.__callCallbacks(self.EVENT_ACTION, _("Saving data"))
615 self.__callCallbacks(self.EVENT_STATUS, "")
616 if self.oldapi:
617 self.cmd.write("SAVE\n", 5)
618 else:
619 self.cmd.write("SAVE\n")
620
621 def wait(self):
622 print "[CrossEPG_Wrapper] -> WAIT"
623 if self.oldapi:
624 self.cmd.write("WAIT\n", 5)
625 else:
626 self.cmd.write("WAIT\n")
627
628 def quit(self):
629 print "[CrossEPG_Wrapper] -> QUIT"
630 if self.oldapi:
631 self.cmd.write("QUIT\n", 5)
632 else:
633 self.cmd.write("QUIT\n")
634
635 def open(self):
636 print "[CrossEPG_Wrapper] -> OPEN"
637 if self.oldapi:
638 self.cmd.write("OPEN\n", 5)
639 else:
640 self.cmd.write("OPEN\n")
641
642 def close(self):
643 print "[CrossEPG_Wrapper] -> CLOSE"
644 if self.oldapi:
645 self.cmd.write("CLOSE\n", 6)
646 else:
647 self.cmd.write("CLOSE\n")
Note: See TracBrowser for help on using the repository browser.