X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fscripts%2Ffen2ascii.py;h=74087440e20ed8890bca120435c9fe23b8279086;hb=28f76b84c96323e4dad43140121aae01820b4c38;hp=212dae4f3f817b76473b157562496e55a6f061b8;hpb=22e1063cb9b6bd84e6c1d3adf24b3d93a06b90bb;p=lyx.git diff --git a/lib/scripts/fen2ascii.py b/lib/scripts/fen2ascii.py index 212dae4f3f..74087440e2 100644 --- a/lib/scripts/fen2ascii.py +++ b/lib/scripts/fen2ascii.py @@ -9,6 +9,7 @@ # This script will convert a chess position in the FEN # format to an ascii representation of the position. +from __future__ import print_function import sys,string,os os.close(0) @@ -26,9 +27,8 @@ comp=string.split(line,'/') cont=1 margin= " "*6 -print margin+' +'+"-"*15+'+' +print (margin+' +'+"-"*15+'+') for i in range(8): - cont = cont + 1 tmp="" for j in comp[i]: @@ -43,7 +43,7 @@ for i in range(8): cont = cont + 1 row = 8 - i - print margin, row, tmp+"|" + print (margin, row, tmp+"|") -print margin+' +'+"-"*15+'+' -print margin+' a b c d e f g h ' +print (margin+' +'+"-"*15+'+') +print (margin+' a b c d e f g h ')