print('\033c') do clear (and not just scrolling to hide the previous things), but there's also print('\033[2J[H') that do the same as the REPL's `clear` command.
@amelia_camellia3 ай бұрын
Control-L also does this, even in older versions.
@foxypiratecove373503 ай бұрын
@amelia_camellia It doesn't on Windows, while that I said universal across major OSes (just need some config or Colorama on Windows), but Ctrl + L works on other platforms.
@Indently3 ай бұрын
I’m a huge REPL noob and have only opened it up by accident when working in PyCharm. Super cool with the new clear command so I don’t have to learn print command magic ahah
@foxypiratecove373503 ай бұрын
@Indently Yeah, these are ANSI escape codes, it's more used for colors but also for things like clearing the screen. Me too I don't remember most so I made a `clear()` function in one of my local modules.
@rvft3 ай бұрын
@@Indentlyyou can also do os.system("clear") but this one, as you may assume, is NOT OS independent
@ralfbauerfeind82363 ай бұрын
To clear the REPL screen, as you still are in a console, you could probably use the old clear screen keystroke that works in console similar to the command 'clear', CTRL-l (that is a lowercase L).
@ego-lay_atman-bay3 ай бұрын
My biggest problem with the new repl, is that history doesn't get preserved in virtual environments like it did (kinda) in previous versions. However, the new paste mode, multiline editing, and colors make up for that.
@jwbowen3 ай бұрын
I LOVE that your videos are informative and get straight to the point! I get excited when I see a new one released. You've quickly become my favorite Python channel!
@Indently3 ай бұрын
Thank you :)
@samukaze58103 ай бұрын
1:10 I thought I heard "Cola in our REPL" 💀
@tompov2273 ай бұрын
I enjoyed the ow-toe indentation
@samukaze58103 ай бұрын
@@tompov227 💀 I think it's because he has a Danish accent
@theglobalsouth96803 ай бұрын
this is cool, i can do even more testing without needing to create a temporary file!
@conradlewis56893 ай бұрын
You can use ctrl+L to clear the console in some terminals. Works in Linux Terminal and WIndows Powershell. It does not work in WIndows CMD. It will however work if you are in the Python REPL in Windows CMD
@haerbernd3 ай бұрын
I just always imported os and then used os.system('clear') ot os.system('cls') to clean the screen. Good to know that Python 3.13 has it built-in
@thenoblerot3 ай бұрын
I'm here for my my fave tutor learning what repl is, and getting excited about screen clearing 😂
@Indently3 ай бұрын
Screen clearing is the hype!!!!!
@serbansenciuc3 ай бұрын
So python shell is starting to look similar to ipython, nice. Does this REPL affects `pdb`?
@BarryFriedman78403 ай бұрын
Some useful updates to the REPL. A long time coming.
@Little-bird-told-me3 ай бұрын
This is amazing. It time to use python3.13 bois
@compositeboson1233 ай бұрын
4:34 ctrl+L will clear it
@Sarath1773 ай бұрын
useful thank you
@richardboreikoАй бұрын
What you called the cursor is the prompt. 🙂
@mudi2000a3 ай бұрын
New repl is really nice, so it's now also usable without installing ipython (which I still do so for me not much is changing...)
@ayoubachak013 ай бұрын
To clear in the python 3.12 REPL, I have to import the os package and execute the cls command, something like this: import os; os.system("cls")
@Sayied-s7d3 ай бұрын
is there paste mode for cmd windows
@davidlu10032 ай бұрын
Fucking terribly great and awesome!!!! I love coding and python!!!!
@pedropiata6483 ай бұрын
Very nice
@Montegasppa3 ай бұрын
Try Ctrl+L to clean up the console.
@Jelte_Dijkmans2 ай бұрын
So basically, the python console is now, what the ipython console has been for ages?
@U.k3583 ай бұрын
can you make a using tab inside python repl , it is super cool!u
@SkyyySi3 ай бұрын
The new REPL is a great improvement, but it still doesn't even come close to 'ipython' (notice the 'i') :)
@MrEllinan3 ай бұрын
4:39 Ctr + l
@googanigga3 ай бұрын
Clear: import os; os.system("cls||clear")
@ramprasathmk3 ай бұрын
prints the 0 at the end of the clearing the screen
@PanayotPanayotov-x6p3 ай бұрын
Why don't you use ipython - super easy to work with and has so much functionalities
@dipeshsamrawat79573 ай бұрын
Thank you 😊
@jerril423 ай бұрын
Thanks for the demo. A lot of very useful features for the repl. The ">>>" at the start of the line is a "prompt". You proabaly knew that, but just forgot. Take care.
@Indently3 ай бұрын
Thank you!
@KavyanshKhaitan3 ай бұрын
Whatsaaaaaaaaaaaaap!
@Indently3 ай бұрын
Whatdaaaaaaaap
@abodyfattouh72893 ай бұрын
Whatsaaaaaaaaaap!!!
@Indently3 ай бұрын
Whatsaaaaaaaaaaaaaaa
@vladimirkozyrev36172 ай бұрын
So, they invented ipython
@timothywcrane3 ай бұрын
No longer needing () after exit ... It has been the intro to Python docs and SO for almost two decades... LOL. Admit it. Who's intro to py in shell or IDLE started like vi, how do I get out of here?
@Labib-dw1lk3 ай бұрын
We have colaaar?
@ebiswatson-aputu54983 ай бұрын
whatsaaaaaaaaaaaap!!!
@Indently3 ай бұрын
Whatsaaaaaaaaaaaaaaaaaap
@marcushollaway34613 ай бұрын
Whatsaaaaaaaaaaaap!!!
@Indently3 ай бұрын
Whatsaaaaaaaaap
@spacelem3 ай бұрын
Does Ctrl-L clear the screen in earlier Python? That's a pretty common shortcut for refreshing or clearing the screen in the terminal.
@Indently3 ай бұрын
I read from another comment here that apparently it doesn’t work on Windows. Does anyone know if there is a different shortcut for Windows?
@spacelem3 ай бұрын
@@IndentlyI don't have any experience programming in Windows unfortunately, so I didn't know that didn't work.
@ramprasathmk3 ай бұрын
@@Indentlyas you said earlier in Windows ctrl+L doesn't work in both Command Prompt and Powershell 🤔.
@ebiswatson-aputu54983 ай бұрын
Whatsaaaaaaaaaaaap!
@ebiswatson-aputu54983 ай бұрын
I guess I missed the exclamation count. Here we go again 😂😂
@rudraksh1113 ай бұрын
New py 3.13 doesn't have basic things and 3.14 is in pipeline already😅😅 popular lib cannot be found with pip
@mamaoforever17863 ай бұрын
whatsapp 👍
@Indently3 ай бұрын
Whatsaaaaaaap
@rvft3 ай бұрын
New repl colors are lame as hell ngl. Better use rich's console
@JohanildPG3 ай бұрын
does anyone actually seriously use repl?
@joshuacox36443 ай бұрын
I always just use scratch files if I’m gonna test something out but maybe it could be useful for testing small temporary functions
@emaaaaax3 ай бұрын
I use it as calculator/converter honestly better than 90% of gui apps
@riadkhanrk3 ай бұрын
Hi I'm RK! Can you Create a video in the python rich library. Please please please please please please please please 🥺🥺🥺🥺🥺🥺🥺🥺🥺🥺