using python 2.6?
i have no way of upgrade to python 2.7 or 3.1 so i am stuck wi开发者_开发技巧th python 2.6 on my ubuntu 10.04 machine.
will i still be able to find host that supports python 2.6?
is using python 2.6 still consider outdated or bad practice?
2.6 will be around for a long time. There are many machines that still run even 2.4, so you're fine.
Python 2.6 will probably still be around for a while, as Python 2.7 was released only a few months ago.
You can always use from __future__ import ...
to make use of some of the newer features from Python 3.x
will i still be able to find host that supports python 2.6?
Yes. No problems whatsoever.
is using python 2.6 still consider outdated or bad practice?
No, it is not.
However:
I have no way of upgrade to python 2.7
Yes you do. You download the source code from www.python.org and install it. What you should be careful to do in not to overwrite the system Python.
Install it either with "altinstall" (will not override the system python) or even better, use a custom prefix. For example:
$ ./configure --prefix = /opt/python27
$ make
$ sudo make install
It is often a good idea to use a separate Python install for development, as you can do whatever you want with it including deleting it and reinstalling it without affecting the system Python.
You are NOT stuck. :)
I'm Using Ubuntu 10.04 as well I have Python 2.3.7, 2.4.6, 2.5.5, 2.6.6, 2.7.1, 3.0.1, 3.1.2 and 3.2b2+ installed. No problems. Yes, I use all of them, even though it's mostly 2.4 and 2.6.
Python3.1 is in the repositories for 10.04
$ apt-cache show python3
Package: python3
Priority: optional
Section: python
Installed-Size: 76
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Matthias Klose <doko@debian.org>
Architecture: all
Source: python3-defaults
Version: 3.1.2-0ubuntu1
Depends: python3.1 (>= 3.1.2), python3-minimal (= 3.1.2-0ubuntu1)
Suggests: python3-doc (>= 3.1.2-0ubuntu1), python3-tk (>= 3.1.2-0ubuntu1), python3-profiler (>= 3.1.2-0ubuntu1)
Filename: pool/main/p/python3-defaults/python3_3.1.2-0ubuntu1_all.deb
Size: 11096
MD5sum: 81f3f3bf790f5d7756b76c8d92fcea86
SHA1: 32e12dc7f9500456e063f22645c1cfed76b8845c
SHA256: 0f541352ace2fcf1929a93320ffbe2f1de4e1d140bbe70a7c5a709403b73341c
Description: An interactive high-level object-oriented language (default python3 version)
Python, the high-level, interactive object oriented language,
includes an extensive class library with lots of goodies for
network programming, system administration, sounds and graphics.
.
This package is a dependency package, which depends on Debian's default
Python version (currently v3.1).
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 3y
精彩评论