如果我是Python新手,我应该使用哪个版本的Python?

时间:2021-07-01 07:15:37

I am now on the road to learn Python (not the first time I wanted to get this done) now I am standing in front of a decision which I am not able to make so easily

我现在正在学习Python(不是我第一次想要完成这项工作)现在我站在一个我无法轻易做出的决定面前

Which Version should I use?!

我应该使用哪个版本?!

I found that question was asked about a year ago and Python 2.6 was chosen (more or less) now whats the status quo now ?!

我发现大约一年前问过这个问题,现在选择Python 2.6(或多或少)现在的现状是什么?

I am running my home and business environment mixed with Windows (XP, 7, 2003, 2008), Linux (Ubuntu Intel & PPC) and Mac OS X (PPC & Intel) Environments and my first approach is to learn the language by creating few scripts to help me do my job as a network administrator and server administrator.

我正在运行我的家庭和商业环境,混合了Windows(XP,7,2003,2008),Linux(Ubuntu Intel和PPC)和Mac OS X(PPC和Intel)环境,我的第一种方法是通过创建一些语言来学习语言脚本可以帮助我完成网络管理员和服务器管理员的工作。

Thanks for your help, by the way I am not new in programming.

感谢您的帮助,顺便说一下,我不是编程方面的新手。

5 个解决方案

#1


3  

For writing admin scripts, I would recommend the current Python 3.x variant and http://diveintopython3.org. As you already know how to program, you will pick up the differences between 3.x and 2.x rather easily in case you should need a 2.x-only library.

对于编写管理脚本,我建议使用当前的Python 3.x变体和http://diveintopython3.org。如您已经知道如何编程,您将很容易地发现3.x和2.x之间的差异,以防您需要一个仅2.x的库。

For your purposes, the major difference between 2.x and 3.x are likely print being a function (3.x) vs. a special command (2.x) and strings that are always unicode (3.x) vs. special unicode-strings (2.x).

出于您的目的,2.x和3.x之间的主要区别可能是打印为函数(3.x)与特殊命令(2.x)以及始终为unicode(3.x)与特殊字符串的字符串。 unicode-strings(2.x)。

#2


3  

for real projects: 2 (many libs are incompatible with 3), for small scripts and learning: 3.

对于实际项目:2(许多库与3不兼容),用于小脚本和学习:3。

#3


1  

I'd favour 2.7 at the moment.

我现在赞成2.7。

There are more libraries available for 2.7, and new features are still being added.

有更多的库可用于2.7,并且仍在添加新功能。

#4


0  

It's still Python 2.x, but 2.7 should serve your needs now. Python 3 is still some way off comprehensive support from the universe of tools, libraries and frameworks.

它仍然是Python 2.x,但2.7现在应该满足您的需求。 Python 3仍然远离工具,库和框架的全面支持。

#5


0  

I'm new to Python as well...for what i've read, 2.7 is the one, but i had to downgrade to 2.5 to be able to use Google App Engine's SDK.

我也是Python的新手......对于我所读到的,2.7就是那个,但我不得不降级到2.5以便能够使用Google App Engine的SDK。

#1


3  

For writing admin scripts, I would recommend the current Python 3.x variant and http://diveintopython3.org. As you already know how to program, you will pick up the differences between 3.x and 2.x rather easily in case you should need a 2.x-only library.

对于编写管理脚本,我建议使用当前的Python 3.x变体和http://diveintopython3.org。如您已经知道如何编程,您将很容易地发现3.x和2.x之间的差异,以防您需要一个仅2.x的库。

For your purposes, the major difference between 2.x and 3.x are likely print being a function (3.x) vs. a special command (2.x) and strings that are always unicode (3.x) vs. special unicode-strings (2.x).

出于您的目的,2.x和3.x之间的主要区别可能是打印为函数(3.x)与特殊命令(2.x)以及始终为unicode(3.x)与特殊字符串的字符串。 unicode-strings(2.x)。

#2


3  

for real projects: 2 (many libs are incompatible with 3), for small scripts and learning: 3.

对于实际项目:2(许多库与3不兼容),用于小脚本和学习:3。

#3


1  

I'd favour 2.7 at the moment.

我现在赞成2.7。

There are more libraries available for 2.7, and new features are still being added.

有更多的库可用于2.7,并且仍在添加新功能。

#4


0  

It's still Python 2.x, but 2.7 should serve your needs now. Python 3 is still some way off comprehensive support from the universe of tools, libraries and frameworks.

它仍然是Python 2.x,但2.7现在应该满足您的需求。 Python 3仍然远离工具,库和框架的全面支持。

#5


0  

I'm new to Python as well...for what i've read, 2.7 is the one, but i had to downgrade to 2.5 to be able to use Google App Engine's SDK.

我也是Python的新手......对于我所读到的,2.7就是那个,但我不得不降级到2.5以便能够使用Google App Engine的SDK。