Skip to main content

A cross-platform Python module that provides a clear() function which clears the terminal. That's all.

Project description

clear

A cross-platform Python module that provides a clear() function which clears the terminal. That's all.

To install with pip, run:

pip install clear

You can then clear the screen by running:

from clear import clear
clear()

This function runs the one-liner: os.system('cls' if os.name == 'nt' else 'clear')

This module exists as a simpler alternative to defining this function on your own.

Special thanks to David George for allowing me to use the Clear name on PyPI. The original Clear module ("Command-Line Extract And Rename utility. This provides a media library manager that allows extraction and renaming of media files.") can still be found in the previous releases of this project on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clear-2.0.0.tar.gz (2.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page