def write_tmp_i3status_config(self, tmpfile):
<EOL>for module in self.py3_config["<STR_LIT>"]:<EOL><INDENT>self.write_in_tmpfile('<STR_LIT>' % module, tmpfile)<EOL><DEDENT>self.write_in_tmpfile("<STR_LIT:\n>", tmpfile)<EOL>for section_name in ["<STR_LIT>"] + self.py3_config["<STR_LIT>"]:<EOL><INDENT>section = self.py3_config[section_name]<EOL>self.write_in_tmpfile("<STR_LIT>" % section_name, tmpfile)<EOL>for key, value in section.items():<EOL><INDENT>if key.startswith("<STR_LIT>"):<EOL><INDENT>if (<EOL>section_name.split("<STR_LIT:U+0020>")[<NUM_LIT:0>] not in I3S_COLOR_MODULES<EOL>or key not in I3S_ALLOWED_COLORS<EOL>):<EOL><INDENT>continue<EOL><DEDENT><DEDENT>if section_name.split()[<NUM_LIT:0>] in TIME_MODULES:<EOL><INDENT>if key == "<STR_LIT>":<EOL><INDENT>value = TZTIME_FORMAT<EOL><DEDENT>if key == "<STR_LIT>":<EOL><INDENT>continue<EOL><DEDENT><DEDENT>if isinstance(value, bool):<EOL><INDENT>value = "<STR_LIT:{}>".format(value).lower()<EOL><DEDENT>self.write_in_tmpfile('<STR_LIT>' % (key, value), tmpfile)<EOL><DEDENT>self.write_in_tmpfile("<STR_LIT>", tmpfile)<EOL><DEDENT>tmpfile.flush()<EOL>
Given a temporary file descriptor, write a valid i3status config file
based on the parsed one from 'i3status_config_path'.