从Python生成HTML的推荐方法 [英] recommended way of generating HTML from Python

查看:109
本文介绍了从Python生成HTML的推荐方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Python生成HTML的推荐方法是什么?我知道

HTMLGen和

食谱中的一些食谱,但是有什么比标准更多或更低的价值吗?

另外,是否计划在

标准库中包含一个用于生成HTML的模块?

我真的希望看到这方面的一些标准化。


米歇尔Simionato

解决方案
米歇尔Simionato napisa3的(a):

从Python生成HTML的推荐方法是什么?我知道
HTMLGen和Cookbook中的一些食谱,但有哪些更多或更少标准?
此外,是否有计划包含一个HTML模块在
标准库中生成?
我真的希望在这个领域看到一些标准化。




我不是有东西任何推荐的东西除了个人

建议。就个人而言,我喜欢Hamish Sanderson的HTML模板

http://freespace.virgin.net/hamish.s...template.html) ,但我可能会有偏见。 ;)


Hamish计划开始进程,这将导致将

HTMLTemplate包含在标准库中,但我不认为它会发生在

任何可预见的未来。


-

Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/


只是为了澄清,在人们开始指出他们的首选

模板语言之前:我不是要求

a模板系统。我在HTMLGen的

行中要求一些东西,你只使用纯Python。


Michele Simionato写道:

从Python生成HTML的推荐方法是什么?我知道
HTMLGen和Cookbook中的一些食谱,但有哪些更多或更少标准?


我也是一个htmlgen用户,但是它有点长,并且

安装不是很干净(预的distutils)。我一直在关注

替代品,这里是一个(我还没看过):


##### #

htmldata 1.0.6可用。

http://oregonstate.edu/~barnesc/htmldata/

htmldata模块允许用户翻译HTML

文件来回列出数据结构。

这样可以编程读取和写入HTML文档的
,具有很大的灵活性。


######


我可以发誓,我还看到另一封最近的电子邮件宣布了一个htmlgen

的替代方案,但没有谷歌搜索或挖掘的数量我的电子邮件可能会变成

了。我认为这是在过去一个月左右,可能在

python-announce列表中,但查看档案我无法找到它。也许

我的记忆在玩弄我。

另外,是否有计划在
标准库中包含一个用于生成HTML的模块?
我真的很想在这个领域看到一些标准化。




我也是。 HTMLgen模型非常漂亮和干净(至少对于我简单的
使用),但我会使用任何东西,只要它默认包含并支持。


干杯,


f


What is the recommended way of generating HTML from Python? I know of
HTMLGen and of
few recipes in the Cookbook, but is there something which is more or
less standard?
Also, are there plans to include a module for HTML generation in the
standard library?
I really would like to see some standardization in this area.

Michele Simionato

解决方案

Michele Simionato napisa3(a):

What is the recommended way of generating HTML from Python? I know of
HTMLGen and of
few recipes in the Cookbook, but is there something which is more or
less standard?
Also, are there plans to include a module for HTML generation in the
standard library?
I really would like to see some standardization in this area.



I don''t thing there is anything "recommended" except personal
recommendations. Personally, I like Hamish Sanderson''s HTMLTemplate
(http://freespace.virgin.net/hamish.s...template.html), but I
may be biased. ;)

Hamish planned to start process that would lead to inclusion of
HTMLTemplate to standard library, but I don''t think it''s gonna happen in
any foreseeable future.

--
Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/


Just to clarify, before people start pointing out their preferred
templating language: I am NOT asking for
a template system. I am asking for something on the
lines of HTMLGen, where you just use pure Python.


Michele Simionato wrote:

What is the recommended way of generating HTML from Python? I know of
HTMLGen and of
few recipes in the Cookbook, but is there something which is more or
less standard?
I''m also an htmlgen user, but it''s getting a bit long in the tooth, and the
installation is not very clean (pre-distutils). I keep an eye out for
alternatives, here''s one (which I haven''t looked at yet):

######
htmldata 1.0.6 is available.

http://oregonstate.edu/~barnesc/htmldata/

The htmldata module allows one to translate HTML
documents back and forth to list data structures.
This allows for programmatic reading and writing
of HTML documents, with much flexibility.

######

I could swear that I also saw another recent email announcing an htmlgen
alternative, but no amount of googling or digging through my email could turn
it up. I think it was in the last month or so, and probably on the
python-announce list, but looking through the archives I can''t find it. Maybe
my memory is playing tricks on me.
Also, are there plans to include a module for HTML generation in the
standard library?
I really would like to see some standardization in this area.



I would too. The HTMLgen model is quite nice and clean (at least for my simple
uses), but I''d use anything, as long as it''s included by default and supported.

Cheers,

f


这篇关于从Python生成HTML的推荐方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆