initial commit
parent
d593a12d8f
commit
9bddcc1fa3
|
@ -0,0 +1,29 @@
|
||||||
|
import base64
|
||||||
|
import os
|
||||||
|
import pickle
|
||||||
|
import sys
|
||||||
|
from tkinter import Button, Label, Toplevel
|
||||||
|
|
||||||
|
from tcping import Ping
|
||||||
|
|
||||||
|
|
||||||
|
def check_network(ip, port):
|
||||||
|
return True
|
||||||
|
ping = Ping(ip, port, 20)
|
||||||
|
ping.ping(1)
|
||||||
|
return ping.result.rows[0].successed == 1
|
||||||
|
|
||||||
|
|
||||||
|
def get_os():
|
||||||
|
if sys.platform in ["linux", "windows"]:
|
||||||
|
return sys.platform
|
||||||
|
raise Exception("OS not supported")
|
||||||
|
|
||||||
|
|
||||||
|
def alert(window, message, title="Munyal"):
|
||||||
|
child = Toplevel(window)
|
||||||
|
child.title(title)
|
||||||
|
label = Label(child, text=message)
|
||||||
|
button = Button(child, text="Aceptar", command=child.destroy)
|
||||||
|
label.pack()
|
||||||
|
button.pack()
|
Loading…
Reference in New Issue