Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: python: linuxdvb wrapper, small gtk tv viewer (url)



Danny Milosavljevic wrote:
> 
> On
> http://ifurita.kicks-ass.net/zapy.tar.gz
> I put my small python program used to watch tv.

I get (Python 2.3.3):

zapy/linuxdvb/linux_ioctl.py:20: FutureWarning: x<<y losing bits or changing sign will return a long in Python 2.4 and up
  v = (d << 30) | (l << 16) | ( typo << 8) | (nr)

And later:

Traceback (most recent call last):
  File "./zapy.py", line 854, in ?
    tb = TuneBox()
  File "./zapy.py", line 846, in __init__
    self.fillAuto()
  File "./zapy.py", line 732, in fillAuto
    for line in file("/home/dannym/.szap/channels.conf", "r").readlines():
IOError: [Errno 2] No such file or directory: '/home/dannym/.szap/channels.conf'

Solved like so:

--- zapy.orig/zapy.py	2004-01-25 20:17:15.000000000 +0100
+++ zapy/zapy.py	2004-01-27 13:32:06.000000000 +0100
@@ -729,7 +729,7 @@ class TuneBox(gtk.VBox):
 		#pms.append(pm)
 
 		try:
-			for line in file("/home/dannym/.szap/channels.conf", "r").readlines():
+			for line in file(os.path.expanduser("~/.szap/channels.conf"), "r").readlines():
 				line = string.strip(line)
 				if line.startswith("#"): continue
 				if line == "": continue


And then lots of:
(zapy.py:11058): Gtk-WARNING **: Invalid input string

But basically it works ;-)


Johannes


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index