Skip to content

Instantly share code, notes, and snippets.

@saihtaM
saihtaM / tv_grab_url-setup.py
Last active August 7, 2024 07:39
TVHeadend tv_grab_url - with automatic setup script for Linux Newbies.
#!/usr/bin/env python
# coding=utf-8
import os
import sys,stat
import urllib2
installto = "/usr/bin/tv_grab_url"
def replace_line(file_name, line_num, text):
#Stolen from http://stackoverflow.com/questions/4719438/editing-specific-line-in-text-file-in-python