import socket
from paramiko.client import SSHClient
import dearpygui.dearpygui as dpg
import os
# Optional: Print current working directory
print("Current working directory:", os.getcwd())
dpg.create_context()
window_width = 1000
window_height = 600
server_session = None
dpg.create_viewport(title="SSH MANAGER", decorated=False)
dpg.configure_viewport(0, x_pos=100, y_pos=100, width=window_width, height=window_height)
dpg.set_viewport_min_width(window_width)
dpg.set_viewport_min_height(window_height)
with dpg.font_registry():
default_font = dpg.add_font("custom.ttf", size=20)
custom_font = dpg.add_font("custom.ttf", size=50)
with dpg.window(no_collapse=True, no_resize=True, no_close=True,
no_title_bar=True, tag="main_w") as main_menu_window:
with dpg.group(horizontal=True):
title = dpg.add_text(
default_value="SSH MANAGER",
pos=[window_width // 2 - 200, window_height // 2 - 100]
)
dpg.bind_item_font(title, custom_font)
dpg.set_primary_window(window=main_menu_window, value=True)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
Код:
Ошибка: