how can I call an existing exporter from code?

bpy.ops.export.dxf(filename = 'name')

returns


TypeError: Converting py args to operator properties: : keyword "filename" unrecognized

I’m trying to find out what this function takes as arguments, and I can’t.

I tried dir(bpy.ops.export.dxf) and help(bpy.ops.export.dxf) with nothing. I also can’t find this operator in the API reference.
http://www.blender.org/documentation/blender_python_api_2_69_1/search.html?q=dxf

A couple of ways. The operator cheat sheet from the info / help menu


    Export to the Autocad model format (.dxf)
    
bpy.ops.export.dxf(filepath="", projectionThrough='NO', onlySelected=True, apply_modifiers=True, mesh_as='3DFACEs', entitylayer_from='obj.data.name', entitycolor_from='default_COLOR', entityltype_from='CONTINUOUS', layerName_from='LAYERNAME_DEF', verbose=False)


Or using autocomplete in the python console




>>> bpy.ops.export.dxf(
dxf()
bpy.ops.export.dxf(filepath="", projectionThrough='NO', onlySelected=True, apply_modifiers=True, mesh_as='3DFACEs', entitylayer_from='obj.data.name', entitycolor_from='default_COLOR', entityltype_from='CONTINUOUS', layerName_from='LAYERNAME_DEF', verbose=False)
>>> bpy.ops.export.dxf(


Thanks.
I wasn’t aware of both.