python和html结合,将Python代码与HTML集成的最佳方法

This is the first time I've tried to integrate Python and HTML. I have mod_python installed on my Apache server, and I'm wondering if there's a specific way I should run a script, or if I should (can I?) put the code directly in the HTML.

What are the best ways of using Python through HTML?

解决方案

The best way is to set up a web framework that uses Python. Some good choices are Django, TurboGears, and Pyramid. While it is possible to do pure Python CGI or as an ISAPI extension, you don't really gain much from that approach, and a web framework is bound to be more efficient, understandable, and helpful.

Furthermore, web frameworks come with a philosophy and contain a lot of careful thought and best practices that you can learn from while you're working.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值