initial commit

master
kirbylife 2019-08-09 20:44:09 -05:00
parent d593a12d8f
commit 9bddcc1fa3
1 changed files with 29 additions and 0 deletions

29
misc.py 100644
View File

@ -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()