Re: python3 thoughts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 11/12/2010 11:46 AM, Auguste Pop wrote:
> Considering the incompatibility in the fundamental print
> function/statement, I seriously doubt the number of python2 packages
> that can run under python3 without any modification.

But that's the easy part. 2to3 can automatically convert a lot of
things, like print x to print(x), xrange(y) to range(y) and range(z) to
list(range(z)):

2to3 -w somefile.py # converts the file to python 3 and also backs up
the original

References:
http://docs.python.org/library/2to3.html
http://diveintopython3.org/porting-code-to-python-3-with-2to3.html


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux