Using time module

I am new to python and blender and am trying to follow the Noob to Pro tutorials on wikibooks (http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Introduction). I am using blender 2.49b and python 2.6. The tutorial said this:

Look up the time module in the Python reference on the Python website, then using time.Sleep(…):

  • Change the script so that it animates the object, moving it along the z-Axis by 10 and rotating along the z-Axis by 180 in a total of 20 seconds

So I wrote a script with this in it:

import Blender
import bpy
import time

time.Sleep(20)
Cube = bpy.data.objects[“Cube”]
a = Blender.Object.Get(“Cube”)
a.LocZ = 10
a.RotZ = 3.14

However, the script was flagged for an error. Does anyone know how to fix this?

Thanks

The error that you’re getting is because the method is sleep, not Sleep. Capitalization matters.

For future help, when you get an error, an error message will be printed to the console (the little black screen that is always running with blender) that will help point you in the right direction towards finding out what went wrong

great it worked. thanks a lot