Re: Availability of Numpy, WX, Matplotlib and Scipy under Python3

2012-09-05 Thread Nigel Sedgwick
Re: Availability of Numpy, WX, Matplotlib and Scipy under Python3
=

Thanks to Thomas Kluyver and Dmitrijs Ledkovs.

On Mon, 2012-09-03 at 21:27 +0100, Thomas Kluyver wrote:
 Python 3 versions of numpy and scipy are already in wheezy. wx and
 matplotlib haven't yet released Python 3 compatible versions, and
 Wheezy is frozen now, so they've missed that boat. If you need to use
 those packages for a substantial application in the near future,
 sticking with Python 2 for now is your safest bet. If you use Python
 2.6 or 2.7 with modern idioms, it should be relatively easy to port
 code later when all the libraries are ready. 

Given the issue with (especially) WX, I think I will stick with Python
2.7 for the time being.

On Tue, 2012-09-04 at 01:07 +0100, Dmitrijs Ledkovs wrote:
You may want to request a backport from folks who do those, and maybe
 (dependencies permitting) they can make a python3 backport of scipy /
 numpy for current stable release squeeze. 

I'll consider that if and when I find any differences between Python 2.7
and 3.* that become pressing issues for me.  Otherwise, I suspect that
any request for a backport from me will only distract from more useful
work for a wider range of users.

--

It is a pity that (particulaly) wxPython has missed the Wheezy revision
window.  When I looked at the various GUIs available in Python, I
thought that wxPython was the one with the best combination of advanced
facilities and ease of use.

Thanks again for the quick and useful responses.

Best regards
-- 
Nigel Sedgwick, Cambridge Algorithmica Ltd
URL: http://www.camalg.co.uk


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1346745609.2391.11.ca...@napier3.camalg.co.uk



Re: Availability of Numpy, WX, Matplotlib and Scipy under Python3

2012-09-05 Thread Barry Warsaw
On Sep 04, 2012, at 09:00 AM, Nigel Sedgwick wrote:

Given the issue with (especially) WX, I think I will stick with Python
2.7 for the time being.

The only suggestion I'd make is that you write your Python 2 code so that it's
easier to port to Python 3 when all your dependencies are available.  I'm not
sure how many good guides there are out there on writing Python 3-friendly
Python 2 code, but you might have a look at http://wiki.ubuntu.com/Python/3
for some hints.

I suppose the top recommendations I'd give are:

* Target nothing older than Python 2.6 (2.7 is even better)
* As much as possible, write common idiom code (possibly using the 'six'
  library if necessary).
* from __future__ import absolute_import, print_function, unicode_literals
* Get your bytes vs. strings story straight right from the start.
* Use b'' for bytes.
* Avoid idioms you know are gone in Python 3, like backticks, dict.iter*()
  methods, xrange(), etc.

Or essentially: write your code as if it were a single code base,
dual-compatible code base.  Eventually, it will be even if you end up dropping
Python 2 support at some point. ;)

Cheers,
-Barry


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120905094639.04d3f...@resist.wooz.org



Availability of Numpy, WX, Matplotlib and Scipy under Python3

2012-09-03 Thread Nigel Sedgwick
Dear All

Availability of Numpy, WX, Matplotlib and Scipy under Python3
=

I am a user of Debian Squeeze (6.0.5) on an AMD64 computer.  I would
like to switch a mainstream development of mine from Python2.6 (or 2.7)
to Python3.1 (or 3.2) as soon as practical.

The application makes heavy use of numpy and wx and will soon make heavy
use of scipy, matplotlib and various other python libraries that are
widely used.  Currently, as far as I can see, there is no support for
these libraries under python3, as installed using Debian Synaptic from
the Debian site(s).  The technical problem is one of the location of
these python libraries in the Linux directory tree, and the versions of
numpy and scipy not being sufficiently recent for use with python3.0 or
higher.

I could install these libraries from the current source downloads.
However, that is a load of effort and (worse) there is a risk that I
will do not do it properly and get in a mess.

Is there any current expectation of when these libraries, especially
python3-numpy, python3-wx and python3-matplotlib are likely to become
available under Debian Squeeze?

As an alternative, on the assumption that they will be available under
Debian Wheezy, what is the likely timescale for that release to move
from testing to stable?

Information on the above would help me decide what to do: (i) carry on
with Python2 for a bit longer; (ii) go for a source code install of
these libraries for python3 under Debian; (iii) acquire a (new)
non-critical computer and install a test version of Debian Wheezy on it,
with most/all python libraries being python3 compatible; even (iv) use
an MS Windows version of python3 and the libraries and try running it
under Wine.

Thanks in advance for any useful information.

Best regards
-- 
Nigel Sedgwick, Cambridge Algorithmica Ltd
URL: http://www.camalg.co.uk


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1346680657.27451.26.ca...@napier3.camalg.co.uk



Re: Availability of Numpy, WX, Matplotlib and Scipy under Python3

2012-09-03 Thread Thomas Kluyver
Hi Nigel,

On 3 September 2012 14:57, Nigel Sedgwick n...@camalg.co.uk wrote:
 The application makes heavy use of numpy and wx and will soon make heavy
 use of scipy, matplotlib and various other python libraries that are
 widely used.

Python 3 versions of numpy and scipy are already in wheezy. wx and
matplotlib haven't yet released Python 3 compatible versions, and
Wheezy is frozen now, so they've missed that boat. If you need to use
those packages for a substantial application in the near future,
sticking with Python 2 for now is your safest bet. If you use Python
2.6 or 2.7 with modern idioms, it should be relatively easy to port
code later when all the libraries are ready.

As far as I understand Debian, none of those python3- packages will be
added to Squeeze. The idea of a stable release is that the only
updates it gets are bugfixes and security.

Looking further ahead: matplotlib is aiming to release a Python 3
version in October. wxPython has a development version working on
Python 3, but I don't see any indication of how soon a release is
planned. Other GUI toolkits (Qt, GTK) already support Python 3, if
they are an option for you.

Best wishes,
Thomas


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caovn4qipxjjqxswn1dwc3rcnzhc15icn8e5dyxwa18yurzo...@mail.gmail.com



Re: Availability of Numpy, WX, Matplotlib and Scipy under Python3

2012-09-03 Thread Dmitrijs Ledkovs
On 3 September 2012 21:27, Thomas Kluyver tho...@kluyver.me.uk wrote:
 Hi Nigel,

 On 3 September 2012 14:57, Nigel Sedgwick n...@camalg.co.uk wrote:
 The application makes heavy use of numpy and wx and will soon make heavy
 use of scipy, matplotlib and various other python libraries that are
 widely used.

 Python 3 versions of numpy and scipy are already in wheezy. wx and
 matplotlib haven't yet released Python 3 compatible versions, and
 Wheezy is frozen now, so they've missed that boat. If you need to use
 those packages for a substantial application in the near future,
 sticking with Python 2 for now is your safest bet. If you use Python
 2.6 or 2.7 with modern idioms, it should be relatively easy to port
 code later when all the libraries are ready.

 As far as I understand Debian, none of those python3- packages will be
 added to Squeeze. The idea of a stable release is that the only
 updates it gets are bugfixes and security.


One more thing there is debian-backports =)

http://backports-master.debian.org/

You may want to request a backport from folks who do those, and maybe
(dependencies permitting) they can make a python3 backport of scipy /
numpy for current stable release squeeze.


 Looking further ahead: matplotlib is aiming to release a Python 3
 version in October. wxPython has a development version working on
 Python 3, but I don't see any indication of how soon a release is
 planned. Other GUI toolkits (Qt, GTK) already support Python 3, if
 they are an option for you.

 Best wishes,
 Thomas


Regards,

Dmitrijs.


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/canbhluj7xcppo3bgujw-7+sazvjvet_kjtqdovfh-3-7ruk...@mail.gmail.com