Hi Tim
I can understand how you might expect the import of CSV to work the same way as the Outline import but they actually differ significantly.
Importing the Outline format relies on the indentation because that's all there is, but the current CSV import relies on the task's Parent ID being present as this is far more reliable. I acknowledge that this important piece of information is probably not available anywhere except in my head.
So in the case of your python script you need only auto generate IDs (starting at 1) as you port each task across.
In the meantime, I will have a look at using the indent as a fallback but I suggest you don't wait for me :)
Dan