Python Script to Import SVG file

Hi all. I’m new to python scripting and Blender. I’ve scoured the internet trying to find a working script to import an SVG image. The closest I’ve gotten to an answer is this page:

http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_import_svg.htm#0.5.9o

which can be translated from French to English (sadly the code link can’t). The info on the page is also out of date. The latest updates were in 2007. I’ve also searched these forums and to the best of my efforts have not been able to find an answer to my question. Does anyone have an example of how to import an SVG file to be used as a curve object? I greatly appreciate your time.

import an SVG via UI, then check the operator log, you can basically copy’n’paste the operator call.

The operator log method didn’t work. However, I found the following code, which works:

bpy.ops.import_curve.svg (filepath="")