Tcl is announced by a single !. If the line ends in {, or with a \, then the script is continued as for Python.
In both cases, the head line can have spaces or a # initiated comment afterwards and still be detected: for Tcl, neither is permitted after a slosh and will generate a Tcl error.
409: #line 646 "input_frame.ipk" 410: # regexp's for the main functions 411: 412: def make_parse_tab(self, pywarn = None): 413: res = [] 414: if pywarn: 415: res = res + [ 416: ['^'+pywarn+'('+pywarn+')(.*)$',self.do_quote_at], 417: ['^'+pywarn+'(.*[-+*/%:,\([{]) *(#.*)?$', self.do_exec_suite], 418: ['^'+pywarn+'(.*)$',self.do_exec_line] 419: ] 420: 421: 422: res = res + [ 423: ['^(.*)$',self.do_web] 424: ] 425: return res 426: