def from_file(filepath, delimiter='', blanklines=False):
 data = []
 try:
  with open(filepath, 'r') as f:
   for line in f:
    if (blanklines and (line.strip('\n\r ') == '')):
     continue
    data.append(line)
 except IOError:
  raise IOError('Error opening or reading file: {}'.format(filepath))
 return Base64(Join(delimiter, data))

def from_file ( filepath , delimiter = '' , blanklines = False ) : data = [ ] try : with open ( filepath , 'r' ) as f : for line in f : if ( blanklines and ( line . strip ( '\n\r ' ) == '' ) ) : continue data . append ( line ) except IOError : raise IOError ( 'Error opening or reading file: {}' . format ( filepath ) ) return Base64 ( Join ( delimiter , data ) )
imports userdata from a file .