Re: [Tutor] running an imported function

2012-04-27 Thread Steven D'Aprano
Cranky Frankie wrote: Is there a way I can import clr.py and then run clr()? The same way you import any other module and then call a function in that module. Don't be fooled by the function having the same name as the module. import clr # import the module clr.clr() # and call the fully-

[Tutor] running an imported function

2012-04-27 Thread Cranky Frankie
This is in 3.2.2. I wanted a function to clear the screen in IDLE. I have this in a clr.py file in a directory in my path: # Function to clear the IDLE screen by printing blank lines def clr(): '''Function to clear the IDLE screen by printing 50 lines.''' for i in range