Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=====================================#
- #==============MODULES================#
- #=====================================#
- import platform
- #=====================================#
- #==============VARIABLES==============#
- #=====================================#
- menu = ["(1) Run", "(2) Exit"]
- line = "="
- #=====================================#
- #==============FUNCTIONS==============#
- #=====================================#
- def menus(parameter):
- print " +========+"
- print " | MENU |"
- print " |========|"
- for word in parameter:
- print " |%s|" % word
- print " |--------|"
- def osdetect():
- rawdata = platform.platform()
- linesize = (len(rawdata) + 11)
- sys = platform.system()
- rel = platform.release()
- ver = platform.version()
- print line * linesize
- print " OS Name: %s " % sys
- print " Release: %s " % rel
- print " Version: %s " % ver
- print " Raw Data: %s " % rawdata
- print line * linesize
- #=====================================#
- #=============MAIN PROGRAM============#
- #=====================================#
- def main():
- menus(menu)
- choice = input("Please make a selection(1-2): ")
- #OS Detection
- if choice == 1:
- osdetect()
- #Exit
- elif choice == 2:
- print "Exiting Program. Goodbye"
- return
- #Fault
- else:
- print "Invalid Selection"
- return main()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement