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.
531: #line 778 "input_frame.ipk" 532: # regexp's for the main functions 533: 534: def make_parse_tab(self, pywarn = None): 535: res = [] 536: if pywarn: 537: res = res + [ 538: ['^'+pywarn+'('+pywarn+')(.*)$',self.do_quote_at], 539: ['^'+pywarn+'(.*[-+*/%:,\([{]) *(#.*)?$', self.do_exec_suite], 540: ['^'+pywarn+'(.*)$',self.do_exec_line] 541: ] 542: 543: 544: res = res + [ 545: ['^(.*)$',self.do_web] 546: ] 547: return res 548: