[pyxl] xlrd and Python 3.x

261 views
Skip to first unread message

Patrick

unread,
Apr 28, 2010, 3:59:55 PM4/28/10
to python-excel
Is there a plan to migrate the xlrd code to run with Python 3.x?

Thanks,

Patrick

--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To post to this group, send an email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-excel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/python-excel?hl=en-GB.

John Machin

unread,
Apr 28, 2010, 7:29:31 PM4/28/10
to python...@googlegroups.com
On 29/04/2010 5:59 AM, Patrick wrote:
> Is there a plan to migrate the xlrd code to run with Python 3.x?

Here is a restatement of the postion described in a thread about
2009-12-08, with clarifications:

... there have been 2 or 3 people "hacking around" who have asked
questions off-list. They gave the appearance of wanting a Python
3.x-only port (as opposed to having one codebase that would support both
3.x and 2.x).

My objective: one codebase which "just works" with 2.x (currently 2.1 to
2.6, but thinking of dropping 2.1 and 2.2), and the output of 2to3 "just
works" (no further fiddling with the source) with 3.x.

For each of xlrd and xlwt, I have done (a) an information-gathering
crash-through-or-crash port to a single-codebase-both2&3 kit (b) a
principled port based on knowledge gained in the first step.

The steps (a) and (b) described above were a proof-of-concept exercise
carried out some time ago (when Python 3.0 was newly available) on then
current versions of the source. It didn't go as far as packaging up and
testing a 3.X distribution that would run 2to3 automatically as part of
installation.

As the message indicated, there have been very few inquiries for 3.X
versions, and none of those have been accompanied by offers of moral
support, physical assistance or funding.

So, the short answer is: no plan at the moment.

Do you have a requirement to build an application using Python 3.X?

Cheers,
John

Patrick

unread,
Apr 28, 2010, 8:33:57 PM4/28/10
to python-excel
Thank you very much for your reply John.

I am working on a project with the requirement to use Python and
PostgreSQL.

Datasets are being collected in Excel, and will have to be verified
and input to PostgreSQL.

And then a front-end GUI is expected ...

It's been an interesting exercise to find a "best" solution. I would
have thought that
Python 3.x would be the route to go, given it is the newest, latest,
greatest, etc.
but that may be an overstatement.

So far I've found that Python 3.x will work with Tkinter and
PostgreSQL drivers (py-postgresql).
That's good. Now I'm trying to find the best tool for reading and
processing excel files, and I
assumed that xlrd would be a good choice. But I'm surprised to find
that it doesn't work with
Python 3.x and that is the reason for my inquiry.

I haven't tried rbo.msexcel.x to see if it will work with Python
3.x ... I wanted to try xlrd out first
as it had an easy installer, some documentation, etc. and obviously
some support ....

So I may go back to using Python 2.6 ... eventually I suppose xlrd
will be available
for Python 3.x but I've learned not to be bleeding edge, and if Python
2.6 works with the tools
we need to get the job done, so be it.

Patrick

John Machin

unread,
Apr 28, 2010, 9:43:12 PM4/28/10
to python...@googlegroups.com
On 29/04/2010 10:33 AM, Patrick wrote:

> I haven't tried rbo.msexcel.x to see if it will work with Python
> 3.x

What is "rbo.msexcel.x"? My googler must be on the blink; all it came up
with was "rice bran oil", "River Basin Organisation", and a game called
"Ragnarok Battle Online".

Patrick

unread,
Apr 28, 2010, 10:50:07 PM4/28/10
to python-excel
My bad. The package (from pypi.python.org) is rbco.msexcel 0.0.1

Patrick

John Machin

unread,
Apr 28, 2010, 11:19:09 PM4/28/10
to python...@googlegroups.com
On 29/04/2010 12:50 PM, Patrick wrote:
> My bad. The package (from pypi.python.org) is rbco.msexcel 0.0.1

The "package" contains 84 lines of code. The first line, and only
import, is:

from pyExcelerator.ImportXLS import parse_xls

You are 28 days late for April Fools' Day, and it's not a very funny
joke anyway.
Reply all
Reply to author
Forward
0 new messages