I can't find a simple command that does this. If there's no command that does this I'm going to spam python.org until they finally agree to put this in the next version of python.
AutoPython
5
Junior Poster
Recommended Answers
Jump to PostSigh.
No, python doesn't have clear screen.
Jump to PostI suggest
>>> print("\n" * 40)
Or even better
>>> def clear(): ... print("\n"*40) >>> clear()
Last one:
>>> def clear(): ... import sys ... for i in range(40): ... print(sys.ps1)
All 12 Replies
scru
909
Posting Virtuoso
Featured Poster
AutoPython
5
Junior Poster
scru
909
Posting Virtuoso
Featured Poster
AutoPython
5
Junior Poster
Gribouillis
1,391
Programming Explorer
Team Colleague
AutoPython
5
Junior Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Gribouillis
commented:
nothing for idle ?
+4
Warkthogus
commented:
Very helpful and clear.
+1
AutoPython
5
Junior Poster
Warkthogus
0
Newbie Poster
Gribouillis
1,391
Programming Explorer
Team Colleague
AutoPython
5
Junior Poster
bumsfeld
413
Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.