I have a python script which process a file line by line, if the line
matches a regex, it calls a function to handle it.
My question is is there a better write to refactor my script. The
script works, but as it is, i need to keep indent to the right of the
editor as I add more and more regex for m
On Aug 7, 8:29 pm, n179911 wrote:
> HI,
>
> I have a global variable
>
> // line 8
> tx = 0
>
> and then I have this function (start in line 12):
> def handleTranslate(result):
> print line
> txStr, tyStr = result.group(1), result.grou
HI,
I have a global variable
// line 8
tx = 0
and then I have this function (start in line 12):
def handleTranslate(result):
print line
txStr, tyStr = result.group(1), result.group(2)
print txStr, tyStr
tx += int(txStr)
ty += int(tyStr)
return