So here's what I'm trying to do. I have quite a few folders made in a special directory on my computer to hide stuff in. I have 4 levels of folders, each folder with folders numbered 1 - 4.
Example:
1>1>1>1
1>1>1>2
...
1>2>1>1
...
4>1>1>1
...
4>4>4>4
I wrote a python program to ask for a pin, then open the file directory corresponding with the pin. [Ex.. pin# 4322 will open 4>3>2>2]. Only problem I'm having is I cannot limit input to only numbers 1 - 4, and when I enter a number outside of this range internet explorer is opened (UGH! IE).
Here's the code.... (Python 2.7.6)
pin=str(raw_input("What is your 4-digit pin number? "))
intpin=int(pin)
#==============##==============#
pin1=pin[0:1]
pin2=pin[1:2]
pin3=pin[2:3]
pin4=pin[3:4]
#==============##==============#
ipin1=int(pin1)
ipin2=int(pin2)
ipin3=int(pin3)
ipin4=int(pin4)
#==============##==============#
print("")
print pin1
print pin2
print("")
path=("D:/Documents/Personal/"+pin1+"/"+pin2+"/"+pin3+"/"+pin4)
import webbrowser as wb
wb.open(path)
#==============##==============#
print("Thank You!")
print("Your window has opened, now please close this one...")