# Creating a python script that will add objects in fixed time intervals

I want to create a python script that will add objects at a fixed time intervals. So for example, when I run my script, I want to add a cube, and 1 second later I want to add another cube at a different location and another second later I want to add another object. I tried using the time.sleep() function, but I found out that I can't use that in Blender, because when I do that, the script adds all the objects instantly after the time has elapsed. This means that the interface of blender can not be updated to accommodate for the time.sleep() delay. Is there a method where I can visually see each object being added to the scene and after a certain time another object and so on, and not all simultaneously?

What is another approach that I can use to accomplish this?

• Why do you want this? If you want to create an animation that shows objects appearing, you want to use fcurves. If you want to add an object every second while someone is using Blender, use a modal operator with a one-second timer. – dr. Sybren Nov 28 '17 at 7:08