我需要为python开发设置窗口的初学者指南 [英] I need a beginners guide to setting up windows for python development

查看:71
本文介绍了我需要为python开发设置窗口的初学者指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前只与.NET合作,并且想使用python。为此,我需要建立一个python开发环境。我指导这一点很方便。我想我会做网络开发,所以需要一个网络服务器,可能还需要一个数据库。我还需要指向流行的ORM,MVC框架和测试库的指针。

I currently work with .NET exclusively and would like to have a go at python. To this end I need to set up a python development environment. I guide to this would be handy. I guess I would be doing web development so will need a web server and probably a database. I also need pointers to popular ORM's, an MVC framework, and a testing library.

我所有这方面的主要标准之一就是我想了解它的工作原理,我希望它尽可能孤立。这很重要,因为我要警惕使用第三方Web和数据库服务器污染什么是可工作的.NET环境。如果可能的话,我非常乐意使用SQLite来开始。

One of my main criteria with all this is that I want to understand how it works, and I want it to be as isolated as possible. This is important as i am wary of polluting what is a working .NET environment with 3rd party web and database servers. I am perfectly happy using SQLite to start with if this is possible.

如果我对此做得很好,我也很可能想设置自动化构建和CI服务器(在虚拟机上,可能是ubuntu)。对于这些的任何建议都是有用的。

If I get on well with this I am also likely to want to set up automated build and ci server (On a virtual machine, probably ubuntu). Any suggestions for these would be useful.

如果我喜欢python,我的最终目标是拥有与.NET一起可用的类似工具,并真正了解其构建。和部署这一切。首先,我将为您提供一个尽可能孤立的简单开发环境,如果我不喜欢它,很容易删除它。我不想使用IronPython,因为我想拥有使用常用工具和框架开发python解决方案的完整经验。

My ultimate aim if i like python is to have similar sorts of tools that i have available with .NET and to really understand the build and deployment of it all. To start with I will settle for a simple development environment that is as isolated as possible and will be easy to remove if I don't like it. I don't want to use IronPython as I want the full experience of developing a python solution using the tools and frameworks that are generally used.

推荐答案

设置Python环境并不难,而且我从来没有将.NET工作搞砸了。基本上,安装Python ---我将使用2.6,而不是3.0(目前尚未被广泛接受)-,并将其添加到您的PATH中,您就可以使用该语言了。我不建议使用Ubuntu VM作为开发环境。如果您使用的是Windows,那么最好还是在Windows上进行开发,而我这样做并没有很大的问题。我从Windows到Linux来回无障碍。

It's not that hard to set up a Python environment, and I've never had it muck up my .NET work. Basically, install Python --- I'd use 2.6 rather than 3.0, which is not yet broadly accepted --- and add it to your PATH, and you're ready to go with the language. I wouldn't recommend using a Ubuntu VM as your development environment; if you're working on Windows, you might as well develop on Windows, and I've had no significant problems doing so. I go back and forth from Windows to Linux with no trouble.

如果您有一个对Python基本的支持的编辑器,我会坚持使用。如果没有,我发现 Geany 是一个不错的,轻便的,易于使用的,具有良好Python的编辑器支持,尽管我自己使用 Emacs ,因为我知道它;其他人,例如 SCITE NotePad ++ 或其他任何形式。我会避免使用花哨的Python IDE,因为它们与语言的字符不匹配,而且我也不会打扰IDLE(Python随附),因为使用起来很麻烦。

If you have an editor that you're comfortable with that has basic support for Python, I'd stick with it. If not, I've found Geany to be a nice, light, easy-to-use editor with good Python support, though I use Emacs myself because I know it; other people like SCITE, NotePad++, or any of a slew of others. I'd avoid fancy IDEs for Python, because they don't match the character of the language, and I wouldn't bother with IDLE (included with Python), because it's a royal pain to use.

对库和框架的建议:


  • Django standard 网络框架,但是它很大,您必须按照django的方式工作;我更喜欢 CherryPy ,它也得到了积极的支持,但是它很轻巧,给您很大的自由,并且包含了一个不错的选择。

  • Django包含自己的ORM,这已经足够好了;不过,有一个独立的Python版本,它甚至更好: SQL炼金术

  • 就测试库而言, pyunit 在我看来是显而易见的选择

  • Django is the standard web framework, but it's big and you have to work django's way; I prefer CherryPy, which is also actively supported, but is light, gives you great freedom, and contains a nice, solid webserver that can be replaced easily with httpd.
  • Django includes its own ORM, which is nice enough; there's a standalone one for Python, though, which is even nicer: SQL Alchemy
  • As far as a testing library goes, pyunit seems to me to be the obvious choice

祝您好运,欢迎使用一种非常有趣的语言!

Good luck, and welcome to a really fun language!

编辑摘要:我本来是推荐 Karrigell ,但不能再做任何事情:自3.0版以来,它一直在被破坏,并且社区不足以解决问题。如果您喜欢不会妨碍您的轻巧,简单的框架, CherryPy 是一个很好的替代品我已经更改了上面的内容以提出建议。

EDIT summary: I originally recommended Karrigell, but can't any more: since the 3.0 release, it's been continuously broken, and the community is not large enough to solve the problems. CherryPy is a good substitute if you like a light, simple framework that doesn't get in your way, so I've changed the above to suggest it instead.

这篇关于我需要为python开发设置窗口的初学者指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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