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 trialTate Price
Courses Plus Student 9,987 Pointsclear screen in python shell
the clear screen function will not work in the python shell. the screen just flashes and stays the same.
import os
os.system('cls')
1 Answer
Steven Parker
232,162 PointsPerhaps you're not using a Windows system. Try this instead:
os.system("clear")
Tate Price
Courses Plus Student 9,987 PointsTate Price
Courses Plus Student 9,987 PointsYes, I'm using Windows. I tried the mac, and linux version anyway though, but it didn't work.
Steven Parker
232,162 PointsSteven Parker
232,162 PointsIn that case, you might want to take this up with the Support folks.
Tate Price
Courses Plus Student 9,987 PointsTate Price
Courses Plus Student 9,987 PointsYes my python is installed on widows,
Mark Chesney
11,747 PointsMark Chesney
11,747 Points@ Steven Parker: You rock! thx
Steven Parker
232,162 PointsSteven Parker
232,162 PointsWell, thanks! It's fun to know something I wrote over a year ago is still helping.