From 061b76944c20d5b1c06d7f8c130e9d0a5606deaa Mon Sep 17 00:00:00 2001 From: Anand prabhakar Date: Wed, 30 Sep 2020 23:38:45 +0530 Subject: [PATCH] Update command.py --- command.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/command.py b/command.py index 734a806..ac244e5 100644 --- a/command.py +++ b/command.py @@ -1,10 +1,29 @@ import os +import pyttsx3 + +engine = pyttsx3.init() +engine.say("Hello there..how are you..") +engine.say("Please tell me your name by typing ") +engine.runAndWait() +user = input("Please Enter Your name : ") +engine.say("Hello {0}".format(user)) +engine.runAndWait() + os.system("color 0e") + + +engine.say("This is a Modern command line Interface created by Anand Prabhakar") +engine.runAndWait() + print("==========================================================================") print("\n||\tCommand Line Interface CLI 1.0 By Anand Prabhakar,Bihar,India\t||\n||\tPowered by Python. \t\t\t\t\t\t||\n||\tjust learning..no commercial use.. \t\t\t\t||\n") print("==========================================================================") def main(): + engine = pyttsx3.init() + engine.say("Please Enter the command you want to run") + engine.runAndWait() command = input("\n\tEnter the command you want to execute : ") + print("Output after execution : \n") print("============================================================") commanding(command) @@ -15,7 +34,13 @@ def main(): def commanding(i): os.system("color 0a") + engine = pyttsx3.init() + engine.say("You have entered the following command") + engine.say(i) + engine.runAndWait() a = os.system(i) + engine.say("Here is output for the command you entered") + engine.runAndWait() print("\n\t\tDo you want to Enter Command again\n") print("-------------------------------------------------------------") main()