Python Light重新审视? [英] Python Light Revisted?

查看:58
本文介绍了Python Light重新审视?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这有点好笑,我之前发过一篇关于小型轻型蟒蛇的信息。

发行版。事情是,我在一个小时左右的时间内做到了,但令人惊讶的是,我得到了来自各地的回复请求支持如何做到这一点。说实话,我没有时间去研究它。我的观点是,对于一个轻量级的python应用程序来说,似乎很有兴趣,但是没有真正的

资源如何做到这一点?

目标,构建python(主要用于win32),以便整个安装是
可能小于5MB并且可能包含GUI库,可能是

TwistedMatrix ,可能只是解压缩一个档案,比如像Eclipse这样的应用程序。


所以,我的问题,是否有人这样做与我的相似?我可以

告诉你我是怎么做到的,但它太快了,我没想到

我包含的库。


那里有迷你linux,我建议迷你蟒蛇。


为什么?例如,我不需要XML-RPC库或zip库,或者其他库需要


http://newspiritcompany.com/blog/art...-2mb-for -win32


-

来自亚特兰大的Ramza
http://www.newspiritcompany.com

解决方案

Ramza Brown写道:< blockquote class =post_quotes>这有点好笑,我之前发过一篇关于小型轻型蟒蛇发行版的文章。问题是,我在一个小时左右的时间内做到了,但令人惊讶的是,我收到了来自各地的回复,要求对如何做到这一点提供支持。说实话,我没有时间去研究它。我的观点,对于一个轻量级的python应用程序似乎很感兴趣,但没有真正的资源如何做到这一点?

目标,构建python(主要是对于win32)这样整个安装可能不到5MB,并且可能包含一个GUI库,可能是TwistedMatrix,可能只是解压缩像Eclipse这样的应用程序这样的存档。 />
所以,我的问题,是否有人这样做与我的相似?我可以告诉你我是怎么做到的,但它太快了,我没想到
我包含了哪些库。

那里有迷你linux,我建议迷你蟒蛇。

为什么?例如,我不需要XML-RPC库或zip库,或者其他库。

http://newspiritcompany.com/blog/art...-2mb-for-win32



或者,也许这很容易,它甚至不值得一提。我发现

很难,我还没有完全测试过。


-

来自亚特兰大的Ramza /> http://www.newspiritcompany.com


我部分同意你的意见,部分不同意。


我没有看到让发行量变小的意义。来自python.org的安装程序为10MB for

,ActiveState .exe安装程序为16MB。

如何是5MB轻量级而10MB不是吗? java.com上的Windows XP版Java / b $ b是16+ MB,.NET框架是,我不知道

有多大,但是我怀疑它远不到10MB。


另外我认为如果没有

标准库的分发是一个可怕的想法对于任意应用程序,分配是针对

开发的。 (如果你只想要一个特定的应用程序使用精简版的Python,请使用py2exe - 我认为它只包括

,无论你为程序运行导入的是什么。)并且不包括拉链

包括Twisted?我不明白。另外,你怎么知道

Twisted不导入XML-RPC?我可以看到一个放大的Python,

包括Twisted以及标准库,实际上

ActiveState'包含win32内容。还有另一个这样的大型发行版,其名称目前让我失望。

但是从标准库中删除zip以便你可以节省20kb似乎

愚蠢。 (同样,除非是针对一个特定的应用程序,其中

案例py2exe应该可以做到这一点,虽然我可能错了,因为我从来没用过它。)


现在,我同意的是一个Python,可以从一个文件夹运行

,而无需在系统上安装。这可能有很多

的好处,如果有pythonpath的细节和任何可以分类

out。例如,我还没有升级到2.4,因为我在WinXP上安装了20个不同的软件包(例如,SOAPpy,ZODB等),

其中许多需要我当我安装
时选择我的2.3安装。如果我在2.4的ActiveState安装程序中运行

,我不知道会发生什么。我似乎甚至记得读过那个

我必须在安装2.4之前卸载2.3。我不想

重新安装这20个包。无论如何我没有时间研究它

它并没有按下,即使我想开始尝试装饰器

和生成器表达式。


Steve M写道:

我部分同意你并且部分不同意。

我没有看到让分销更小的意义。来自python.org的安装程序为10MB,ActiveState .exe安装程序为16MB。
是如何5MB轻量级的而10MB不是吗? Java.com上的Windows XP版本在java.com上是16+ MB,.NET框架是,我不知道它有多大,但我怀疑它是不是很少如果分发是针对任意应用程序开发的,那么我认为分发没有
标准库的部分是一个糟糕的主意。 (如果你只是想要一个特定应用程序的精简版Python,请使用py2exe - 我认为它只包括
为您的程序运行的任何内容。)并且不包括zip
同时包括Twisted ?我不明白。另外,你怎么知道
Twisted不导入XML-RPC?我可以看到一个放大的Python,其中包括Twisted和标准库,实际上
ActiveState'包含win32的东西。还有另一个这样的大型发行版,其名称目前让我失望。
但是从标准库中删除zip以便节省20kb似乎是愚蠢的。 (同样,除非是针对一个特定的应用程序,其中案例py2exe应该可以解决这个问题,虽然我可能错了,因为我从未使用过它。)

现在,我同意的是一个可以从文件夹运行的Python,而无需在系统上安装。这可能有很多好处,如果pythonpath的细节和任何可以分类
。例如,我还没有升级到2.4,因为我在WinXP上安装了20个不同的软件包(例如SOAPpy,ZODB等),
其中许多要求我选择我的2.3安装时/>安装它们。如果我运行2.4的ActiveState安装程序,我不知道会发生什么。我似乎甚至记得读过那个
我必须在安装2.4之前卸载2.3。我不想重新安装这20个包。无论如何我没有时间研究它
它并没有按,即使我想开始尝试装饰器
和生成器表达。




我看到了你的担忧。但是,我在谈论,例如我的Python目录中有70MB的b $ b。我不记得下载的大小。我知道可以减少
。 5MB完全解压缩。另外,如果python

设置足够轻,那么有一个完整的环境,远离''main''
90MB环境,一个不操作注册表设置和诸如此类的东西。


-

来自亚特兰大的Ramza
http://www.newspiritcompany.com


This is kind of funny, I posted earlier about a small, light python
distro. The thing is, I did it in an hour or so, but amazingly, I got
responses from everywhere asking for support on how to do this. To be
honest, I don''t have the time to investigate it more. My point, there
seems to be a lot of interest for a lightweight python app, but no real
resources on how to do it?

The goal, build python(mainly for win32) so that the ENTIRE install is
maybe less than 5MBs and includes possibly a GUI library, possibly
TwistedMatrix, possibly install from just unzipping an archive like
applications such as Eclipse.

So, my question, has anybody done this similar to what I did? I can
show you how I did it, but it was so quick, I didnt really think about
what libraries I included.

There are mini linuxes out there, I suggest mini pythons.

Why? For example, I don''t need an XML-RPC library, or zip library, or
the other libraries.

http://newspiritcompany.com/blog/art...-2mb-for-win32

--
Ramza from Atlanta
http://www.newspiritcompany.com

解决方案

Ramza Brown wrote:

This is kind of funny, I posted earlier about a small, light python
distro. The thing is, I did it in an hour or so, but amazingly, I got
responses from everywhere asking for support on how to do this. To be
honest, I don''t have the time to investigate it more. My point, there
seems to be a lot of interest for a lightweight python app, but no real
resources on how to do it?

The goal, build python(mainly for win32) so that the ENTIRE install is
maybe less than 5MBs and includes possibly a GUI library, possibly
TwistedMatrix, possibly install from just unzipping an archive like
applications such as Eclipse.

So, my question, has anybody done this similar to what I did? I can
show you how I did it, but it was so quick, I didnt really think about
what libraries I included.

There are mini linuxes out there, I suggest mini pythons.

Why? For example, I don''t need an XML-RPC library, or zip library, or
the other libraries.

http://newspiritcompany.com/blog/art...-2mb-for-win32


Or, maybe this is so easy, it doesnt deserve even mentioning. I found
it difficult and I still haven''t tested it fully.

--
Ramza from Atlanta
http://www.newspiritcompany.com


I agree with you in part and disagree in part.

I don''t see the point to making the distribution any smaller. 10MB for
the installer from python.org, 16MB for ActiveState .exe installer. How
is 5MB "lightweight" while 10MB isn''t? The Windows XP version of Java
at java.com is 16+ MB, and the .NET framework is, well, I don''t know
how big, but I doubt it''s much less than 10MB.

Also I think it''s a terrible idea to distribute without pieces of the
standard library if the distribution is meant to be developed against
for arbitrary applications. (If you just want a slimmed down Python for
one specific application, use py2exe - I think it only includes
whatever gets imported for your program to run.) And excluding zip
while including Twisted? I don''t get it. Besides, how do you know
Twisted doesn''t import XML-RPC? I could see an enlarged Python that
includes Twisted along with the standard library, and in fact
ActiveState''s includes win32 stuff. There''s another such
mega-distribution around, the name of which escapes me at the moment.
But removing zip from the standard library so you can save 20kb seems
foolish. (Again, unless it is for one specific application, in which
case py2exe should do the trick, although I could be wrong about that
since I''ve never used it.)

Now, what I do agree with is a Python that can be run from a folder
without having to be installed on the system. That could have lots of
benefits, if the details with pythonpath and whatever could be sorted
out. For example I haven''t upgraded to 2.4 yet because I have 20
different packages (e.g. SOAPpy, ZODB, whatever) installed on WinXP,
many of which required me selecting my 2.3 installation when I
installed them. I have no idea what will happen to all those if I run
the ActiveState installer for 2.4. I seem even to remember reading that
I have to un-install 2.3 before installing 2.4. I don''t want to
re-install those 20 packages. Anyway I haven''t had time to research it
and it isn''t pressing, even though I''d like to start trying decorators
and generator expressions.


Steve M wrote:

I agree with you in part and disagree in part.

I don''t see the point to making the distribution any smaller. 10MB for
the installer from python.org, 16MB for ActiveState .exe installer. How
is 5MB "lightweight" while 10MB isn''t? The Windows XP version of Java
at java.com is 16+ MB, and the .NET framework is, well, I don''t know
how big, but I doubt it''s much less than 10MB.

Also I think it''s a terrible idea to distribute without pieces of the
standard library if the distribution is meant to be developed against
for arbitrary applications. (If you just want a slimmed down Python for
one specific application, use py2exe - I think it only includes
whatever gets imported for your program to run.) And excluding zip
while including Twisted? I don''t get it. Besides, how do you know
Twisted doesn''t import XML-RPC? I could see an enlarged Python that
includes Twisted along with the standard library, and in fact
ActiveState''s includes win32 stuff. There''s another such
mega-distribution around, the name of which escapes me at the moment.
But removing zip from the standard library so you can save 20kb seems
foolish. (Again, unless it is for one specific application, in which
case py2exe should do the trick, although I could be wrong about that
since I''ve never used it.)

Now, what I do agree with is a Python that can be run from a folder
without having to be installed on the system. That could have lots of
benefits, if the details with pythonpath and whatever could be sorted
out. For example I haven''t upgraded to 2.4 yet because I have 20
different packages (e.g. SOAPpy, ZODB, whatever) installed on WinXP,
many of which required me selecting my 2.3 installation when I
installed them. I have no idea what will happen to all those if I run
the ActiveState installer for 2.4. I seem even to remember reading that
I have to un-install 2.3 before installing 2.4. I don''t want to
re-install those 20 packages. Anyway I haven''t had time to research it
and it isn''t pressing, even though I''d like to start trying decorators
and generator expressions.



I see your concern. But, I am talking about, for example I have 70MB in
my Python directory. I don''t remember what the download size was. I
know that can be reduced. 5MB completely unzipped. Plus, If the python
setup is light enough, have a complete environment away from the ''main''
90MB environment, one that doesnt manipulate registry settings and whatnot.

--
Ramza from Atlanta
http://www.newspiritcompany.com


这篇关于Python Light重新审视?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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