Loading ...
Sorry, an error occurred while loading the content.

2577[Cheetahtemplate-discuss] cheetah question,

Expand Messages
  • Vinodh Srinivasasainagendra
    Jun 9, 2004
    • 0 Attachment
      I am using Cheetah to automate the process of creating jobscripts from a
      template script and its corresponding placeholder values feed from a
      dictionary. In the following piece of code, instead of print template, i
      want to print it to a file.Does the template class take in a fileName as an
      argument to its method and writes the filled template into that file..my
      placeholder values change during every iteration, hence that way i can have
      a new script file generated at the end of every iteration. help ur help on
      this.

      thanks

      ****************************************************************************
      **********************
      import os,sys
      from Cheetah.Template import Template
      nameSpace= {'SInputFile': 'test',
      'SOutputFile': 'results_f ',}

      templateFile = 'jobscript'
      template = Template(file=templateFile,searchList=[nameSpace])
      print template

      ****************************************************************************
      **********************



      -------------------------------------------------------
      This SF.Net email is sponsored by: GNOME Foundation
      Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
      GNOME Users and Developers European Conference, 28-30th June in Norway
      http://2004/guadec.org
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Show all 2 messages in this topic