What error messages are you getting? Please post the full message.<br><br><div><span class="gmail_quote">On 7/5/05, <b class="gmail_sendername">Nathan Pinno</b> <<a href="mailto:falcon3166@hotmail.com">falcon3166@hotmail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<blockquote><label></label>
<div>What's wrong with this code? I'm using 2.2.3 if this helps.</div>
<div> </div>
<div>#This is for a password protected program to store passwords.</div>
<div>password = "hello"<br>print "The Password Program"<br>print "Copywrite
2005. All Rights Reserved."<br>print<br>answer = raw_input("What is the
password? ")<br>while password != answer:<br> print "The
password is incorrect."<br>def main_menu():<br> print "1)
Add a login info card"<br> print "2) Lookup a login info
card"<br> print "3) Remove a login info
card"<br> print "4) Print Login info
list"<br> print "5) Save login list"<br>
print "6) Open Login list"<br> print "9) Exit"</div>
<div> </div>
<div>def load_login(site,filename):<br> in_file =
open(filename,"r")<br> while
1:<br> in_line =
in_file.readline()<br> if
len(in_file) ==
0:<br>
break<br> in_line =
in_line[:-1]<br> [site,id,passcard]
= string.split(in_line,",")<br>
list[site] = id and passcard<br>
in_file.close()<br> <br>def
save_login(site,filename):<br> out_file =
open(filename,"w")<br> for x in
site.keys():<br>
out_file.write(x+","+sites[x]+"\n")<br>
out_file.close()<br> <br>menu_choice = 0<br>list =
{}<br>print "Welcome to the second half of the program."<br>print
main_menu()<br>while menu_choice != 9:<br> menu_choice =
input("Choose an option: ")<br> if menu_choice ==
1:<br> print "Add a login info
card"<br> site = raw_input("Site:
")<br> id = raw_input("User ID:
")<br> passcard =
raw_input("Password: ")<br>
list[site] = id and passcard<br> elif menu_choice ==
2:<br> print "Lookup a login info
card"<br> site = raw_input("Site:
")<br> if
site.has_key(site):<br>
print "The ID is:
",id(site)<br>
print "The password is:
",passcard(site)<br>
else:<br>
print site," was not found."<br> elif menu_choice ==
3:<br> print "Remove a login info
card"<br> site = raw_input("Site:
")<br> if
sites.has_key(site):<br>
del numbers[site]<br>
else:<br>
print site," was not found."<br> elif menu_choice ==
4:<br> print "Login
Info"<br> for x in
site.keys():<br>
print "Site: ",x," \tID: ",numbers[x]," \tPassword:
",numbers[x]<br>
print<br> elif menu_choice ==
5:<br> filename =
raw_input("Filename to save: ")<br>
save_login(list,filename)<br> elif menu_choice ==
6:<br> filename ==
raw_input("Filename to load: ")<br>
load_login(list,filename)<br>print "Have a nice day!"<br></div>
<div>Thanks,</div>
<div>Nathan Pinno<br>Crew, McDonalds Restaurant, Camrose, AB Canada<br><a href="http://www.npinnowebsite.ca/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.npinnowebsite.ca/</a></div>
</blockquote>
<p></p>
<br>_______________________________________________<br>Tutor maillist - <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Tutor@python.org">Tutor@python.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">
http://mail.python.org/mailman/listinfo/tutor</a><br><br><br></blockquote></div><br><br><br>-- <br>'There is only one basic human right, and that is to do as you damn well please.<br>And with it comes the only basic human duty, to take the consequences.'