Python Web框架 karrigell

jopen 12年前
     <p>karrigell,一个支持用python开发web程序的框架,说的再明白一些,就是一个可以解释python脚本的web服务器.如果你用 python写了一个网页,直接点击浏览肯定出错,因为虽然你的机器上装了python运行环境,但这个环境并不是特别为web开发设计.但是如果你再在 机器上装一个karrigell,那在去浏览这个网页,大事可成.</p>    <p>代码示例:</p>    <table border="1">     <tbody>      <tr>       <td>Python script</td>       <td>Karrigell service</td>      </tr>      <tr>       <td class="code" valign="top"><pre>print "<h1>Squares</h1>" for i in range(10):     print "%s :<b>%s</b>" %(i,i*i)</pre></td>       <td class="code"><pre>def index():     print "<h1>Squares</h1>"     for i in range(10):         print "%s :<b>%s</b>" %(i,i*i)</pre></td>      </tr>      <tr>       <td>HTML Inside Python</td>       <td>Python Inside HTML</td>      </tr>      <tr>       <td class="code" valign="top"><pre>"<h1>Squares</h1>" for i in range(10):     "%s :<b>%s</b>" %(i,i*i)</pre></td>       <td class="code"><pre><h1>Squares</h1> <% for i in range(10):     print "%s :<b>%s</b>" %(i,i*i) %></pre></td>      </tr>     </tbody>    </table>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1324471974405" target="_blank">http://www.open-open.com/lib/view/home/1324471974405</a></p>