From b01d3f760121a554a26001f68f9ad3c5e4ad6293 Mon Sep 17 00:00:00 2001 From: Junior Date: Thu, 27 Jun 2024 10:26:59 -0400 Subject: [PATCH] Clean up colorama and color ANSI terminal instructions/tutorials. --- Python/027_function.py | 2 ++ README.md | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Python/027_function.py b/Python/027_function.py index 34d2f56..0e00f00 100644 --- a/Python/027_function.py +++ b/Python/027_function.py @@ -1,6 +1,8 @@ # A simple example of making a function +from colorama import just_fix_windows_console from Utils.TextColors import TextColors +just_fix_windows_console() # Functions are blocks of code that can be # called/referenced from elsewhere in the code. diff --git a/README.md b/README.md index fa7298d..79fe582 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,19 @@ This repository is primarily a collection of resources and learning aides for St * The requests module provides web/REST API access * The colorama module provides access to color and cursor positioning in a terminal -* The termcolor module provides access to console text colors as well -* In order to get ANSI colors in windows CMD or Powershell the virtual terminal level must be set to 1 +* The termcolor module provides access to console text colors as well in a different way (include for compatibility) Inside a terminal: ```bash pip install requests colorama termcolor ``` + +In order to get ANSI colors in windows CMD or Powershell the virtual terminal level must be set to 1. +This is only needed **IF** : + +* You have administrator access on your PC +* And you can't use colorama for some reason + Inside an **Administrator** terminal in the `PreReq/` folder: ```bash reg import VirtualTerminalLevel.reg