Add py directive to replace #set and #silent