ChrisAndre / tkintertable

Automatically exported from code.google.com/p/tkintertable
Other
0 stars 0 forks source link

No support for Python 3 #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There is no support for Python 3, even if

pip install tkintertable

only puts out some warnings.
Code crashes for some

print '...'

statements.

Original issue reported on code.google.com by pierrepr...@gmail.com on 18 Dec 2013 at 3:28

GoogleCodeExporter commented 9 years ago
Support for python 3 could be great!! I cannot go over all the code and migrate 
to 2.x in order to use this so great library. My code crashes at some print 
statements

Original comment by lobom...@gmail.com on 22 Apr 2014 at 3:48

GoogleCodeExporter commented 9 years ago
I'll note I got the following when I used Gentoo's gpypi script to install 
tkintertable:

 * Messages for package dev-python/tkintertable-1.1.2:

 * Syntax errors / warnings in Python modules for CPython 3.3:
 *     *** Error compiling '/usr/lib64/python3.3/site-packages/tkintertable/NumpyStats.py'...
 *     File "/usr/lib64/python3.3/site-packages/tkintertable/NumpyStats.py", line 27
 *     print 'you need numpy to do statistics'
 *     ^
 *     SyntaxError: invalid syntax
 *     
 *     *** Error compiling '/usr/lib64/python3.3/site-packages/tkintertable/Prefs.py'...
 *     File "/usr/lib64/python3.3/site-packages/tkintertable/Prefs.py", line 46
 *     print 'Did not find preferences!!!'
 *     ^
 *     SyntaxError: invalid syntax
 *     
 *     *** Error compiling '/usr/lib64/python3.3/site-packages/tkintertable/PylabPlot.py'...
 *     File "/usr/lib64/python3.3/site-packages/tkintertable/PylabPlot.py", line 29
 *     print 'you need numpy to do statistics'
 *     ^
 *     SyntaxError: invalid syntax
 *     
 *     *** Error compiling '/usr/lib64/python3.3/site-packages/tkintertable/TableModels.py'...
 *     File "/usr/lib64/python3.3/site-packages/tkintertable/TableModels.py", line 62
 *     print 'reclist does not match data keys'
 *     ^
 *     SyntaxError: invalid syntax
 *     
 *     *** Error compiling '/usr/lib64/python3.3/site-packages/tkintertable/Tables.py'...
 *     File "/usr/lib64/python3.3/site-packages/tkintertable/Tables.py", line 560
 *     print 'found in',row,col
 *     ^
 *     SyntaxError: invalid syntax
 *     
 *     *** Error compiling '/usr/lib64/python3.3/site-packages/tkintertable/TablesApp.py'...
 *     File "/usr/lib64/python3.3/site-packages/tkintertable/TablesApp.py", line 218
 *     print 'skipping'
 *     ^
 *     SyntaxError: invalid syntax
 *     
 *     *** Error compiling '/usr/lib64/python3.3/site-packages/tkintertable/Testing.py'...
 *     File "/usr/lib64/python3.3/site-packages/tkintertable/Testing.py", line 154
 *     print '%s found' %len(vals)
 *     ^
 *     SyntaxError: invalid syntax

That at least lists some line numbers, if I get a moment I might have a look 
and see if I can correct those, not that it will necessarily address all 
Python3-related issues but it's a start.

Original comment by stua...@longlandclan.yi.org on 29 Sep 2014 at 12:05

GoogleCodeExporter commented 9 years ago
Here's a first attempt at fixing up the print statements.  We'll see about the 
other Python3 issues, the patch is untested.

Original comment by stua...@longlandclan.yi.org on 29 Sep 2014 at 12:18

Attachments:

GoogleCodeExporter commented 9 years ago
I admit that I'm lazy. If this gets fixed before I port the code to python3, I 
would greatly appreciate it.
If not, I am working on porting tkintertable to python 3. When I have it 
working, I'll post that fact here along with the tar bundle.

Original comment by ericcl...@gmail.com on 21 Nov 2014 at 8:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
After a couple of tries I finally got it.
Here is the python 3 version.

Original comment by ericcl...@gmail.com on 22 Nov 2014 at 4:13

Attachments:

GoogleCodeExporter commented 9 years ago
I found this other tktable that seems to behave a little more predictably.
To use with python 3 just ust the 2to3 utility to modify 
/usr/lib/Tktable2.10/tktable.py. Then it works as expected.
Here is the URL where the project is hosted:
http://tktable.sourceforge.net/
Documentation here:
http://tktable.sourceforge.net/tktable/doc/tkTable.html

Original comment by ericcl...@gmail.com on 23 Nov 2014 at 5:24

Attachments: