Hello soumi,
there is no such feature (yet) in CADET-Python but you can find a snippet in an older thread on the forum: