Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Quinn Thompson
1,227 PointsPycharm Clear screen
Hi Guys, I've recently started to learn to program with Python and I am using pycharm on my PC. On one of the earlier lessons Kenneth used made a project that would clear the screen to clean up as he went however in pycharm this doesn't work instead all you get is a little square in the window and it clears nothing. Any ideas?
5 Answers
Edward Seibert
32,055 PointsThe clear screen function Kenneth wrote in this video won't work inside of PyCharm's run window, so you're probably doing it right. :D That function will only work in a terminal window.
Quinn Thompson
1,227 PointsHere is a link to the video that refers to the project that uses these commands.
https://teamtreehouse.com/library/python-basics/letter-game-app/letter-game-refinement
Nicolas Bassano
2,125 PointsI tried my code for the letter game in Pycharm.
It works but really weird...................
For instance I get some little squares before the "Welcome to Letter Guess!" message (tried to copy/paste but it doesnt show here). And some ">?" here and there.
mmmm gotta dig deeper. Its probably a pycharm thing and needs some tweaking.
Ill let you know if I find something.
:(
Quinn Thompson
1,227 PointsThanks Nicolas, I tried googling information about it but couldn't find anything either.
Allison Schaaf
33,322 PointsYou can create your own keyboard shortcuts in PyCharm:
- Open Pycharm preferences
- Search: "clear all"
- Double click "clear all" -> add keyboard shortcut (set it to CTRL + L or whatever you'd like)
- Make sure to click in the console (or Run window) before using the shortcut or it doesn't do anything.
Jonathan De Wet
355 PointsHere is a way to do it in pycharm https://stackoverflow.com/a/47367480/5424873
Nicolas Bassano
2,125 PointsNicolas Bassano
2,125 Pointshi Quinn!
Can you provide the link for that lesson? I mean, the one he shows the "clear screen".
Cheers.