I am currently designing a simple game and I am trying to change the colour of specific things I am printing. Already I have downloaded the colorama module and ran my code using a sample I've found online, but this doesn't work (I'll tell the details later). I am aware of a setting within the Python options but this affects the whole text not specific sections. If this helps my computer runs Windows and I am running Python 3.8. Here is the setup code, and then a few lines after is the code I have in a separate file. A few lines after that is the output:
from setuptools import setup, find_packages
name = 'colorama'
version = '0.1'
def get_long_description(filename):
readme = join(dirname(__file__), filename)
return open(readme).read()
setup(
name=name,
version=version,
description="Cross-platform colored terminal text.",
long_description=get_long_description('README.txt'),
keywords='color colour terminal text ansi windows crossplatform xplatform',
author='Jonathan Hartley',
author_email='tartley@tartley.com',
url='http://code.google.com/p/colorama/',
license='BSD',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=True,
install_requires=[
# -*- Extra requirements: -*-
],
entry_points="""
# -*- Entry points: -*-
""",
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Topic :: Terminals',
]
# see classifiers http://pypi.python.org/pypi?%3Aaction=list_classifiers
)
import colorama
from colorama import Fore, Style
print(Fore.BLUE + "Hello World")
[34mHello World