(PYTHON 3) Is there a way to surpass the 100 KB limit, and if not, what are some text color modules?

+3 votes
asked Aug 21 by BruhMoment (400 points)
Recently, I have been working on a project that is now >100 kilobytes in size. I can't find a way to go past this limit, so I have tried switching to IDLE. Colorama, the module I am using to change the color of printed text, does not work on IDLE. Is there any way I can a) continue using onlinegdb with a file larger than 100 KB, b) learn about a text color changing module that works with IDLE, or c) learn about a new compiler that has a higher size limit and works with Colorama? Thank you for your help!

1 Answer

0 votes
answered Oct 14 by Ratulhasan14789 (140 points)

well, the 100kb limit is set by the website platform, however you can attempt to upload your input file to the internet and read it using directly from python (usable libraries: urllib)  read more on: https://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http-using-python

import urllib.request
with urllib.request.urlopen('http://www.example.com/') as f:
    html = f.read().decode('utf-8')

 and here is a vast explaination about coloring your CLI (also works on GDB) output: https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html

WARNING: won't work on the pythons IDLE

quick example: run this:

 print ("\u001b[31mHelloWorld")


Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.