What does this do: fps = scene.render.fps / scene.render.fps_base?
In command
fps = scene.render.fps / scene.render.fps_base
fps is a variable that is given the value of the actual framerate of the scene.
scene.render.fps is the framerate but can only hold integer values. If you want non-integer framerates this value has to be divided by some value. Default is 24.
scene.render.fps_base is a way to get non-integer framerates. The type is a Float and the default is 1.0.
scene.render.fps_blender doesn't exist and will give you an error.
Examples:

60.0 = 60/1.0

20.5 = 41/2.0

29.75 = 30/1.008