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!
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

Tate Price
Courses Plus Student 6,463 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
225,770 PointsPerhaps you're not using a Windows system. Try this instead:
os.system("clear")
Tate Price
Courses Plus Student 6,463 PointsTate Price
Courses Plus Student 6,463 PointsYes, I'm using Windows. I tried the mac, and linux version anyway though, but it didn't work.
Steven Parker
225,770 PointsSteven Parker
225,770 PointsIn that case, you might want to take this up with the Support folks.
Tate Price
Courses Plus Student 6,463 PointsTate Price
Courses Plus Student 6,463 PointsYes my python is installed on widows,
Mark Chesney
11,746 PointsMark Chesney
11,746 Points@ Steven Parker: You rock! thx
Steven Parker
225,770 PointsSteven Parker
225,770 PointsWell, thanks! It's fun to know something I wrote over a year ago is still helping.