I've noticed that when printing strings that are wrapped in color functions
it screws up the string formatting. So for example if you have the
following code:

def test():
    fmt = "%-20s |"
    print(fmt % "foo bar baz")
    print(fmt % red("foo bar baz"))

The output looks like:

[25164:1858 - 0:488] 06:39:32 [arabbani@xargsgrep:o +1] - ~
$ fab test
[xargsgrep] Executing task 'test'
foo bar baz          |
foo bar baz |


Does anyone know of a way around this?

Thanks
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to