Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
python_wiki:clear_screen [2014/11/24 22:42] billdozor |
python_wiki:clear_screen [2016/11/30 22:08] billdozor |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Clear Screen ====== | ====== Clear Screen ====== | ||
- | A clear screen function that uses: | + | |
- | * sys : to check for platform | + | **General Information ** |
- | * subprocess : to send commands to the OS | + | |
+ | A clear screen function that supports Windows, Unix, or Linux CLI programs. | ||
+ | |||
+ | **Checklist** | ||
+ | * import | ||
+ | * import | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Usage ====== | ||
+ | |||
+ | Call this function to clear the command line screen: | ||
+ | <code python> | ||
+ | clear_screen() | ||
+ | ..do other stuff now that my screen is clear! | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== The Code ====== | ||
<code python> | <code python> | ||
Line 14: | Line 33: | ||
</ | </ | ||
- | Call this function to clear the command line screen: | + | ---- |
- | <code python> | + | |
- | clear_screen() | + | |
- | ..do other stuff now that my screen is clear! | + | |
- | </ | + |