'Returns a ".po" file constructed from given strings'

def write_po(self, data):

    from subprocess import call
    from tempfile import NamedTemporaryFile
    from gluon.contenttype import contenttype
    f = NamedTemporaryFile(delete=False)
    csvfilename = ('%s.csv' % f.name)
    self.write_csv(csvfilename, data)
    g = NamedTemporaryFile(delete=False)
    pofilename = ('%s.po' % g.name)
    call(['csv2po', '-i', csvfilename, '-o', pofilename], shell=True)
    h = open(pofilename, 'r')
    filename = 'trans.po'
    disposition = ('attachment;    filename="%s"' % filename)
    response = current.response
    response.headers['Content-Type'] = contenttype('.po')
    response.headers['Content-disposition'] = disposition
    h.seek(0)
    return h.read()
