I have written a python script to draw the sierpinski gasket using Tkinter and when run from the python IDLE the program takes about half the time it takes to run when run from bash. I timed the script using them time module in python. Any ideas as to why this is happening will be appreciated. thanks
It's because of the way you're passing it. Based on your comment on the other answer, you're using python -c, and in IDLE you're using the Run command (or something similar). I'm not aware of any performance issues with python -c, but using Run in IDLE to run somescript.py is equivalent to python somescript.py.
You really should run scripts using python -c, it's more for small snippets.
running python script in bash slower than running code in IDLE