little fixes, add msg_window()

function for Messagebox to show a tk.Toplevel()
replace var = open() with:
with open() as var:
and remove by classes (tk.tk) and super()
This commit is contained in:
2024-09-14 23:25:48 +02:00
parent 8fa6e6374f
commit d1a822fff0
5 changed files with 115 additions and 111 deletions

View File

@ -1,12 +1,9 @@
#!/usr/bin/python3
from subprocess import check_call
path_to_file = '/home/punix/.config/wire_py/wg_py'
with open(path_to_file, ) as file:
for line in file.readlines():
a_con = line[5:]
with open(path_to_file, 'r') as file:
*_, line = file
a_con = line[5:]
check_call(['nmcli', 'connection', 'up', a_con])
file.close()