code: def thconfig(txtfiles, cavename='cave'):
      
      fmts_model = ['lox', '3d', 'dxf', 'kml', 'plt', 'vrml']
      outfilename = 'thconfig'
  
      with open(outfilename, 'w') as outfile:
          for txtfilename in txtfiles:
              print >> outfile, 'source "%s"' % convert_filename(txtfilename)
          print >> outfile
  
          for fmt in fmts_model:
              print >> outfile, 'export model -output "%s"' % os.path.join('models', '%s.%s' % (cavename, fmt))
  
          print >> outfile, 'export map -projection plan -format esri -output "%s"' % os.path.join('models', 'gis')
  
          print 'Wrote Therion project file %s .' % outfilename
docs: Write `thconfig` file for the Therion project