Sorry. It requires Python 2.4 onwards. There are six places where generator expressions are used. A couple of them (like the one giving the error here) could be made to work with earlier versions of Python by converting them to list comprehensions, e.g.
hline = "%s+\n" % "".join("+".ljust(col_width[col]+3, "-") for col in columns)
becomes:
hline = "%s+\n" % "".join(["+".ljust(col_width[col]+3, "-") for col in columns])
but a few of them are needed for optimisation to ensure that the tuples are pipelined through to the calling function, rather than trying to buffer a copy of them all in memory at once.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your answer. Yes, that figures. I got the thing compiling, but had a hard time convincing myself that I did not change the semantics of the program. I'll install 2.4 and take it for a spin. I've been thinking of installing haskelldb for some time now, but I'll give this a shot instead. After all I use python a whole lot more than I use Haskell :-). I think this project is a really great idea, and I'll try to get the time to try it out.
Regards
/Lennart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What version of python is supported/required (couldn't find any info in the documentation)? I tried to install but get syntax errors:
[root@53dbd181 Dee-0.1]# python setup.py install
running install
running build
running build_py
running install_lib
byte-compiling /usr/lib/python2.3/site-packages/Dee.py to Dee.pyc
File "/usr/lib/python2.3/site-packages/Dee.py", line 621
hline = "%s+\n" % "".join("+".ljust(col_width[col]+3, "-") for col in columns)
^
SyntaxError: invalid syntax
Regards
/Lennart
Sorry. It requires Python 2.4 onwards. There are six places where generator expressions are used. A couple of them (like the one giving the error here) could be made to work with earlier versions of Python by converting them to list comprehensions, e.g.
hline = "%s+\n" % "".join("+".ljust(col_width[col]+3, "-") for col in columns)
becomes:
hline = "%s+\n" % "".join(["+".ljust(col_width[col]+3, "-") for col in columns])
but a few of them are needed for optimisation to ensure that the tuples are pipelined through to the calling function, rather than trying to buffer a copy of them all in memory at once.
Thanks for your answer. Yes, that figures. I got the thing compiling, but had a hard time convincing myself that I did not change the semantics of the program. I'll install 2.4 and take it for a spin. I've been thinking of installing haskelldb for some time now, but I'll give this a shot instead. After all I use python a whole lot more than I use Haskell :-). I think this project is a really great idea, and I'll try to get the time to try it out.
Regards
/Lennart