import os
os.system("command")
import subprocess
import platform
import socket
import time
import os
import webbrowser
path = "C:/"
host_name = socket.gethostname()
host_ip = socket.gethostbyname(host_name)
print("py terminal [Version 1.0 BETA]")
while True:
code = input(">>>")
if code == "ping":
host = input("Enter website to ping:")
num = input("how many times to ping:")
def ping(host):
param = '-n' if platform.system().lower() == 'windows' else '-c'
command = ['ping', param, num, host]
return subprocess.call(command)
print(ping(host))
# Honestly
# Doing this in python without
# using some electron library or something would be hell
# Id highly recommend writing a terminal wrapper/CLI for what you want
# Not going out of your way to write a whole new terminal
#
# Wx/Tk can never go wrong tho s
#I tried making my own OS on python
#which the first step for would be making a terminal
#so i tried making a terminal and that was just sad
#don't make your own terminal