send formatted exp to par with python script

I try to send the formatted op name.
I have tryed many differents way.

I would like to send to par.text ,
it cold look like op( …/table_TEXT_AV1 )[1,4]
the _AV{} at the end will change for 1 2 3 4
but for now i receive op( op_path )[1,4]
it those not format the variable because of the ’ ’
if I don’t put the ’ ’ it sends the value of op( …/table_TEXT_AV1 )[1,4] , not the string
but don’t now how it could work.

[code]a = op(‘null_now’)[‘now_playing’]

String_movie = '../table_TEXT_AV{}'
op_path = op( String_movie.format( a ))
op('AV_titre').par.text.expr = 'op( op_path )[1,4]'[/code]

Wouldn’t it have to be something like this?

a = op('null_now')['now_playing']
   
String_movie = '../table_TEXT_AV{}'
op_path = op( String_movie.format( a ))
op('AV_titre').par.text.expr = 'op( {} )[1,4]'.format(op_path)

Cheers
Markus

thanks !
it almost work but now it return
op( /kantanmapper/table_TEXT_AV2 )[1,4]
but still missing ’ ’ to work
should return op( ’ /kantanmapper/table_TEXT_AV2 ’ )[1,4]

[code]def valueChange(channel, sampleIndex, val, prev):
a = op(‘null_now’)[‘now_playing’]

String_movie = '../table_TEXT_AV{}'
op_path = op( String_movie.format( a ))
op('AV_titre').par.text.expr = 'op( {} )[1,4]'.format(op_path)
return[/code]

try this as the last line

op('AV_titre').par.text.expr = "op('{}')[1,4]".format(op_path)

work great THANKS !!!