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 :: print string and variable python 
Python :: pillow python text example 
Python :: python count same number in list 
Python :: python dict remove duplicates where name are not the same 
Python :: python circular import 
Python :: matplotlive y axis 
Python :: pandas dataframe first rows 
Python :: pivot pyspark 
Python :: How to check palindrom in python 
Python :: check if queryset is empty django template 
Python :: python turtle fill 
Python :: pytorch older versions 
Python :: gurobi python example 
Python :: how to access variables from a class in python 
Python :: use map in python to take input 
Python :: httplib python 
Python :: from django.db import models 
Python :: py -m pip 
Python :: TypeError: Can only append a dict if ignore_index=True 
Python :: Pandas conditional collumn 
Python :: python png library 
Python :: python argument parser default value 
Python :: not in python 
Python :: python primes 
Python :: ForeignKey on delete django 
Python :: python create file in current directory 
Python :: check for prime in python 
Python :: flask dockerize 
Python :: pandas description of dataframe renaming column values 
Python :: how to make a button in python 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =