-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potentially add bold/underline options? #9
Comments
This would be so awesome. |
@TheTechRobo I forked and quickly hacked up some bold options, which follow the same usage as the interrupt param. from cprint import *
cprint.ok('ok')
cprint.ok('ok bold', bold=True)
cprint.info('info')
cprint.info('info bold', bold=True)
cprint.warn('warn')
cprint.warn('warn bold', bold=True)
cprint.err('err')
cprint.err('err bold', bold=True)
cprint.fatal('fatal')
cprint.fatal('fatal', bold=True) I love this library because it uses the default system colors, so it works with any themes. I won't be making a pr of this though, as I'm pretty sure there is a better way than how I hacked it up, but it works. As far as underlining goes, I don't need it, and the way I implemented bold would make it very cluttered to have underlines, as cprint would have to account for both options being true at once as well. |
I think I might be able to clean that up tonight. :D |
There we go. It's a lot cleaner than the one you did, but takes some code from yours. It also makes the code to add underline in the future (if we ever do) pretty simple. |
Awesome! |
If this is a wanted feature, I might submit a PR, but I won't submit one if you don't want the feature. :)
The text was updated successfully, but these errors were encountered: