6.23.10.1. The input frame

Note the horrid hack: the reg_list is a list of pairs, the second entry is a method which should be bound to this frame, but the frame isn't built yet. So the caller must pass an empty list, and populate it after the frame is constructed.

This has to be fixed.

Comienzo python section to interscript/frames/inputf.py[2 /41 ] Siguiente Previo Primero Ăšltimo
    55: #line 95 "input_frame.ipk"
    56: class input_frame:
    57: 
    58:   def __init__(self, pass_frame, src, reg_list, weaver, userdict, depth):
    59:     # the display
    60:     self.pass_frame = pass_frame
    61:     self.master = pass_frame.master
    62:     self.process = self.master.process
    63:     self.global_frame = self.process.global_frame
    64: 
    65:     self.current_weaver = weaver
    66:     self.current_weaver_stack = []
    67: 
    68:     self.depth = depth
    69:     self.source = src
    70:     self.userdict = userdict
    71:     self.reg_list = reg_list
    72:     self.read_buffer = []
    73: 
    74:     self.current_tangler_stack = []
    75:     self.current_tangler = None
    76:     self.line_offset = 0
    77:     self.original_filename = src.get_source_name()
    78:     self.original_count = self.line_offset
    79:     self.current_weaver.set_original_filename(self.original_filename)
    80:     self.head_offset = 0
    81:     self.tabwidth = self.master.tabwidth
    82: 
    83:     self.cont_re = re.compile('^$|^ (.*)$')
    84:     self.any_line_re = re.compile('^(.*)$')
    85: 
    86:     if 'frames' in self.process.trace:
    87:       self.process.acquire_object(self, 'INPUT FRAME['+str(depth)+']='+src.get_source_name())
    88:     self.post_methods()
    89: 
    90:   def __del__(self):
    91:     if 'frames' in self.process.trace:
    92:       self.process.release_object(self)
    93: 
    94:   def get_input_frame(self): return self
    95: 
End python section to interscript/frames/inputf.py[2]


6.23.10.1.1. Post user methods
6.23.10.1.2. close
6.23.10.1.3. Process file data