How can a blender driver python script access scene properties like FPS?
Inside script editor define your own function and register it for driver use:

import bpy

def driver_fce():
    scn = bpy.context.scene
    # You can use here:
    scn.frame_current
    scn.frame_start
    scn.frame_end
    scn.render.fps
    # etc..

    return 0    # some value

# Register it to driver namespace under name 'driver_fce':
bpy.app.driver_namespace['driver_fce'] = driver_fce


Use it like this:



Note that such drivers on node properties do not update correctly and its better to use frame change callback handler instead in that case.