Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Python Control Center version 0.1.0 beta
- #Coded by GameNationRDF
- #It will be updated frequently with bug fixes and new feautures!
- import webbrowser
- import sys
- import os
- import string
- import time
- import math
- currentVersion = ("0.1.0 beta")
- developer = ("Umut Bilgic")
- year = ("2013")
- def blank():
- print (" ")
- def intro():
- print ("Here are the things you can do: ")
- blank()
- print (" *Type the website and hit enter to launch that website!")
- blank()
- print (" *Type 'file', and write the location of a file/program to launch it!")
- blank()
- print (" *Type 'math' to do basic math operations!")
- blank()
- print (" *Type 'time' to set up a timer!")
- blank()
- print (" *Type 'info' to get info about the program.")
- blank()
- print (" *Type 'exit' to close the program!")
- blank()
- intro()
- while True:
- userIn=str(input("Enter address/command here: "))
- blank()
- if userIn == ("exit"):
- print ("Program will close in a second..")
- time.sleep(1)
- sys.exit()
- elif userIn == ("file"):
- filename=str(input(" *Enter file place: "))
- os.system("start "+filename)
- elif userIn.startswith("www") is True:
- handle=webbrowser.get()
- handle.open(userIn)
- elif userIn == ("math"):
- operation = str(input("Enter operation (+, -, *, /, sqrt, exp): "))
- blank()
- if operation == ("+"):
- input_1 = int(input(" *Enter first number: "))
- input_2 = int(input(" *Enter second number: "))
- print ((input_1)+(input_2))
- blank()
- elif operation == ("-"):
- input_1 = int(input(" *Enter first number: "))
- input_2 = int(input(" *Enter second number: "))
- print ((input_1)-(input_2))
- blank()
- elif operation == ("*"):
- input_1 = int(input(" *Enter first number: "))
- input_2 = int(input(" *Enter second number: "))
- print ((input_1)*(input_2))
- blank()
- elif operation == ("/"):
- input_1 = int(input(" *Enter first number: "))
- input_2 = int(input(" *Enter second number: "))
- print ((input_1)/(input_2))
- blank()
- elif operation == ("exp"):
- input_1 = int(input(" *Enter first number: "))
- input_2 = int(input(" *Enter second number: "))
- print ((input_1)**(input_2))
- blank()
- elif operation == ("sqrt"):
- oneInput = int(input(" *Enter number: "))
- print (math.sqrt(oneInput))
- blank()
- elif userIn == ("info"):
- print (" - Current Version: "+currentVersion)
- print (" - Developer: "+developer)
- print (" - "+year)
- elif userIn == ("time"):
- userTimeMode = str(input(" *Minutes or Seconds? (m/s): "))
- blank()
- if userTimeMode == ("m"):
- userLimitMin = int(input(" *Set your timer (minutes): "))
- blank()
- userLimit = (userLimitMin * 60)
- else:
- userLimit = int(input(" *Set your timer (seconds): "))
- blank()
- userMode = str(input(" *Display mode? (y/n): "))
- blank()
- for i in range(1, userLimit):
- if userMode == ("y") or userMode == ("Y"):
- print (i)
- time.sleep(1.0)
- print ("Countdown finished!")
- blank()
- else:
- print ("Sorry, unknown command!")
- blank()
- #Changelog:
- # -Beta is here!
- # -Timer mode added! Set a timer in minutes or seconds!
- # -Info added.
- # -Derpy herps fixed. (Exponent function was not working properly)
- # -Program name is more accurate :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement