aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util/miscutil.py
blob: 3fc95a6f1aeccc50fb5ef92b3a711948e7b6726a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python

#
# Licence statement goes here
#

def read_templatefile(temp_filename): 
  f = open(temp_filename, 'r')
  lines = f.read().splitlines()
  f.close()
  return lines

def write_templatefile(temp_filename, template_lines):    
  f = open(temp_filename, 'w')
  for item in template_lines:
      print>>f, item
  f.close()