print_line по длине контента
This commit is contained in:
		
							
								
								
									
										13
									
								
								hlna.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								hlna.py
									
									
									
									
									
								
							| @@ -161,10 +161,17 @@ def print_line(*text, flag="", sep=" ", end="\n"): | ||||
|  | ||||
|     len_text = str(*text) | ||||
|     len_text = len_text.split("\n") | ||||
|     max_length = max(len(str(string)) for string in len_text) + 2 | ||||
|     print(color + "." * max_length) | ||||
|     max_string = max(len(str(string)) for string in len_text) + 2 | ||||
|     max_length = shutil.get_terminal_size() | ||||
|     max_length = max_length[0] | ||||
|     if max_string > max_length: | ||||
|         len_dots = max_length | ||||
|     else: | ||||
|         len_dots = max_string | ||||
|  | ||||
|     print(color + "." * len_dots) | ||||
|     print(color, *text, sep=sep, end=end) | ||||
|     print(color + "." * max_length + colorama.Style.RESET_ALL) | ||||
|     print(color + "." * len_dots + colorama.Style.RESET_ALL) | ||||
|  | ||||
|  | ||||
| def zmeyuka(stdscr, func): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user