Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

terminal from python

import os
os.system("command")
Comment

How to make a python terminal

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))
Comment

how to make a terminal in python

# 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
Comment

python create your own terminal

#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
Comment

PREVIOUS NEXT
Code Example
Python :: python for loop with step 
Python :: convert generator to list python 
Python :: python serial readline 
Python :: training linear model sklearn 
Python :: remove part of string python 
Python :: how to run shell command ctrl + c in python script 
Python :: glob python 
Python :: check if list is empty python 
Python :: use map in python to take input 
Python :: get a column of a csv python 
Python :: ordenar lista decrescente python 
Python :: pil resize image 
Python :: replace comma with dot in column pandas 
Python :: break python 
Python :: sorting values in dictionary in python 
Python :: time df.apply() python 
Python :: python list directories only 
Python :: selenium undetected chromedriver error 
Python :: fill a column based on values in another column pandas 
Python :: python switch statement 
Python :: flask start development server 
Python :: Random night stars with python turtle 
Python :: discord.py clear status 
Python :: rename keys in dictionary python 
Python :: how to vonvert 1 d list to 2d list in pytohn 
Python :: connect mongodb with python 
Python :: reverse function python 
Python :: selenium python find element by class name with space 
Python :: opencv load image python 
Python :: python ssl 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =