import series of csv files as keyframe using handler
Hi Ray thank you for your answer.
I found another way and it works, so ...
Thank you anyway, I put the script in case of someone....
import bpy, csv, os, sys
path=&quot;/home/hadrien/Desktop/blender_parti/tuto2/&quot;
case_name = 'fensap'
def read_frame():
for l in bpy.data.objects:
if l.name.startswith(&quot;part &quot;):
l.select_set(True)
bpy.ops.object.delete()
current_frame=bpy.context.scene.frame_current
end_frame = 3
if current_frame &gt;= end_frame:
    print(&quot;NO EXISTING FRAME&quot;)
    return
with open(os.path.join(path,'{}_{:01d}.csv'.format(case_name,current_frame))) as csvfile:
    content = csv.reader(csvfile, delimiter=',', dialect='excel')
    for i,row in enumerate(content):
        if i == 0: continue            # skip header
        x,y,z = row [4], row[5], row[6]#
        bpy.ops.mesh.primitive_uv_sphere_add(radius=0.05,location = (float(x), float(y) ,float(z)))
        parti = bpy.context.object
        parti.name = 'part ({0:0&gt;2d})'.format(i)
        parti.data.name = 'Mesh ({0:0&gt;2d},)'.format(i)
    print(&quot;Frame number=&quot;,current_frame,&quot;number of particles=&quot;,i)
    
    

def my_handler(scene):
read_frame()
def register():
print(&quot;register&quot;)
bpy.app.handlers.frame_change_post.append(my_handler)
def unregister():
print(&quot;unregister&quot;)
bpy.app.handlers.frame_change_post.remove(my_handler)
register()
#unregister()