Section 327(2) in The Code of Criminal Procedure, 1973
(2)[ Notwithstanding anything contained in sub-section (1), the inquiry into and trial of rape or an offence under section 376, [section 376A, section 376AB, section 376B, section 376C, section 376D, section 376DA, section 376DB,] [Inserted by Act 43 of 1983, Section 4 (w.e.f. 25.12.1983).] [or section 376E of the Indian Penal Code] [Substituted for the words "or section 376D of the Indian Penal Code" by Criminal Law (Amendment) Act, 2013] of the Indian Penal Code (45 of 1860) shall be conducted in camera :Provided that the Presiding Judge may, if he thinks fit, or on an application made by either of the parties, allow any particular person to have access to, or be or remain in, the room or building used by the court.[Provided further that in camera trial shall be conducted as far as practicable by a woman Judge or Magistrate.] [Inserted by the Code of Criminal Procedure (Amendment) Act, 2008 (5 of 2009), Section 24(a).]