Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

(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, 2020 by SBeasey (410 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

+1 vote
answered Oct 14, 2020 by Ratulhasan14789 (160 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")

 

commented Nov 2, 2020 by SBeasey (410 points)
Thank you so much for your answer. This helps a lot!
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.
...