Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Python Launcher version 0.0.6
- #Coded by GameNationRDF
- #It will be updated frequently with bug fixes and new feautures!
- import webbrowser
- import sys
- import os
- import string
- print ("Here are the things you can do: ")
- print ("")
- print (" *Type the website and hit enter to launch that website!")
- print ("")
- print (" *Type 'file', and write the location of a file/program to launch it!")
- print ("")
- print (" *Type 'exit' to close the program!")
- print ("")
- while True:
- userIn=str(input("Enter address/command here: "))
- print ("")
- if userIn == ("exit"):
- 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)
- else:
- print ("Sorry, unknown command!")
- #Changelog:
- # -Website entry detection added.
- # -Unknown command handling added.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement