Python适用于大型软件项目(不是基于Web的)吗? [英] Is Python good for big software projects (not web based)?

查看:417
本文介绍了Python适用于大型软件项目(不是基于Web的)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我主要用C / C ++开发,但我在Python中编写了一些小实用程序来自动执行某些任务,我真的很喜欢它作为语言(尤其是生产力)。

Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).

除了性能之外(由于Python与C模块之间易于连接,有时可以解决这个问题),您认为它适合于生产中使用吗?开发独立的复杂应用程序(例如想到文字处理器或图形工具)?

Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?

你会建议什么IDE?在我看来,即使对于小型项目,提供Python的IDLE也是不够的。

What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion.

推荐答案

我们使用IronPython来构建我们的旗舰产品在 Resolver Systems 上,电子表格应用程序(40kloc生产代码 - 以及它的Python,IMO意味着每个功能的位置很低),所以我肯定会说它已经准备好复制应用程序的生产使用。

We've used IronPython to build our flagship spreadsheet application (40kloc production code - and it's Python, which IMO means loc per feature is low) at Resolver Systems, so I'd definitely say it's ready for production use of complex apps.

有两种方法可能对你没有用处: - )

There are two ways in which this might not be a useful answer to you :-)


  1. 我们使用的是IronPython,而不是更常用的CPython。这为我们提供了使用.NET类库的巨大优势。我可能会在这里惹火,但我会说我从来没有真正看到过看起来很专业的CPython应用程序 - 因此访问WinForms小部件集对我们来说是一个巨大的胜利。如果我们需要性能提升,IronPython还为我们提供了能够轻松进入C#的优势。 (虽然老实说我们从不需要这样做。迄今为止我们所有的性能问题都是因为我们选择了愚蠢的算法,而不是因为语言很慢。)使用来自IP的C#要容易得多而不是为CPython编写C扩展。

  2. 我们是一家极限编程商店,所以我们在编写代码之前编写测试。如果不首先编写测试,我就不会用动态语言编写生产代码;缺乏编译步骤需要由某些东西来涵盖,而正如其他人所指出的那样,没有它的重构可能会很困难。 (Greg Hewgill的回答表明他遇到了同样的问题。另一方面,我认为如果不首先编写测试,我不会用任何语言编写 - 或者特别重构 - 生成代码 - 但是YMMV。)

  1. We're using IronPython, not the more usual CPython. This gives us the huge advantage of being able to use .NET class libraries. I may be setting myself up for flaming here, but I would say that I've never really seen a CPython application that looked "professional" - so having access to the WinForms widget set was a huge win for us. IronPython also gives us the advantage of being able to easily drop into C# if we need a performance boost. (Though to be honest we have never needed to do that. All of our performance problems to date have been because we chose dumb algorithms rather than because the language was slow.) Using C# from IP is much easier than writing a C Extension for CPython.
  2. We're an Extreme Programming shop, so we write tests before we write code. I would not write production code in a dynamic language without writing the tests first; the lack of a compile step needs to be covered by something, and as other people have pointed out, refactoring without it can be tough. (Greg Hewgill's answer suggests he's had the same problem. On the other hand, I don't think I would write - or especially refactor - production code in any language these days without writing the tests first - but YMMV.)

Re:IDE - 每个人使用他们喜欢的文本编辑器我们都很好;如果你喜欢更重量级的东西,那么 WingIDE 就是备受好评的。

Re: the IDE - we've been pretty much fine with each person using their favourite text editor; if you prefer something a bit more heavyweight then WingIDE is pretty well-regarded.

这篇关于Python适用于大型软件项目(不是基于Web的)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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