def retrieve_width(self, signum=None, frame=None):
for method_name, args in self.strategies:<EOL><INDENT>method = getattr(self, "<STR_LIT>" + method_name)<EOL>width = method(*args)<EOL>if width and width > <NUM_LIT:0>:<EOL><INDENT>self.width = width<EOL>break <EOL><DEDENT><DEDENT>os.environ["<STR_LIT>"] = str(self.width)<EOL>
Stores the terminal width into ``self.width``, if possible.
This function is also the SIGWINCH event handler.