How do one apply a modifier?

Hello!
How do I apply a modifier by python in blender 2.5?
I don’t get this:

bpy.ops.object.modifier_apply(<i>apply_as='DATA'</i>)

peddie,
if you check the arrays sketch script, it apply’s modifiers,
sorry, in a rush, but we found the code there recently.

Thank you Meta-Androcto!
For everyone else who would like to know how to apply a modifier in blender 2.5:
bpy.ops.object.convert(target=‘MESH’, keep_original = False)

Exporters use create_mesh() at the moment and you can even get modifier_apply() to work with custom py-context. Both ideasman and theeth said the latter one is not a good thing to do though, so it’s probably better to not elaborate this further right now. :wink:

hehe OK so I stick with my solution atm. One more question: How do I loop thru a objectgroup?
I tried this:
for Shard in bpy.data.groups[‘Shards’]:
But failed…