|
From: | Kaushal Shriyan |
Subject: | Re: [Fab-user] Command status output OK in green color and FAILED in red color |
Date: | Mon, 1 Jun 2015 19:04:39 +0530 |
Hi,
you can use colors, as explained here: http://docs.fabfile.org/en/1.10/api/core/colors.html. You need to use the value returned when executing run or sudo.from fabric.colors import red, green
ret_code = sudo("ls -l")
if ret_code.succeeded :
print(green("Success"))
else:
print(red("Error"))Regards
2015-06-01 13:45 GMT+02:00 Kaushal Shriyan <address@hidden>:_______________________________________________Hi,
Is there a native feature available in fabric tool similar to the example given in http://stackoverflow.com/questions/5506176/bash-echo-something-to-right-end-of-window-right-aligned?For example if the command is successful then OK in green color and FAILED in red colorAny examples?I would appreciate your help.Regards,Kaushal
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
[Prev in Thread] | Current Thread | [Next in Thread] |