To solve the problem of the (Python) IDLE not having a built-in "clear" function, I created a user-defined function [cls()], that I have stored in a functions.py file in my sys.path.
import sys, functions
My user-defined function works, but I do not prefer always typing in:
functions.cls()
Amendment after Terry's comment
How do I reference my functions.py
file with my environmental variable IDLESTARTUP? I have tried the aforementioned by editing my .bash_profile with: $IDLESTARTUP="/Users/Mac/Documents/functions.py" export $IDLESTARTUP and starting up my IDLE using the command with the appropriate flag (idle3.6 -s). [Note: comment image added above in the original question, for reference]
[]1
How can I make it so I only have to type in my user-defined function, and not my .py file name?
cls()