When any application is made to any court in the course of any inquiry, trial or other proceeding under this Code, and allegations are made therein respecting any public servant, the applicant may give evidence of the facts alleged in the application by affidavit, and the court may, if it thinks fit, order that evidence relating to such facts be so given.