<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Well yes and no:-) This sort of application would fall under the sprawling category of CGI, yes, and I can use Python scripts on my web server, so it is supported. But nearly every tutorial I have seen regarding Python and CGI only have to do with form submissions, doing calculations and other things with data sent from webpages to Python scripts. But that is not really what I want to do. I am wondering what a script would need to do to take requests for pages on my site, and generate them from templates. I am not sure if I can do this without having access to Apache rewrite rules, etc.<br><br>Perhaps this is just another area of CGI that I missed and have not seen tutorials on. If it is and you have seen some, please
 share!<br><br>-Sam<br><br>________________<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Ian Witham &lt;witham.ian@gmail.com&gt;<br>To: wormwood_3 &lt;wormwood_3@yahoo.com&gt;<br>Cc: Python Tutorlist &lt;tutor@python.org&gt;<br>Sent: Sunday, September 30, 2007 11:52:38 PM<br>Subject: Re: [Tutor] Really basic web templating<br><br><br><br><div><span class="gmail_quote">On 10/1/07, <b class="gmail_sendername">wormwood_3</b> &lt;<a rel="nofollow" target="_blank" href="mailto:wormwood_3@yahoo.com">wormwood_3@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br><br>I am trying to think of a way to make this happen, but it may not be at all possible:-) I would like to use Python to generate pages on demand for my website. By this I mean, when someone hits <a rel="nofollow" target="_blank" href="http://www.mysite.com/pagex.html">
www.mysite.com/pagex.html</a>, I want to generate the page pagex.html via a Python script.<br><br>I have a script setup that can generate a page from a template file and a file with the body and title of the page in particular I want to generate. Now from this, I need to somehow be able to respond to requests, and then generate the page based on the page requested. I want to do this because my site is on a shared hosting account, so I cannot install a web framework like Django, and the site's pages will be rather simple. At the same time, I would like to use templating, so I do not have repeated identical code between the pages.
<br><br>Any ideas on this?</blockquote><div><br>It sounds like you want to use CGI. I think virtually all web servers support it and there are a ton of CGI tutorials on the web<br><br>Ian.<br></div></div>
</div><br></div></div></body></html>