MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / clearScreen

Function clearScreen

src/gamesbyexample/fireflies.py:192–197  ·  view source on GitHub ↗

Clear the terminal window screen by running cls or clear.

()

Source from the content-addressed store, hash-verified

190
191
192def clearScreen():
193 """Clear the terminal window screen by running cls or clear."""
194 if sys.platform == 'win32':
195 os.system('cls') # Windows uses the cls command.
196 else:
197 os.system('clear') # macOS and Linux use the clear command.
198
199
200# If this program was run (instead of imported), run the game:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected