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
Rafe is likely correct - you can test this out by limiting your imports and seeing if that makes a difference in startup time. I.e., if you are doing
from Tkinter import *
then change that to import only the modules you actually need. Or write a quick null program that just sets up and tears down without using anything in the package - that should run pretty close to the same in both.
running python script in bash slower than running code in IDLE