sci / tech应用程序中的Python [英] Python in sci/tech applications

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

问题描述

我已经发现了Python并且最近一直在试用它作为可能的替换计算,通常可以使用像Matlab这样的商业软件包或者商品包。 IDL。我想提一些事情

我遇到的事情让我感到惊讶或者让我无法按照我想要的方式做事。来自。


1) - 那里有一个庞大而活跃的科幻/技术Python社区.-

这是一个惊喜。如果你看一下python.org网站

并点击首页后的几个级别,那么就可以简单地提及科学和数字应用程序 - - 但我不认为b $ b认为这对当前的活动水平和

成就是公平的。


2) - 那里有一套非常令人印象深刻的图书馆 -

NumPy,SciPy,Enthought。这些

图书馆的成熟程度真是令人惊叹,而且我还有多少想要解决这个问题。


3)-There Windows下的开发问题。

一个典型的任务是编写一个''纯python''原型来获取

''数据,数据输出' '问题的一部分理顺了,然后在C中写了一个

模块,以便在生产运行中获得足够的性能。但是我的雇主提供的C

编译器(当前版本的MSVS)

并不会生成与当前版本的Python一起使用的库。

哎呀。在现实世界中,这是一个大问题。我 - 爱你 - Python。并且

我想我可以说服其他人使用它。但是我必须有一个

的方式来轻松地生成编译模块,即没有安装

新操作系统。

I''ve discovered Python and have been trying it out lately as a possible
replacement for computations that would ordinarily be done with a
commercial package like Matlab or IDL. I''d like to mention a few things
I''ve run across that have either surprised me or kept me from doing
things the way I''d like to.

1) -There''s a large and active sci/tech Python community out there.-
This was something of a surprise. If you look at the python.org site
and click down a couple of levels past the front page, there''s a rather
brief mention of scientific and numeric applications-- but I don''t
think this does justice to the current levels of activity and
accomplishment.

2) -There''s a very impressive set of libraries out there-
NumPy, SciPy, Enthought. It''s really kind of stunning how mature these
libraries are and how much I had to poke around to figure that out.

3) -There''s a problem with development under Windows.
A typical task will entail writing a ''pure python'' prototype to get the
''data in, data out'' part of a problem straightened out, then writing a
module in C to get adequate performance in production runs. But the C
compiler that my employer provides (the current version of MSVS)
doesn''t produce libraries that work with the current version of Python.
Ooops. This, in the real world, is a big problem. I -love- Python. And
I think I could convince other people to use it. But I''ve got to have a
way to produce compiled modules painlessly, i.e., without installing a
new operating system.

推荐答案

mattf写道:
mattf wrote:

我想提一些我跑过的东西对此我要么让我感到惊讶,要么让我按照我想要的方式做事。


1) - 这是一个很大的活跃的sci / tech Python社区.-

这是一个惊喜。如果你看一下python.org网站

并点击首页后的几个级别,那么就可以简单地提及科学和数字应用程序 - - 但我不认为这对于当前的活动水平和

的成就是正确的。
I''d like to mention a few things I''ve run across that have either surprised me or kept me
from doing things the way I''d like to.

1) -There''s a large and active sci/tech Python community out there.-
This was something of a surprise. If you look at the python.org site
and click down a couple of levels past the front page, there''s a rather
brief mention of scientific and numeric applications-- but I don''t
think this does justice to the current levels of activity and
accomplishment.



如果你想深入了解Python的使用范围,

python.org并不是真正的提供它。当然,

NASA使用Python (适当的回应:穿着飞行服,

跳起来,打空气?)但是不是OLPC(每个孩子一台笔记本电脑:
http://www.laptop.org/ )值得一提,鉴于
$ b $的核心作用b设备中的Python可能会达到数百万?对于网站的

信用,科学和数字应用程序的链接确实产生了大量的信息,我想这很难关注网站在任何给定的团体认为最重要的事情上。


然而,我想你会发现python.org世界观可以

有点陌生,特别是如果你的主要兴趣不是Python

(语言)。以另一个域为例,如果你做桌面​​开发,那么对于这个网站上的图形用户界面编程的处理很可能会完全不同于

你会期望:Python被广泛用于各种桌面

环境中(并不是说你会从粗略中获得这种印象

python.org的检查),但是python.org(或comp.lang.python)

世界观大多排除了桌面之类的东西

你抽象离开而不是利用。


关于核心Pythoneers的主题。知道Python的'

成功:有多少人知道在OLPC设备中使用Python

之前Alan Kay在EuroPython中提到它?当你不知道它已被成功使用的地方时,很难推广Python


If you want an in-depth impression of how widely Python is used,
python.org is not really the place that manages to provide it. Sure,
"NASA uses Python" (appropriate response: dressed in a flight suit,
leap up and punch the air?) but isn''t OLPC (One Laptop per Child:
http://www.laptop.org/) worth a mention, given the central role of
Python in a device that will potentially reach millions? To the site''s
credit, the link to scientific and numeric applications does yield a
lot of information, and I suppose it''s hard to focus the site on any
one thing that any given group considers of utmost importance.

However, I think you''re going to find that the python.org worldview can
be somewhat alien, especially if your primary interest isn''t Python
(the language). To take another domain as an example, if you do desktop
development, the treatment of graphical user interface programming on
the site is quite possibly going to be completely disaligned with what
you''d expect: Python is used extensively in various desktop
environments (not that you''d get that impression from a cursory
examination of python.org), but the python.org (or comp.lang.python)
worldview mostly excludes such things as if the desktop is something
you abstract away rather than take advantage of.

And on the subject of how well "core Pythoneers" know of Python''s
successes: how many people knew that Python was used in the OLPC device
before Alan Kay mentioned it at EuroPython? It''s hard to promote Python
when you don''t know where it''s being successfully used already.


2 ) - 那里有一套令人印象深刻的图书馆 -

NumPy,SciPy,Enthought。令人惊讶的是,这些图书馆的成熟程度是多么成熟,以及我需要多少才能解决这个问题。
2) -There''s a very impressive set of libraries out there-
NumPy, SciPy, Enthought. It''s really kind of stunning how mature these
libraries are and how much I had to poke around to figure that out.



我猜很多人都会因为人们不愿意提供最好的图书馆的半官方指南,并且

对于最时尚的产品来说,最优惠的产品是最时尚的产品。我们中的一些人试图提供更好的有关Python库的信息,但这些细节仍然相对隐藏在python.org Wiki中:
http://wiki.python.org/moin/UsefulModules


关于python.org上的内容,我认为剩下的就是

确认某些资源永远不会返回

他们原有的活力,以及发布

内容的替代机制是必需的。例如,XML主题指南肯定没有在很长一段时间内看到许多更新,尽管维护的合理水平为
,但数据库主题指南可以肯定会更积极地通过汇总包装索引中的包装信息来维持



Paul

I guess a lot of the poking around comes about because people are
reluctant to provide any semi-official guide to the best libraries, and
that the most promotion occurs for the most fashionable products in the
most fashionable domains. Some of us have tried to provide better
information about libraries for Python, but such details remain
relatively hidden in the python.org Wiki:

http://wiki.python.org/moin/UsefulModules

With respect to content on python.org, I think all that remains is an
acknowledgement that certain resources are never going to return to
their original vitality, and that alternative mechanisms for publishing
content are required. For example, the XML topic guide surely hasn''t
seen many updates in a very long time, and despite a reasonable level
of maintenance, the database topic guide could surely be more actively
maintained by aggregating package information from the package index.

Paul

mattf:
mattf:

3) - Windows下的开发存在问题。
3) -There''s a problem with development under Windows.



使用MinGW编译Python并使用它创建扩展

是可能的。所以一些网站可以托管一个包含

MinGW和用它编译的Python的zip文件,所有这些文件都已准备好并设置好。一个人不多,然后b $ b专家可以在短时间内创建编译好的小扩展

而不会有太多的复杂性。 (或者也许D语言可以包装

而不是MinGW来做类似的事情.D可以是一个很好的用于Python的
语言)但是很可能PIL,scipy等必须再次为这种替代的官方或半官方Python编译

发布。


再见,

bearophile

It''s possibile to compile Python with MinGW, and to create extensions
with it. So some site can host a single zip file that contains both
MinGW and Python compiled with it, all ready and set. A person not much
expert can then create compiled small extensions in a short time
without too much complexities. (Or maybe the D language can be packed
into that, instead of MinGW, to do similar things. D can be a good
language used with Python) But then probably PIL, scipy, etc have to be
compiled again for such alternative official or semi-official Python
distribution.

Bye,
bearophile


是************ @ lycos.com 写道:

mattf:
mattf:

> 3) - Windows下的开发存在问题。
>3) -There''s a problem with development under Windows.



使用MinGW编译Python是可能的,并用它创建扩展

。所以一些网站可以托管一个包含

MinGW和用它编译的Python的zip文件,所有这些文件都已准备好并设置好。一个人不多,然后b $ b专家可以在短时间内创建编译好的小扩展

而不会有太多的复杂性。 (或者也许D语言可以包装

而不是MinGW来做类似的事情.D可以是一个很好的用于Python的
语言)但是很可能PIL,scipy等必须再次为这种替代的官方或半官方Python

发行版编译。


It''s possibile to compile Python with MinGW, and to create extensions
with it. So some site can host a single zip file that contains both
MinGW and Python compiled with it, all ready and set. A person not much
expert can then create compiled small extensions in a short time
without too much complexities. (Or maybe the D language can be packed
into that, instead of MinGW, to do similar things. D can be a good
language used with Python) But then probably PIL, scipy, etc have to be
compiled again for such alternative official or semi-official Python
distribution.



有一些警告,mingw只会使用标准的2.4(并且可能是

2.5)解释器。我们使用我们的Enthought

Edition分发mingw设置。 Python发行版。

http://code.enthought.com/ enthon /


-

Robert Kern


我已经开始相信整个世界都是一个谜,一个无害的谜团,因为我们疯狂地试图解释它,好像它有一个潜在的真相,这是可怕的。

- Umberto Eco

With a few caveats, mingw will simply work with the standard 2.4 (and presumably
2.5) interpreter. We distribute mingw set up to do this with our "Enthought
Edition" Python distribution.

http://code.enthought.com/enthon/

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco


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

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