def __str__(self):
		parser_state = u(zsh_expand('${(%):-%_}'))
		shortened_path = u(zsh_expand('${(%):-%~}'))
		try:
			mode = u(zsh.getvalue('_POWERLINE_MODE'))
		except __HOLE__:
			mode = None
		try:
			default_mode = u(zsh.getvalue('_POWERLINE_DEFAULT_MODE'))
		except IndexError:
			default_mode = None
		segment_info = {
			'args': self.args,
			'environ': environ,
			'client_id': 1,
			'local_theme': self.theme,
			'parser_state': parser_state,
			'shortened_path': shortened_path,
			'mode': mode,
			'default_mode': default_mode,
		}
		try:
			zle_rprompt_indent = zsh.getvalue('ZLE_RPROMPT_INDENT')
		except IndexError:
			zle_rprompt_indent = 1
		r = ''
		if self.above:
			for line in self.powerline.render_above_lines(
				width=zsh.columns() - zle_rprompt_indent,
				segment_info=segment_info,
			):
				if line:
					r += line + '\n'
		r += self.powerline.render(
			width=zsh.columns(),
			side=self.side,
			segment_info=segment_info,
			mode=mode,
		)
		if type(r) is not str:
			if type(r) is bytes:
				return r.decode(get_preferred_output_encoding(), 'replace')
			else:
				return r.encode(get_preferred_output_encoding(), 'replace')
		return r
dataset/ETHPy150Open powerline/powerline/powerline/bindings/zsh/__init__.py/Prompt.__str__