AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 18.119.19.206


Current Path : /usr/share/doc/python3-colorama/examples/
Upload File :
Current File : //usr/share/doc/python3-colorama/examples/demo08.py

from __future__ import print_function
import fixpath
from colorama import colorama_text, Fore


def main():
    """automatically reset stdout"""
    with colorama_text():
        print(Fore.GREEN + 'text is green')
        print(Fore.RESET + 'text is back to normal')

    print('text is back to stdout')

if __name__ == '__main__':
    main()