Replit Import List
Hi! I’ve been messing around with imports in Python, and saw the replit import thing. I know about the replit.clear() function, but I don’t know what any of the other imported code does. Can you give me a list of code that the replit import adds in? Thanks!
When you are on the repl.it editor, you can type in the code import replit
and it adds in some things like the replit.clear()
code. @niorg2606
@niorg2606 hehe (my package still has the clear function so it shouldn't break anything)
@BD103 It just runs print('\033[2J\033[H', end='')
. This is an ANSI escape sequence that first deletes all the text on the screen (\033[2J) and then moves the cursor to the start (\033[H). The end='' is just so it doesn't print anything extra, since by default it puts a new line (\n) after the message.
You can see all the packages that you can install for Python on the Python Package Index