# coding=UTF-8
# -*- coding: UTF-8 -*-
#various configuration for html rendering
# good stuff http://furius.ca/pubcode/
import codecs

def getftext(fname):
    f = open ( fname, 'r' )
    text = f.read()
    f.close()
    return text

def putftext(fname, text):
    f = open ( fname, 'w' )
    rez = f.write(text)
    f.close()
    return rez
    
def putftextU(fname, text):
    f2 = codecs.open (fname, encoding='utf-8', mode='w' )
    rez = f2.write(text);
    f2.close()
    return rez
    
def fileExists(f):
    try: file = open(f)
    except IOError: exists = False
    else: exists = True
    return exists
def file_exists(f): return fileExists(f);
    
def _(str):
    return  str;   
    ## TODO: endof functions
