title: Generate Python templates with parameters
body: <p>I have used JET with Eclipse before to generate Java files from models. I am new to Python and I am searching for a way to generate python modules automatically based on parameters (data) read from the user -for educational purposes. </p>
  
  <blockquote>
    <p>For example, a student will be guided to a webpage, where he/she enters the name of a project, select different control statements (ie.a while loop), enter a boolean expression, and the loop body, and hit generate. The webpage will generate a .py module for him/her that could be used for educational purposes. </p>
  </blockquote>
  
  <p>After research, I found many python generators out there, and I guess Jinja is one of the most popular ones. But I would like to know if I am going the right direction before making a decision. </p>
  
  <p>So my questions are as:</p>
  
  <ol>
  <li>What is the best python code generator that fits my project idea
  the most?</li>
  <li>Should I build the web interface of such a project
  using a Python platform, or something else like PHP?</li>
  </ol>