converting particle systems

Hello.
I am very new to blender scripting.

I want to convert hair particle systems.
But this code does not work.
How can I get it to work?

import bpy
for i in bpy.data.objects[‘Cube’].particle_systems.values():
bpy.ops.object.modifier_convert(modifier= i.name)

I think I need to get modifier name.

I made a little progress.

There is a Cube object with two hair systems.
Select the Cube and then

import bpy
hairSystems = bpy.data.objects[‘Cube’].modifiers.keys()

for hair in hairSystems:
bpy.ops.object.modifier_convert(modifier= hair)

But this converts only the first hair system.
I think I need to select the Cube for every conversion.

But this does not work.
bpy.data.objects[‘Cube’].select = 1

The Cube becomes dark orange.
Not bright orange as usual and I guess this is the problem.
Is there other ways to select objects?
Or is there a better way to convert hair systems?