Re: [Twisted-Python] Lore to Sphinx Conversion Progress Report 5
Hi Kevin I just tried building under Python 2.5.2 and got this: $ python lore2sphinx.py Traceback (most recent call last): File "lore2sphinx.py", line 32, in <module> from table import Table File "/home/terry/s/net/lore2sphinx/table.py", line 214 row_lines = list(izip_longest(*row_split, fillvalue='')) ^ SyntaxError: invalid syntax
From a quick look at table.py, I don't see the problem. I have to go to a meeting now, so can't dig into it ATM. Also, I have Spinx 0.6.3 installed, not 0.6.4
BTW, why is there a Python 2.6 requirement? I wrote all the FluidDB docs in Sphinx with 2.5 (http://doc.fluidinfo.com/fluidDB/). Terry
On Fri, Feb 5, 2010 at 1:33 PM, Terry Jones
Hi Kevin
I just tried building under Python 2.5.2 and got this:
$ python lore2sphinx.py Traceback (most recent call last): File "lore2sphinx.py", line 32, in <module> from table import Table File "/home/terry/s/net/lore2sphinx/table.py", line 214 row_lines = list(izip_longest(*row_split, fillvalue='')) ^ SyntaxError: invalid syntax
From a quick look at table.py, I don't see the problem. I have to go to a meeting now, so can't dig into it ATM. Also, I have Spinx 0.6.3 installed, not 0.6.4
That's odd...I have no idea what's going on there. I'm actually kind of surprised you even got that far...see below.
BTW, why is there a Python 2.6 requirement? I wrote all the FluidDB docs in Sphinx with 2.5 (http://doc.fluidinfo.com/fluidDB/).
Terry
The original reason for it was because I wanted to use (and am using) os.path.relpath, which was (according to the Python docs) introduced in Python 2.6. It also happeed to be what I had installed on this machine. Since I decided to use 2.6, though, some other 2.6-only stuff might have snuck in, though nothing comes to mind at the moment. If you feel like modifying the code to work on 2.5, please feel free, though since this tool should only be used "for real" a couple of times, I don't think it's worth spending a whole lot of effort on, unless you just feel like helping out and are stuck on 2.5. Kevin Horn
On Fri, Feb 5, 2010 at 2:16 PM, Kevin Horn
On Fri, Feb 5, 2010 at 1:33 PM, Terry Jones
wrote: Hi Kevin
I just tried building under Python 2.5.2 and got this:
$ python lore2sphinx.py Traceback (most recent call last): File "lore2sphinx.py", line 32, in <module> from table import Table File "/home/terry/s/net/lore2sphinx/table.py", line 214 row_lines = list(izip_longest(*row_split, fillvalue='')) ^ SyntaxError: invalid syntax
From a quick look at table.py, I don't see the problem. I have to go to a meeting now, so can't dig into it ATM. Also, I have Spinx 0.6.3 installed, not 0.6.4
That's odd...I have no idea what's going on there. I'm actually kind of surprised you even got that far...see below.
After looking at this some more, it looks as though "izip_longest" is the culprit...introduced in 2.6. Why its giving a syntax error, though, is beyond me. Kevin Horn
On Fri, Feb 5, 2010 at 10:18 PM, Kevin Horn
After looking at this some more, it looks as though "izip_longest" is the culprit...introduced in 2.6.
Why its giving a syntax error, though, is beyond me.
The problem is the function call syntax:
row_lines = list(izip_longest(*row_split, fillvalue='')) ^ SyntaxError: invalid syntax
You have keyword arguments after *args, and this is only valid in 2.6 and up. -- mithrandi, i Ainil en-Balandor, a faer Ambar
On Fri, Feb 5, 2010 at 2:38 PM, Tristan Seligmann
On Fri, Feb 5, 2010 at 10:18 PM, Kevin Horn
wrote: After looking at this some more, it looks as though "izip_longest" is the culprit...introduced in 2.6.
Why its giving a syntax error, though, is beyond me.
The problem is the function call syntax:
row_lines = list(izip_longest(*row_split, fillvalue='')) ^ SyntaxError: invalid syntax
You have keyword arguments after *args, and this is only valid in 2.6 and up. -- mithrandi, i Ainil en-Balandor, a faer Ambar
Ah, thanks for that. I don't typically use that syntax, and I thought it looked kind of goofy, but that's the way the signature for izip_longest is in the docs, so I used it there. And since it was introduced in 2.6... All makes sense now... Thanks again! Kevin Horn
participants (3)
-
Kevin Horn
-
Terry Jones
-
Tristan Seligmann