Advertisement
GameNationRDF

Python Website & File Launcher! version 0.0.4 (File Update)

Sep 15th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.01 KB | None | 0 0
  1. #Python Launcher version 0.0.4
  2. #Coded by GameNationRDF
  3. #It will be updated frequently with bug fixes and new feautures!
  4. import webbrowser
  5. import sys
  6. import os
  7. print ("Type in the website address and hit enter!")
  8. print ("")
  9. print ("Hit enter without typing anything to open up your file manager!")
  10. print ("")
  11. print ("Type 'file' and hit enter to go to or run a file/program!")
  12. print ("")
  13. print ("Basically type 'exit' to close program!")
  14. print ("")
  15. while True:
  16.     userIn=str(input("Enter address/command here: "))
  17.     print ("")
  18.     if userIn == ("exit"):
  19.         sys.exit()
  20.     elif userIn == ("file"):
  21.         filename=str(input("Enter file place: "))
  22.         os.system("start "+filename)
  23.     else:
  24.         handle=webbrowser.get()
  25.         handle.open(userIn)
  26.  
  27.  
  28. #Changelog:
  29.         # -Now you can launch files and programs directly in the program!
  30.         # -Program name and user input changed, so that it is not only Websites!
  31.         # - Bug fixed: Closing the app sometimes coused desktop to launch.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement