写得很好的开源Python应用程序 [英] Well written open source Python apps

查看:55
本文介绍了写得很好的开源Python应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人可以建议一个特别好的开源项目?
编写的Python?我特别期待人们将b $ b描述为非常Python-ic的代码。 (并没有尝试开始任何形式的战争 -

只是想要一个写得很好的Python应用程序的好例子。)


谢谢!

-Ben


PS - 对不起,如果之前已经详细讨论了这个问题,我在发布之前搜索了这个小组,但是没想出我想要的东西

for。< Ben / =

解决方案

2005年10月13日星期四09:43,Ben写道:

有人建议开源吗特别是编写好Python的项目?我特别期待人们将其描述为非常Python-ic的代码。 (并没有尝试开始任何类型的战争 - 只是想要一个写得很好的Python应用程序的好例子来阅读。)




Python标准库。成千上万的相当不错的Python

代码。它可能不会使用所有最新功能,并且可能会有一些黑暗的角落在这里和那里,但它仍然是坚实的。并且很容易理解(我理解和修改没有困难)

httplib)。


- Michael


10月13日,Ben写道:

有人能建议一个特别好的编写Python的开源项目吗?我特别期待人们将其描述为非常Python-ic的代码。 (不要试图开始任何形式的战争 -
只是想要一个很好的例子来编写一个编写良好的Python应用程序。)




Python包索引( PyPI,或cheeseshop)

< http://www.python.org/pypi>指向很多可能主要是pythonic的包裹。


我不知道这是否更准确地说明了某处,但是这里

是我的pythonic发行版的概念:


*将模块分组到包中,所有都是有凝聚力的,松散地

耦合,合理的长度


*大部分遵循PEP< http://www.python.org/peps/>惯例


*使用尽可能多的Python提供的模块避免重新发明任何轮子

尽可能


*嗯记录用户(联机帮助页或其他)和开发人员

(docstrings),但自我记录最少的内联评论


*使用distutils以便于分发


*包含标准信息文件,例如:

BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt


*包含标准目录结构,例如:

doc / tools /(或scripts /或bin /)packageX / packageY / test /


*干净的用户界面,易于使用,可能依赖于optparse或getopt


*有许多单元测试可以轻松运行,代码结构为

便于构建测试


我想到的第一个pythonic包的例子是

docutils< http://docutils.sourceforge .net />。


-

Micah Elliott

< md *@micah.elliott.name>


< blockquote>这是一篇讨论BitTorrent编码风格的文章。

http://www.onlamp.com/pub/a/python/2...ythonnews.html


也许这段代码值得一看。


Could anyone suggest an open source project that has particularly well
written Python? I am especially looking for code that people would
describe as "very Python-ic". (Not trying to start any kind of war -
just wanted some good examples of a well written Python app to read.)

Thanks!
-Ben

P.S. - Sorry if this has been discussed at length before - I searched
the group before I posted, but didn''t come up with what I was looking
for.

解决方案

On Thursday 13 October 2005 09:43, Ben wrote:

Could anyone suggest an open source project that has particularly
well written Python? I am especially looking for code that people
would describe as "very Python-ic". (Not trying to start any kind of
war - just wanted some good examples of a well written Python app to
read.)



The Python Standard Library. Thousands of lines of quite good Python
code. It might not use all the latest features, and there might be a
few dark corners here and there, but it''s still solid. And quite easy
to understand (I had no difficulty understanding and modifying
httplib).

- Michael


On Oct 13, Ben wrote:

Could anyone suggest an open source project that has particularly well
written Python? I am especially looking for code that people would
describe as "very Python-ic". (Not trying to start any kind of war -
just wanted some good examples of a well written Python app to read.)



The Python Package Index (PyPI, or cheeseshop)
<http://www.python.org/pypi> has pointers to a lot of packages that are
likely mostly pythonic.

I don''t know if this is spelled out more precisely somewhere, but here
is my notion of a pythonic distribution:

* Has modules grouped into packages, all are cohesive, loosely
coupled, and reasonable length

* Largely follows PEP <http://www.python.org/peps/> conventions

* Avoids reinventing any wheels by using as many Python-provided modules
as possible

* Well documented for users (manpages or other) and developers
(docstrings), yet self-documenting with minimal inline commenting

* Uses distutils for ease of distribution

* Contains standard informational files such as:
BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt

* Contains standard directory structure such as:
doc/ tools/ (or scripts/ or bin/) packageX/ packageY/ test/

* Clean UI, easy to use, probably relying on optparse or getopt

* Has many unit tests that are trivial to run, and code is structured to
facilitate building of tests

The first example of a pythonic package that comes to my mind is
docutils <http://docutils.sourceforge.net/>.

--
Micah Elliott
<md*@micah.elliott.name>


Here is an article discussing the coding style of BitTorrent.

http://www.onlamp.com/pub/a/python/2...ythonnews.html

Maybe that code is worth looking at.


这篇关于写得很好的开源Python应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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