You could call X-function from Python the same way as it does in LabTalk. Try the script below:
import originpro as op
f = op.path('e')+r'Samples\Curve Fitting\Multiple Peaks.dat'
wks = op.new_sheet()
wks.from_file(f)
wks.lt_exec('pa iy:=(1,2) smode:=1 theme:=myTheme')
You can manually run the PA and save the theme as myTheme before running the code above.
James