本文介绍了基于Web的Python报表工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在寻找基于模板的python报表工具。它有能力将b / b
提供给屏幕,打印机或PDF格式,

HTML,XLS,CSV和XML文件。


谢谢,


Madhu Alagu

Hi

I am looking template based report tools for python.It has the ability
to deliver rich content onto the screen, to the printer or into PDF,
HTML, XLS, CSV and XML files.

Thanks,

Madhu Alagu

推荐答案



我不知道是否有_single_工具可以做你想要的所有

(可能就是这样我不知道有一个),但是有很多

工具可以各自做一部分。这里有一些,顶部是

我的头 - 谷歌搜索应该可以让你获得更多的每个类别。


对于模板 - 猎豹,其他人。


对于PDF - ReportLab。 PDFLib也有Python绑定,但它支付了商业用途的商品用途,IIRC。


是其他人。


对于XLS / CSV - CSV输出很容易滚动你自己。然后

将CSV导入Excel。如果这还不够好(根据你的需要,它可能不是
,因为它需要手动(好吧,有可能

来实现自动化)这也是使用COM)将CSV导入Excel。

Google用于生成直接XLS的Python库。


对于XML - 就像CSV一样,简单XML,可以由您编写(它只是从您的代码输出XML标签,属性和内容)。

可能是编码等问题 - 其中case使用lib.Python

有很多XML库 - 做一些研究。

David Mertz和Uche Ogbuji等人写了很多
$关于Python和XML的b $ b文章,其中许多是关于审阅和比较各种库,如ElementTree,Gnosis XML实用程序和

其他文章。许多文章和其他文章在IBM developerWorks和

XML.com上。


Vasudev Ram




I don''t know if there''s a _single_ tool that can do all you want
(there may be, just that I don''t know of one), but there are many
tools that can each do some part of it. Here are some, off the top of
my head - Googling should get you more for each category.

For templating - Cheetah, others.

For PDF - ReportLab. PDFLib has Python bindings too, but its paid for
commercial use, IIRC.

For HTML - Python standard library itself has some stuff, there must
be others.

For XLS/CSV - CSV output is easy enough to "roll your own". Then
import the CSV into Excel. If this isn''t good enough (and it may not
be, depending on your needs, as it requires manual (ok, it is possible
to sort of automate that too using COM) import of the CSV into Excel.
Google for a Python lib for direct XLS generation.

For XML - like CSV, for simple XML, can be written by you (its just
outputting XML tags, attributes and content from your code). There
might be issues with encodings, etc. - in which case use a lib. Python
has many XML libs - do some research.
David Mertz and Uche Ogbuji, among others, have written a lot of
articles on Python and XML, many of them are about reviewing and
comparing various libs like ElementTree, Gnosis XML utilities and
others. Many of those and other articles are on IBM developerWorks and
XML.com.

Vasudev Ram
http://www.dancingbison.com
http://jugad.livejournal.com
http://sourceforge.net/projects/xtopdf




我不认为这是用Python实现的,因为它很漂亮

无聊的事情,以及像JasperReports(在Java中)和Crystal

报告已经让市场相当紧密。我的公司

做的是通过我们设置的网络服务使用JasperReports。

I don''t think this has been implemented in Python because it''s a pretty
boring thing to do, and things like JasperReports (in Java) and Crystal
Reports already have the market pretty well tied up. What my company
did was to use JasperReports via a web service we set up.




正如其他人提到的,我不相信以上所有内容都是在一个包中实现的。
。但是,Python绝对可以处理以上格式的所有




对于HTML模板,我强烈推荐Clearsilver:
它是用C语言编写的(以及其他语言)

包装,速度非常快,也是可扩展的。


对于PDF:

ReportLab -

-


对于XSLT:

4Suite,libxml -


对于CSV和XML:

c sv模块,libxml,lxml,ElemenTree模块

-Jay

As others have mentioned, I don''t believe that all of the above is implemented
in a single package. However, Python can most definitely deal with all of the
above formats.

For HTML templating I can highly recommend Clearsilver:
http://www.clearsilver.net/ it''s written in C with Python (and other language)
wrappers, is very fast and is also extensible.

For PDF:
ReportLab - http://www.reportlab.org/downloads.html
- http://www.ibm.com/developerworks/li...tml?loc=dwmain

For XSLT:
4Suite, libxml - http://uche.ogbuji.net/tech/akara/no...01/python-xslt

For CSV and XML:
csv module, libxml, lxml, ElemenTree modules

-Jay


这篇关于基于Web的Python报表工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 11:44